Newbie Needs Help---Can't get php to Run

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-12-2004
Jim Garten
 
Posts: n/a
Default Newbie Needs Help---Can't get php to Run

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.
Reply With Quote
  #2 (permalink)  
Old 10-12-2004
Erwin Moller
 
Posts: n/a
Default Re: Newbie Needs Help---Can't get php to Run

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.


Reply With Quote
  #3 (permalink)  
Old 10-12-2004
Jeffrey Silverman
 
Posts: n/a
Default Re: Newbie Needs Help---Can't get php to Run

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 &lt;? and ?&gt; 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

Reply With Quote
  #4 (permalink)  
Old 10-12-2004
Fox
 
Posts: n/a
Default Re: Newbie Needs Help---Can't get php to Run

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

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:35 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0