简体   繁体   中英

Error for Apache2.2.15 configuration with PHP5

I am trying to configure apache 2.2.15 with php5 in my linux system. I have installed both of them. But when I added libphp5.so module in httpd.conf of apache, it has given the following error while starting the server:

Starting httpd: httpd: Syntax error on line 202 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: undefined symbol: ap_unixd_config

Can anybody tell me how to fix this, as I tried every possible solution by googling it but in vain?

Some newer PHP versions may not be compatible with Apache2.2 . This error occurs because the function ap_unixd_config is in Apache2.2 still called unixd_config .

Try to use Apache2.4 if you need to use this PHP version, otherwise you can use an older version of PHP.

This also happens on Arch Linux when one doesn't upgrade Apache 2.2 to Apache 2.4. So if you are using Arch Linux you need to downgrade php-apache package to the version that works for you. php-apache-5.5.8-1 is still OK, whereas 5.5.11-1 is not.

On RedHat Apache2 and PHP installation is done by issuing the following commands (as root):

yum install httpd httpd-devel php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
/etc/init.d/httpd start

That's all. (I'm following this tutorial .) You may add or remove some php extensions to or from the list of packages to be installed if so desired.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM