• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Internal Server Error by using files with file extension .php5

Thomas Becker

Basic Pleskian
Hello,
when I create a simple php file with file extension .php5 and try to open it in a browser I'll get an internal server error.

Renaming the same file to info.php (former info.php5) everything is working as expected.

error_log:
(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
Premature end of script headers: info.php5

Server is running CentOS 6.4, PHP 5.3 and Plesk 11.0.9 Update #55
Website is running as FastCGI

Any ideas?

Thanks for help.

Greets
Thomas
 
Last edited:
Do you have defined corresponding FCGIWrapper for .php5 extension in vhost config files?
 
Thanks, Igor.

I did it the following way.



1. Create a file called "vhost.conf" in the directory "/var/www/vhosts/example.com/conf/" and insert:

<IfModule mod_fcgid.c>
<Files ~ (\.php5)>
SetHandler fcgid-script
FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php5
Options +ExecCGI
allow from all
</Files>
</IfModule>

2. Change owner and rights:

chmod 640 vhost.conf
chown root:apache vhost.conf

3. Reconfigure vhost:

/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain example.com
or
/usr/local/psa/admin/sbin/httpdmng --reconfigure-all

4. Restart Apache
 
Last edited:
Back
Top