[Apache][PHP] libphp4.so: cannot open shared object file: No such file or directory
I was building an Apache2 + PHP4 server configuration, and when I started Apache, I got an error saying libphp4.so was missing.
service httpd start
httpd: Syntax error on line 63 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp4.so into server: /usr/local/apache2/modules/libphp4.so: cannot open shared object file: No such file or directory
I checked the path of libphp4.so and fixed httpd.conf to point to the correct location, which resolved the issue.
# find / -name libphp4.so
/usr/local/src/php-4.4.9/libs/libphp4.so
/usr/local/src/php-4.4.9/.libs/libphp4.so
/usr/lib64/httpd/modules/libphp4.so
# vim /usr/local/apache2/conf/httpd.conf
LoadModule php4_module /usr/lib64/httpd/modules/libphp4.so
That’s all.
That’s all from the Gemba.