Fixing “no input file specified” error with .htaccess or php.ini

This error usually occurs on hosting, because of the way they have PHP installed.

 

Method 1: If you are using Virtualmin, you should change the PHP script execution mode, the default mode is "FCGId (run as virtual server owner)". You should change it to "Apache mod_php (run as Apache's user)". After changing the execution mode, you need to restart Apache service.

 

Method 2: Quick fix for Joomla and Magento on Apache server with .htaccess

The following method should work if you get "No input file specified" error message while installing a content management or eCommerce system on Apache server. It can be Joomla, Magento, or other platform that uses "index.php" as part of SEO friendly URLs. 


Add the code below to your .htaccess file in the directory of your site on the server.


If you don't have .htaccess file there, just create a text file on your computer, paste the code, upload it to your server, and rename it to ".htaccess":

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^index.php/(.*)$ [L]


Note: if your site is not in the root of your domain name,

for example, in a subfolder named "yourdirectory":

http://yourDomain/yourDirectory/

then replace this:


RewriteBase /


with:


RewriteBase /yourDirectory/

 

Method 3: Fixing "No input file specified" error by editing php.ini file

 
The following should work if PHP runs in CGI mode, like on shared/Deluxe hosting from goDaddy.

 

 

Add the following to php.ini (or create a text file, paste the code, upload to the root directory of your site and rename it to php.ini):

 
cgi.fix_pathinfo = 1
 
 
Note for goDaddy users
If your site is hosted with goDaddy, the file should be named php5.ini.
 
If you uploaded a new php5.ini file, instead of editing the existing one, most likely it won't take effect right away, it should start working after the server is rebooted.

Revisions

One Response to “Fixing “no input file specified” error with .htaccess or php.ini”

  1. coupon levitra 03/04/2018 at 9:58 am #

    Hi colleagues, its fantastic paragraph concerning tutoringand entirely defined, keep it up all the time.

Leave a Reply