2016年6月3日 星期五

[Gentoo][apache] Cannot load modules/libphp5.so into server

happy@localhost /etc/apache2/modules.d $ sudo /etc/init.d/apache2 start
 * apache2 has detected an error in your setup:
apache2: Syntax error on line 153 of /etc/apache2/httpd.conf: Syntax error on line 14 of /etc/apache2/modules.d/70_mod_php5.conf: Cannot load modules/libphp5.so into server: /usr/lib64/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory
 * ERROR: apache2 failed to start


List modules under apache2
happy@localhost /usr/lib64/apache2/modules $ ls -al
mod_php.so -> /usr/lib64/php5.6/bin/../apache2/libphp5.so


Edit httpd.conf
vim /etc/apache2/httpd.conf
add following string
LoadModule php5_module modules/mod_php.so


restart apache, then done.


Reference:


Note:


Apache include php flow
install apache
install php (library)
Settings
–> /etc/conf.d/apache2
–> /etc/apache2/modules.d/00_default_settings.conf (Default settings)
–> /etc/apache2/httpd.conf (Load Module)

0 意見:

張貼留言