Blog

Temporary Url not working with FastCGI

Tags: AddHandlerfastcgiphp -fcgitemporary URL

Published on: October 4, 2014 by Felix

Temporary Url not working with FastCGI

Scenario:

Sometimes you may come across the issue that the temporary URL not working for the PHP file. On servers running  FastCGI as PHP handler, it is not possible to run PHP files via temporary url such as http://SERVER_IP/~username/index.php . But you will be able to view HTML files. 

Before you proceed make sure the web hosting company allows the use of temporary url.

You can follow the below steps for working this around:

  1.   In the user’s public_html/cgi-bin directory, create a file called php5.fcgi and give it permissions 755, and add the following content :

#!/bin/sh

 export PHP_FCGI_CHILDREN=1

export PHP_FCGI_MAX_REQUESTS=10

exec /usr/local/cpanel/cgi-sys/php5

2. Then add the following lines to the .htaccess file in user’s public_html/ directory :

AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php5.fcg

Get 24/7 expert server management

Category : Apache, Linux, Troubleshooting

Felix

Felix

Firaz has been in the Web Hosting industry since 2012. He is always fascinated in resolving complicated DNS, cPanel and other Web hosting issues. He loves to help newbies to climb the hill from a fresher to an experienced System admin. Movies and songs are his favourite passtime.

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Categories

Your Cart

Cart is empty.

Subtotal
₹0.00
APPLY
0
Send this to a friend