PHP files not rendered

cPanel plugin for php selection
Locked
dhardison
Posts: 0
Joined: Tue Jul 14, 2015 1:47 am

PHP files not rendered

Post 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


Anthony
Posts: 1
Joined: Fri May 01, 2015 3:26 pm

Re: PHP files not rendered

Post 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.


dhardison
Posts: 0
Joined: Tue Jul 14, 2015 1:47 am

Re: PHP files not rendered

Post 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


Anthony
Posts: 1
Joined: Fri May 01, 2015 3:26 pm

Re: PHP files not rendered

Post by Anthony »

Glad to hear that you could sort it out.


If you are looking for assistance in server management, please get in touch with our support.
Locked