Re: PHP 4.0 Bug #4728 Updated: Apache reports a syntax error on "LoadModule php4_module"

From: Date: Mon, 19 Jun 2000 18:54:49 +0000
Subject: Re: PHP 4.0 Bug #4728 Updated: Apache reports a syntax error on "LoadModule php4_module"
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-21771@lists.php.net to get a copy of this message
I had the same problem when following the install documentation line by line, for apache 1.3.12 under RedHat 6.x. However, I tracked down the problem one crashed httpd.conf line at a time with Apache and got an install. If I remember correctly, the .so module was initially being looked for in the wrong place due to a documentation error. The INSTALL file says "The only thing left to do is to edit your httpd.conf file and make sure the PHP 4 mime type is there and uncommented. You need a line that looks like this: AddType application/x-httpd-php .php" THIS IS INCORRECT (or incomlete) FOR RedHat 6.x, generic install, apache 1.3.12. ---------- [root@maxfield maxfield]# rpm -qa | grep apache apache-devel-1.3.12-2 apache-1.3.12-2 apache-manual-1.3.12-2 ------------------------------------------------- I had to add the php4_module explicitly, worded differently than the install does: # Extra Modules #LoadModule perl_module modules/libperl.so #LoadModule php_module modules/mod_php.so #LoadModule php3_module modules/libphp3.so LoadModule php4_module modules/libphp4.so THEN I had to change the AddModule lines: # Extra Modules #AddModule mod_perl.c #AddModule mod_php.c #AddModule mod_php3.c AddModule mod_php4.c --------------------------------------------- There were two lines added to the file by make install much farther down: # # Allow http put (such as Netscape Gold's publish feature) # Use htpasswd to generate /etc/httpd/conf/passwd. # You must unremark these two lines at the top of this file as well: #LoadModule put_module modules/mod_put.so LoadModule php4_module lib/apache/libphp4.so #AddModule mod_put.c AddModule mod_php4.c ------------------------------------------------ if these lines are left as is, the following happens: [root@maxfield maxfield]# /etc/rc.d/init.d/httpd restart Shutting down http: [ OK ] Starting httpd: Syntax error on line 874 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/lib/apache/libphp4.so into server: /etc/httpd/lib/apache/libphp4.so: cannot open shared object file: No such file or directory [FAILED] [root@maxfield maxfield]# locate libphp4.so /root/php/php-4.0.0/libs/libphp4.so /root/php/php-4.0.0/.libs/libphp4.so /usr/lib/apache/libphp4.so [root@maxfield maxfield]# ------------------------------------------------------ This is even with the Add-Type directive installed. By placing the lines I indicated, you get (from an already shutdown server): [root@maxfield maxfield]# /etc/rc.d/init.d/httpd restart Shutting down http: [FAILED] Starting httpd: [ OK ] take care, bug On 19 Jun 2000, Bug Database wrote: > ID: 4728 > Updated by: rasmus > Reported By: ilya@vtrails.com > Status: Closed > Bug Type: Dynamic loading related > Assigned To: > Comments: > > You are not providing any information that is of any use at all here. You say you get a syntax > error, but you don't show that syntax error. > Syntax errors are most often related to the fact that the Apache directive syntax has changed. > Please read: http://www.php.net/version4/migration.php > > Your core dump is a separate issue and without more info we can't possible > help you with that one. > > Full Bug description available at: > http://bugs.php.net/version4/?id=4728

« previous php.dev (#21771) next »