3

I'm configuring a new web server on a RedHat 6.5 and am trying to enable the php5 module on Apache 2.4.6:

LoadModule php5_module /usr/path/to/libphp5.so
AddType application/x-httpd-php .php
  • When I check httpd.conf with Apache, I get the following error about the LoadModule's line:
    Cannot load /usr/path/to/libphp5.so into server: /usr/path/to/libphp5.so: 
    undefined symbol: unixd_config
    

I wonder if the problem is because I have two PHP versions installed? The one Apache should use is the alias php55; what is the configuration for it?

5 Answers 5

3

The Apache API changed from 2.2 to 2.4, with unixd_config renamed to ap_unixd_config (see API changes from 2.2 to 2.4).

You need a PHP module version that is compatible with Apache 2.4, else stay with Apache 2.2.

3
  • And where can I get the good module version? Nov 16, 2014 at 12:59
  • For sure the right versions is available in Red Hat packages, unfortunately I can't help you further with this (I'm always with Debian). If you install standard packages you should be allright.
    – Zimmi
    Nov 16, 2014 at 16:45
  • @Zimm I've same issue in debian7, php 5.6 and apache2.4.10 any multiple time installed php and apache and module but still same issue. Can you tell me how to solve it ? Dec 15, 2016 at 12:04
0
rpm -ql apache-mod_php-7.3.17-1.mga7
  /etc/httpd/conf/modules.d/00-php-fpm.conf
  /etc/httpd/conf/modules.d/70_mod_php.conf
  /usr/lib/.build-id
  /usr/lib/.build-id/e1
  /usr/lib/.build-id/e1/a7d9b6acb73030cd6809458ba4fd2bd91b66f7
  /usr/lib64/httpd/modules/mod_php.so

head -n 1 /etc/httpd/conf/modules.d/00-php-fpm.conf 
  requires apache-mod_proxy (mod_proxy.so + mod_proxy_fcgi.so)

urpmi apache-mod_proxy

This is for Mageia; for other operating systems, use package manager specific to that OS.

0

I used the following and built libphp5.so on my own:

<FilesMatch \.php$>
  SetHandler application/x-httpd-php
</FilesMatch>
PHPIniDir "/path/to/php/lib"
0

The correct approach is to install the following package, replacing php55 with desired version:

yum install rh-php55-php
  • Software is pulled from RH Software Collection, and this package contains the module, often referred to as mod_php, which adds support for php to Apache 2.4.
0

One reason for getting undefined symbol: unixd_config can be if your LoadModule name was wrong.

For example, LoadModule was_app22_module /opt/IBM/WebSphere/Plugins/bin/64bits/mod_was_ap22_http.so will cause this error because was_app22_module has an extra p; it should be was_ap22_module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.