Web Hosting Talk







View Full Version : Upgrade to php 4.1 problems


fulcan
02-23-2002, 07:44 AM
Just upgraded my server to php 4.1 and pages refuse to parse and are just showing the code in the browser.

Would anyone have any suggestions as to the problem?

:bawling:

jks
02-23-2002, 08:40 AM
Originally posted by fulcan
Just upgraded my server to php 4.1 and pages refuse to parse and are just showing the code in the browser.

Would anyone have any suggestions as to the problem?

:bawling:

Stop and start Apache and check the error log, does it show PHP in the server signature?

Have you got an AddType for php in your configuration?

fulcan
02-23-2002, 09:02 AM
My configuartion files contain the following - including AddType under MIME (see below). Should there be an addtype in the php.ini? I have stopped and started apache a number of times and nothing is showing in the error log.

My httpd.conf contains the following

<IfDefine vwh_php4_module>
LoadModule php4_module modules/libphp4.so
</IfDefine>

and further down

<IfDefine vwh_php4_module>
AddModule mod_php4.c

and further down

DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 $php3 index.php4 index.pl

and further down

#Setup mime types for mod_php4
<IfModule mod_php4.c>
AddType application/x-httpd-php .php .php4 .php3

and further down

<IfDefine vwh_php4_module>
php_admin_flag safe_mode on
</IfDefine>

Here is the extensions in my php.ini file.

; Directory in which the loadable extensions (modules) reside.
extension_dir = /usr/lib/php4

extension=mysql.so
extension=imap.so
extension=ldap.so
extension=pgsql.so

Am I missing something in all this??????

jks
02-23-2002, 09:07 AM
Originally posted by fulcan
My configuartion files contain the following - including AddType under MIME (see below). Should there be an addtype in the php.ini? I have stopped and started apache a number of times and nothing is showing in the error log.

My httpd.conf contains the following

<IfDefine vwh_php4_module>
LoadModule php4_module modules/libphp4.so
</IfDefine>

and further down

<IfDefine vwh_php4_module>
AddModule mod_php4.c

and further down

DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 $php3 index.php4 index.pl

and further down

#Setup mime types for mod_php4
<IfModule mod_php4.c>
AddType application/x-httpd-php .php .php4 .php3

and further down

<IfDefine vwh_php4_module>
php_admin_flag safe_mode on
</IfDefine>

Here is the extensions in my php.ini file.

; Directory in which the loadable extensions (modules) reside.
extension_dir = /usr/lib/php4

extension=mysql.so
extension=imap.so
extension=ldap.so
extension=pgsql.so

Am I missing something in all this??????

If you're saying that _nothing_ shows in your error log, you must surely be doing something wrong.

It should show something like:

[Sat Feb 23 14:00:34 2002] [notice] Apache/1.3.21 (Unix) (Red Hat/Linux) mod_ssl/2.7.6 OpenSSL/0.9.6a DAV/1.0.1 PHP/4.1.1 mod_perl/2.44 configured -- resuming normal operations

fulcan
02-23-2002, 10:33 AM
ok my error shows this after reboot apache

[Sun Feb 24 00:22:05 2002] [notice] Apache/1.3.19 (Unix) (Red-Hat/Linux) configured -- resuming normal operations

I see there is not mention of php etc. What might you suggest to fix?

Thanks
:confused:

jks
02-23-2002, 10:39 AM
Originally posted by fulcan
ok my error shows this after reboot apache

[Sun Feb 24 00:22:05 2002] [notice] Apache/1.3.19 (Unix) (Red-Hat/Linux) configured -- resuming normal operations

I see there is not mention of php etc. What might you suggest to fix?

Thanks
:confused:

Check if you have a LoadModule for PHP in your httpd.conf file.

fulcan
02-23-2002, 10:47 AM
yes this is what I have

<IfDefine vwh_php4_module>
LoadModule php4_module modules/libphp4.so
</IfDefine>

jks
02-23-2002, 11:31 AM
Originally posted by fulcan
yes this is what I have

<IfDefine vwh_php4_module>
LoadModule php4_module modules/libphp4.so
</IfDefine>

Then you must probably haven't definde vwh_php4_module! :-)

fulcan
02-23-2002, 06:48 PM
Sorry I am a newbieat this. How and where do I need to define vwh_php4_module?

Thanks for your help.

fulcan
02-24-2002, 06:46 AM
ok, I did the following and got the following error message.

httpd -D vwh_php4_module

Syntax error on line 246 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/libphp4.so into server: libpng.so.2: cannot open shared object file: No such file or directory

on line 246 in httpd.conf (with "if define" around it)

LoadModule php4_module modules/libphp4.so


I fixed up the libpng.so.2 by loading module linpng10-1.0.12-4.i386.rpm

But now I get the error when doing httpd -D vwh_php4_module

Syntax error on line 246 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/libphp4.so into server: /etc/httpd/modules/libphp4.so: undefined symbol: gdImageStringFT

Anyone have any ideas?

Thanks

jks
02-24-2002, 08:54 AM
Originally posted by fulcan
ok, I did the following and got the following error message.

httpd -D vwh_php4_module

Syntax error on line 246 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/libphp4.so into server: libpng.so.2: cannot open shared object file: No such file or directory

on line 246 in httpd.conf (with "if define" around it)

LoadModule php4_module modules/libphp4.so


I fixed up the libpng.so.2 by loading module linpng10-1.0.12-4.i386.rpm

But now I get the error when doing httpd -D vwh_php4_module

Syntax error on line 246 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/libphp4.so into server: /etc/httpd/modules/libphp4.so: undefined symbol: gdImageStringFT

Anyone have any ideas?

Thanks

I would suggest that you recompile PHP, and actually read the output from the ./configure command :-)

That would have warned you of all these missing libraries.