You are viewing an old revision of this post, from June 2, 2015 @ 15:26:25. See below for differences between this version and the current revision.

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

Revision Differences

June 2, 2015 @ 15:26:25Current Revision
Content
Unchanged: <p>Unchanged: <p>
Deleted: <span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">This error usually occurs on goDaddy hosting, because of the way they have PHP installed.</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" /> Added: <span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">This error usually occurs on hosting, because of the way they have PHP installed.</span>
 Added: </p>
 Added: <p>
Unchanged: &nbsp;Unchanged: &nbsp;
Unchanged: </p>Unchanged: </p>
Unchanged: <h2>Unchanged: <h2>
 Added: Method 1: If you are using Virtualmin, you should change the&nbsp;PHP script execution mode, the default mode is &quot;FCGId (run as virtual server owner)&quot;. You should change it to &quot;Apache mod_php (run as Apache&#39;s user)&quot;. After changing the execution mode, you need to restart Apache service.
 Added: </h2>
 Added: <p>
 Added: &nbsp;
 Added: </p>
 Added: <h2>
Deleted: Method 1: Quick fix for Joomla and Magento on Apache server with .htaccess Added: Method 2: Quick fix for Joomla and Magento on Apache server with .htaccess
Unchanged: </h2>Unchanged: </h2>
Unchanged: <p>Unchanged: <p>
Unchanged: <span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">The following method should work if you get &quot;</span><span style="font-size: 18.3600006103516px; line-height: 25.7040004730225px; font-family: 'Courier New', Courier, monospace">No input file specified</span><span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">&quot; error message while installing a content management or eCommerce system on Apache server. It can be Joomla, Magento, or other platform that uses &quot;</span><span style="font-size: 18.3600006103516px; line-height: 25.7040004730225px; font-family: 'Courier New', Courier, monospace">index.php</span><span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">&quot; as part of SEO friendly URLs.&nbsp;</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">The following method should work if you get &quot;</span><span style="font-size: 18.3600006103516px; line-height: 25.7040004730225px; font-family: 'Courier New', Courier, monospace">No input file specified</span><span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">&quot; error message while installing a content management or eCommerce system on Apache server. It can be Joomla, Magento, or other platform that uses &quot;</span><span style="font-size: 18.3600006103516px; line-height: 25.7040004730225px; font-family: 'Courier New', Courier, monospace">index.php</span><span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">&quot; as part of SEO friendly URLs.&nbsp;</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: <br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: <span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">Add the code below to your .htaccess file in the directory of your site on the server.</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">Add the code below to your .htaccess file in the directory of your site on the server.</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: <br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Deleted: <span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">If you don&#039;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 &quot;.htaccess&quot;:</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" /> Added: <span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">If you don&#39;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 &quot;.htaccess&quot;:</span>
 Added: </p>
 Added: <p>
Deleted: <span style="font-size: 18.3600006103516px; line-height: 25.7040004730225px; font-family: 'Courier New', Courier, monospace"><br /> Added: <span style="font-size: 18.3600006103516px; line-height: 25.7040004730225px; font-family: 'Courier New', Courier, monospace">RewriteEngine On<br />
Deleted: RewriteEngine On<br />  
Unchanged: RewriteBase /<br />Unchanged: RewriteBase /<br />
Unchanged: RewriteRule ^index\.php$ - [L]<br />Unchanged: RewriteRule ^index\.php$ - [L]<br />
Unchanged: RewriteCond %{REQUEST_FILENAME} !-f<br />Unchanged: RewriteCond %{REQUEST_FILENAME} !-f<br />
Unchanged: RewriteCond %{REQUEST_FILENAME} !-d<br />Unchanged: RewriteCond %{REQUEST_FILENAME} !-d<br />
Unchanged: RewriteRule . /index.php [L]<br />Unchanged: RewriteRule . /index.php [L]<br />
Unchanged: RewriteRule ^index.php/(.*)$ [L]</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: RewriteRule ^index.php/(.*)$ [L]</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: <br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: <i>Note: if your site is not in the root of your domain name,</i><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <i>Note: if your site is not in the root of your domain name,</i><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: <span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">for example, in a subfolder named &quot;yourdirectory&quot;:</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">for example, in a subfolder named &quot;yourdirectory&quot;:</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: <span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" >http://yourDomain/ yourDirectory/</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" >http://yourDomain/ yourDirectory/</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: <span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">then replace this:</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <span style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">then replace this:</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: <br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: <span style="font-size: 18.3600006103516px; line-height: 25.7040004730225px; font-family: 'Courier New', Courier, monospace">RewriteBase /</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <span style="font-size: 18.3600006103516px; line-height: 25.7040004730225px; font-family: 'Courier New', Courier, monospace">RewriteBase /</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: <br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: <span style="font-family: inherit;font-size: 18.3600006103516px; line-height: 25.7040004730225px" >with:</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <span style="font-family: inherit;font-size: 18.3600006103516px; line-height: 25.7040004730225px" >with:</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: <br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: <span style="font-size: 18.3600006103516px; line-height: 25.7040004730225px; font-family: 'Courier New', Courier, monospace">RewriteBase /</span><span style="font-size: 18.3600006103516px; line-height: 25.7040004730225px; font-family: 'Courier New', Courier, monospace">yourDirectory/</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />Unchanged: <span style="font-size: 18.3600006103516px; line-height: 25.7040004730225px; font-family: 'Courier New', Courier, monospace">RewriteBase /</span><span style="font-size: 18.3600006103516px; line-height: 25.7040004730225px; font-family: 'Courier New', Courier, monospace">yourDirectory/</span><br style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px" />
 Added: <br />
 Added: <br />
Unchanged: &nbsp;Unchanged: &nbsp;
Unchanged: </p>Unchanged: </p>
Unchanged: <h2>Unchanged: <h2>
Deleted: Method 2: Fixing &quot;No input file specified&quot; error by editing php.ini file Added: Method 3: Fixing &quot;No input file specified&quot; error by editing php.ini file
Unchanged: </h2>Unchanged: </h2>
Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">
Unchanged: &nbsp;Unchanged: &nbsp;
Unchanged: </div>Unchanged: </div>
Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">
Deleted: The following should work if PHP runs in CGI mode, like on shared/Deluxe hosting from goDaddy.<br /> Added: The following should work if PHP runs in CGI mode, like on shared/Deluxe hosting from goDaddy.
 Added: <p>
 Added: &nbsp;
Deleted: <br /> Added: </p>
 Added: <p>
 Added: &nbsp;
 Added: </p>
 Added: <p>
Unchanged: 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):Unchanged: 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):
 Added: </p>
Unchanged: </div>Unchanged: </div>
Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">
Unchanged: &nbsp;Unchanged: &nbsp;
Unchanged: </div>Unchanged: </div>
Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">
Unchanged: <span style="font-family: 'Courier New', Courier, monospace">cgi.fix_pathinfo = 1</span>Unchanged: <span style="font-family: 'Courier New', Courier, monospace">cgi.fix_pathinfo = 1</span>
Unchanged: </div>Unchanged: </div>
Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">
Unchanged: &nbsp;Unchanged: &nbsp;
Unchanged: </div>Unchanged: </div>
Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">
Unchanged: &nbsp;Unchanged: &nbsp;
Unchanged: </div>Unchanged: </div>
Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">
Unchanged: <i>Note for goDaddy users</i>Unchanged: <i>Note for goDaddy users</i>
Unchanged: </div>Unchanged: </div>
Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">
Unchanged: If your site is hosted with goDaddy, the file should be named php5.ini.Unchanged: If your site is hosted with goDaddy, the file should be named php5.ini.
Unchanged: </div>Unchanged: </div>
Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">
Unchanged: &nbsp;Unchanged: &nbsp;
Unchanged: </div>Unchanged: </div>
Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">Unchanged: <div style="font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 18.3600006103516px; line-height: 25.7040004730225px">
Deleted: If you uploaded a new php5.ini file, instead of editing the existing one, most likely it won&#039;t take effect right away, it should start working after the server is rebooted. Added: If you uploaded a new php5.ini file, instead of editing the existing one, most likely it won&#39;t take effect right away, it should start working after the server is rebooted.
Unchanged: </div>Unchanged: </div>

Note: Spaces may be added to comparison text to allow better line wrapping.

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