Page 1 of 1

PHP files not rendered

Posted: Tue Jul 14, 2015 1:58 am
by dhardison
I've installed ntPHPSelector and chosen to have a directory use PHP 5.5 ( the server's default is 5.3 )

The .htaccess file is added correctly to the directory chosen, and contains only the following:

AddHandler application/x-httpd-php55 .php55 .php

When browsing the php files placed in the directory chosen, the browser does not display the page as expected, but prompts the user to download the file. When opened, the downloaded file shows the php source code.

The suphp log file just shows that the file was processed. ( [info] Executing ... )
There are no errors in the apache log, the response code is 200.

PHP files using the standard x-httpd-php handler work fine.

The setup is cPanel with WHM 11.50.0 (build 23)
Apache 2.2.21

Any ideas why the PHP files are not being processed?

Thanks

Re: PHP files not rendered

Posted: Tue Jul 14, 2015 3:32 am
by Anthony
Hello,

Check file /usr/local/apache/conf/includes/pre_main_global.conf ; it should have the following entries in it.

==========
Include /usr/local/apache/conf/php52.conf
Include /usr/local/apache/conf/php54.conf
Include /usr/local/apache/conf/php55.conf
==========

Once it is added restart Apache.

If the issue persists even the above step is done, please open a support ticket with server login. Please make sure to add this thread as reference.

Re: PHP files not rendered

Posted: Fri Jul 17, 2015 6:38 pm
by dhardison
Hi Anthony,

I found the issue to be that when the conf was altered, the first 'Include...' line was not placed on a line by itself. It was appended to the end of the line above it, which was causing the conf file not to parse.
Editing by hand, and placing the Include file on its own line, and restarting httpd, fixed the issue.

Thanks

Re: PHP files not rendered

Posted: Sat Jul 18, 2015 1:10 am
by Anthony
Glad to hear that you could sort it out.