This is a discussion on Newbie Needs Help---Can't get php to Run within the PHP Language forums, part of the PHP Programming Forums category; I apologize if this is too obvious but I can't find the answer in FAQ, documentation, config reviews, web ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I apologize if this is too obvious but I can't find the answer in FAQ,
documentation, config reviews, web searches, uninstall and reinstall of a different distribution. I am trying to set up php to learn it. Win XP Pro, Apache 1.3.31, php 5.0.2. Apache windows shows- Apache/1.3.1 <Win32> PHP/5.0.2 running... I am trying to run the Hello.php example. IE 6.0 displays the interpreted HTML portion and nothing else. View source shows the right code. Access log shows 304 - (whatever that means). Firefox 1.0 shows the unintepreted HTML echoed back (like source code view) and the access log shows: 127.0.0.1 - - [12/Oct/2004:06:07:56 -0500] "GET /hello.php HTTP/1.1" 304 - 127.0.0.1 - - [12/Oct/2004:06:08:52 -0500] "GET /favicon.ico HTTP/1.1" 404 294 Hopefully this is a simple fix that I've overlooked. Your help would be appreciated. |
|
|||
|
Jim Garten wrote:
> I apologize if this is too obvious but I can't find the answer in FAQ, > documentation, config reviews, web searches, uninstall and reinstall > of a different distribution. > > I am trying to set up php to learn it. > > Win XP Pro, Apache 1.3.31, php 5.0.2. > Apache windows shows- Apache/1.3.1 <Win32> PHP/5.0.2 running... > > I am trying to run the Hello.php example. IE 6.0 displays the > interpreted HTML portion and nothing else. Hi, What do you mean by "IE 6.0 displays the interpreted HTML portion and nothing else." ??? Interpreted means that PHP went over it (in this case) and made the right output, but I expect that you mean that it is showing the literal PHP-code. Right? If so: PHP is NOT used to interpret the file, but Apache is serving it as is. Check you httpd.conf (or whatever it is called on XP) and make sure php is registered as a protocol. I think you must have missed some step during your installation. Regards, Erwin Moller View source shows the right > code. Access log shows 304 - (whatever that means). > > Firefox 1.0 shows the unintepreted HTML echoed back (like source code > view) and the access log shows: > 127.0.0.1 - - [12/Oct/2004:06:07:56 -0500] "GET /hello.php HTTP/1.1" > 304 - > 127.0.0.1 - - [12/Oct/2004:06:08:52 -0500] "GET /favicon.ico HTTP/1.1" > 404 294 > > Hopefully this is a simple fix that I've overlooked. Your help would > be appreciated. |
|
|||
|
On Tue, 12 Oct 2004 04:15:31 -0700, Jim Garten wrote:
> Win XP Pro, Apache 1.3.31, php 5.0.2. > Apache windows shows- Apache/1.3.1 <Win32> PHP/5.0.2 running... Try this: http://wdscript.sourceforge.net/ews/ Also, Apche 1.3 is not recommended for use on Windows -- Apache 2 is. Also, also, try a very simple php script: <? phpinfo(); ?> That's it. Save it as phpinfo.php and then browse to http://localhost/phpinfo.php If you see a lot of info, then PHP is working. Also, also, also, somehting that I see newbs do relatively frequently is use a WYSIWYG editor like DreamWeaver to create PHP scripts. Please don't do this. Dreamweaver will convert <? and ?> to <? and ?> which will make your script not work! Please use Notepad or another plain text editor. There are eighty gajillion text editors available. later... -- Jeffrey D. Silverman | jeffreyPANTS@jhu.edu Website | http://www.newtnotes.com Drop "PANTS" to reply by email |
|
|||
|
Jim Garten wrote:
> I apologize if this is too obvious but I can't find the answer in FAQ, > documentation, config reviews, web searches, uninstall and reinstall > of a different distribution. > > I am trying to set up php to learn it. > > Win XP Pro, Apache 1.3.31, php 5.0.2. > Apache windows shows- Apache/1.3.1 <Win32> PHP/5.0.2 running... > > I am trying to run the Hello.php example. IE 6.0 displays the > interpreted HTML portion and nothing else. View source shows the right > code. Access log shows 304 - (whatever that means). > > Firefox 1.0 shows the unintepreted HTML echoed back (like source code > view) and the access log shows: > 127.0.0.1 - - [12/Oct/2004:06:07:56 -0500] "GET /hello.php HTTP/1.1" > 304 - > 127.0.0.1 - - [12/Oct/2004:06:08:52 -0500] "GET /favicon.ico HTTP/1.1" > 404 294 > > Hopefully this is a simple fix that I've overlooked. Your help would > be appreciated. Did you manually install (recommended) or use an autoinstall? Did you configure Apache? Did you install as a module (recommended) or cgi? Did you stop and restart after configuration? http://www.php.net/manual/en/install...ws.apache1.php |