Page 1 of 1
PHP cannot run in apache + linux 7.2
Posted: Tue Jul 02, 2002 10:36 am
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?
Posted: Tue Jul 02, 2002 1:18 pm
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?
Posted: Tue Jul 02, 2002 8:48 pm
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?
Posted: Tue Jul 02, 2002 10:04 pm
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])
Posted: Tue Jul 02, 2002 10:12 pm
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.
Posted: Tue Jul 02, 2002 11:17 pm
by zidane2
anyone can remote help me?
my icq number is 21263647