I have installed httpd24 with php72 by scl in a CentOS 6.10 x86-64 environment. But Apache doesn't render php files and display them as text.

Installed php using,

yum install php72-php php72-php-iconv php72-php-mbstring php72-php-curl php72-php-openssl php72-php-tokenizer php72-php-xmlrpc php72-php-soap php72-php-ctype php72-php-zip php72-php-gd php72-php-simplexml php72-php-spl php72-php-pcre php72-php-dom php72-php-xml php72-php-xml php72-php-intl php72-php-json php72-php-mysqlnd php72-php-ldap

When I run,

apachectl -M | grep php


php7_module (shared)

When I run,

php -v


PHP 7.2.14 (cli) (built: Jan 8 2019 11:55:37) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

There was no php72-php.conf file created in /opt/rh/httpd24/root/etc/httpd/conf.d/ at the time of php72 installation. The php72-php.conf file was created in /etc/httpd/conf.d/ instead.

When I try to manually copy the php72-php.conf file to /opt/rh/httpd24/root/etc/httpd/conf.d/, it won't allow me to restart httpd24-httpd service and gives the below error;

Stopping httpd: [ OK ]
Starting httpd: httpd: Syntax error on line 353 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf : Syntax error on line 9 of /opt/rh/httpd24/root/etc/httpd/conf.d/php72-php.conf : Cannot load modules/libphp72.so into server: /opt/rh/httpd24/root/etc/httpd/modules/libphp72.so: undefined symbol: unixd_config [FAILED]


I was having the same issue, and this was the solution:

yum install php-fpm

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.