PHP cannot run in apache + linux 7.2

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
zidane2
Forum Newbie
Posts: 3
Joined: Tue Jul 02, 2002 10:36 am

PHP cannot run in apache + linux 7.2

Post by zidane2 »

i try to edit the httpd.conf file
but it still cannot run php

<IfModule mod_php4.c>
AddType application/x-httpd-php .php4 .php3 .phtml .php
AddType application/x-httpd-php-source .phps
</IfModule>

# The following is for PHP3:
<IfModule mod_php3.c>
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
</IfModule>

any suggestion to me?
gcfmaf
Forum Newbie
Posts: 2
Joined: Tue Jul 02, 2002 1:18 pm

Post by gcfmaf »

You don't state how you're compiling PHP, but assuming you want a DSO, you need this line also:

LoadModule php4_module libexec/libphp4.so

Do you have that?
zidane2
Forum Newbie
Posts: 3
Joined: Tue Jul 02, 2002 10:36 am

Post by zidane2 »

<IfDefine HAVE_PERL>
LoadModule perl_module modules/libperl.so
</IfDefine>
<IfDefine HAVE_PHP>
LoadModule php_module modules/mod_php.so
</IfDefine>
<IfDefine HAVE_PHP3>
LoadModule php3_module modules/libphp3.so
</IfDefine>
<IfDefine HAVE_PHP4>
LoadModule php4_module modules/libphp4.so
</IfDefine>

Seems there are no Comment on it. is it right?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

you may activate 'server-info' to see if any php-module has been loaded. To do so edit your httpd.conf
...
LoadModule info_module modules/mod_info.so
...
<Location /server-info>
SetHandler server-info
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
something like
Server Version: Apache/2.0.36 (Win32) PHP/4.2.1
should be printed.


What happens when a script is called? Nothing or do you see the source-code?
Check the apache error.log (<apache-dir>/logs/error.log) and the system logs (/var/log/[messages|error])
gcfmaf
Forum Newbie
Posts: 2
Joined: Tue Jul 02, 2002 1:18 pm

Post by gcfmaf »

zidane2 wrote:<IfDefine HAVE_PERL>
LoadModule perl_module modules/libperl.so
</IfDefine>
<IfDefine HAVE_PHP>
LoadModule php_module modules/mod_php.so
</IfDefine>
<IfDefine HAVE_PHP3>
LoadModule php3_module modules/libphp3.so
</IfDefine>
<IfDefine HAVE_PHP4>
LoadModule php4_module modules/libphp4.so
</IfDefine>

Seems there are no Comment on it. is it right?
Make sure that the libphp4.so file is actually in the modules directory. You may have to move it there or create a soft link.
zidane2
Forum Newbie
Posts: 3
Joined: Tue Jul 02, 2002 10:36 am

Post by zidane2 »

anyone can remote help me?

my icq number is 21263647
Post Reply