I'm configuring a new web server on a RedHat 6.5.

I try to enable the php5 module on Apache 2.4.6 as following:

LoadModule php5_module /usr/path/to/libphp5.so
AddType application/x-httpd-php .php

When I check the httpd.conf file 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've two PHP versions installed. The one Apache should use is the alias php55, what is the configuration to do for it ?

share|improve this question

The Apache API changed from 2.2 to 2.4, unixd_config was renamed 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 or stay with Apache 2.2.

share|improve this answer
    
And where can I get the good module version? – Fractaliste Nov 16 '14 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 '14 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 ? – Nullpointer Dec 15 '16 at 12:04
up vote 0 down vote accepted

Finally I use:

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

And I build libphp5.so by my own.

share|improve this answer

The correct approach is to install the following package. Replace php55 with your desired version here. Software is pulled from RH Software Collection. This package contains the module (often referred to as mod_php) which adds support for php to Apache 2.4

yum install rh-php55-php

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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