Server running/PHP running/won't process

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mrrobotto
Forum Commoner
Posts: 40
Joined: Thu Sep 26, 2002 9:30 pm
Contact:

Server running/PHP running/won't process

Post by mrrobotto »

I have Apache 1.3.27 with PHP4 running as a module not cgi. In the server it says Apache/1.3.27 PHP/4.2.3 running. The problem is that the php isn’t working. It will display the html with no problem but it won’t process the php even though it says php is running. As far as I can tell I have it configured right but there might be something that I am over looking.

I have the same files on another server that I have uploaded them to and it works fine on that server. I have made no changes so why isn’t it working on my computer? I am looping it back by using 127.0.0.1 for an address. It is something that I must not have quite right but I haven’t figured it out yet. Any help will be greatly appreciated. TIA
:?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

do you use short-tags (<? <= ) in your scripts and if so, are they enabled in php.ini?

if you have server-info (mod_info) enabled, do you have a section
Module Name: mod_php4.c
Content handlers: application/x-httpd-php , application/x-httpd-php-source , text/html
?
mrrobotto
Forum Commoner
Posts: 40
Joined: Thu Sep 26, 2002 9:30 pm
Contact:

Post by mrrobotto »

I don't know where is this at in the ini file I looked for it but couldn't find it could you point me to it. Yes I use short tags in my scripts.
mrrobotto
Forum Commoner
Posts: 40
Joined: Thu Sep 26, 2002 9:30 pm
Contact:

Post by mrrobotto »

I found what you are talking in the ini file it is enabled or on.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

hmmm,
so the simple script

Code: Select all

&lt;?php phpinfo(); ?&gt;
doesn't work either?
mrrobotto
Forum Commoner
Posts: 40
Joined: Thu Sep 26, 2002 9:30 pm
Contact:

RE: Volka

Post by mrrobotto »

:D Yes <?php phpinfo(); ?> works fine now to figure out why the other won't work when it works fine on another server. So it seems that something is still not quite right. On this Quote you made I'm not sure what you are refering to.

if you have server-info (mod_info) enabled, do you have a section Quote:
Module Name: mod_php4.c
Content handlers: application/x-httpd-php , application/x-httpd-php-source , text/html

Are you talking about this section in the httpd config file? You can tell like I'm really, really new to this.

# AddType allows you to tweak mime.types without actually editing it, or to
# make certain files to be certain types.
#
AddType application/x-tar .tgz
AddType image/x-icon .ico
AddType application/x-httpd-php .php .phtml

If you are this is what mine looks like.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

if <?php phpinfo() ?> works your php installation works and I'm even more convienced that your problem is related to the short tags. What does phpinfo() say about short_open_tag?

Other possibility is that the script causes an error (maybe a missing module). Is there an entry in the error.log of apache?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Also check your php.ini to see if display_errors is off and turn it on if it is.

Mac
Post Reply