[php] No input file specified

I'm running Anchor CMS and I just upgraded to version 0.8. When I try and run the installer I get a 'No input file specified' error. I believe it's more than likely a .htaccess problem but I'm not sure what the correct settings should be.

My site can be found here.

My .htaccess is set to:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase {base}

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs to index.php/URL
RewriteRule ^(.*)$ {index} [L]
</IfModule>

<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php
</IfModule>

I'm also using a GoDaddy as the hosting provider if that helps.

This question is related to php apache .htaccess mod-rewrite anchor-cms

The answer is


The solution for me was to remove white space in one of my helper files. The error listed two pages involved, a CI session file and one of my custom helpers.


In my case, I fixed it by butting the rules inside a LocationMatch Directive

<LocationMatch "^/.">
    #your rewrite rules here
</LocationMatch>

/. matches any location

I have the rewrite rules inside one of the .conf files of Apache NOT .htaccess file.

I don't know why this worked with me, this is my current setup

  • Apache version 2.4
  • PHP 7.1
  • OS Centos 7
  • PHP-FPM

Run ulimit -n 2048

And restart php/php-fpm


disabling PHP-FPM fixed my issue.



Update


All the previous reviews were tested by me, but there was no solution. But I did not give up.

SOLUTION

Uncomment the following lines in my NGINX configuration

   [/etc/nginx/site-avaible/{sitename}.conf]

The same code should follow in the site-enable folder

  #fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;

And comment this:

  fastcgi_param SCRIPT_FILENAME / www / {namesite} / public_html $ fastcgi_script_name;

I changed several times from the original:

   #fastcgi_pass unix: /var/php-nginx/9882989289032.sock;

Going back to this:

   #fastcgi_pass 127.0.0.1:9007;

And finally I found what worked ...

   fastcgi_pass localhost: 8004;

I also recommend these lines...

   #fastcgi_index index.php;
   #include fastcgi_params;

And even the FastCGI timeout (only to improve performance)

  fastcgi_read_timeout 3000;

During the process, I checked the NGINX log for all modifications. (This is very important because it shows the wrong parameter.) In my case it is like this, but it depends on the configuration:

  error_log/var/log/nginx/{site}_error_log;

Test the NGINX Configuration

 nginx -t

Attention this is one of the options ... Well on the same server, what did not work on this site works on others ... So keep in mind that the settings depends on the platform.

In this case it was for Joomla CMS.


Adding php5.ini doesn't work at all. But see the 'Disable FastCGI' section in this article on GoDaddy: http://support.godaddy.com/help/article/5121/changing-your-hosting-accounts-file-extensions

Add these lines to .htaccess files (webroot & website installation directory):

Options +ExecCGI
addhandler x-httpd-php5-cgi .php

It saves me a day! Cheers! Thanks DragonLord!


I had the same problem. All I did to fix the issue was to modify my htacces file like this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /crm/

Options +FollowSymLinks 

RewriteCond %{HTTP_HOST} ^mywebsite.com [NC] 

RewriteRule ^(.*)$ http://www.mywebsite.com/$1 [L,R=301] 

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L]

RewriteRule ^index.php/(.*)$ [L]
</IfModule>

In my case, there were an error in the php.ini open_basedir variable.


It worked for me..add on top of .htaccess file. It would disable FastCGI on godaddy shared hosting account.

Options +ExecCGI

addhandler x-httpd-php5-cgi .php


GoDaddy is currently (Feb '13) supporting modification of FastCGI for some accounts using PHP 5.2.x or earlier. See GoDaddy article "Disabling FastCGI in Your Hosting Account".
(In my case, this is apparently necessary to help get the current version of LimeSurvey (2.0) towards a running state.)


Citing http://support.statamic.com/kb/hosting-servers/running-on-godaddy :

If you want to use GoDaddy as a host and you find yourself getting "No input file specified" errors in the control panel, you'll need to create a php5.ini file in your weboot with the following rule:

cgi.fix_pathinfo = 1

best easy answer just one line change and you are all set.

recommended for godaddy hosting.


Examples related to php

I am receiving warning in Facebook Application using PHP SDK Pass PDO prepared statement to variables Parse error: syntax error, unexpected [ Preg_match backtrack error Removing "http://" from a string How do I hide the PHP explode delimiter from submitted form results? Problems with installation of Google App Engine SDK for php in OS X Laravel 4 with Sentry 2 add user to a group on Registration php & mysql query not echoing in html with tags? How do I show a message in the foreach loop?

Examples related to apache

Enable PHP Apache2 Switch php versions on commandline ubuntu 16.04 Laravel: PDOException: could not find driver How to deploy a React App on Apache web server Apache POI error loading XSSFWorkbook class How to enable directory listing in apache web server Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details How to enable php7 module in apache? java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing while starting Apache server on my computer

Examples related to .htaccess

Use .htaccess to redirect HTTP to HTTPs Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04 Server unable to read htaccess file, denying access to be safe Laravel 5 – Remove Public from URL Laravel 5 not finding css files How can I fix the 'Missing Cross-Origin Resource Sharing (CORS) Response Header' webfont issue? How Can I Remove “public/index.php” in the URL Generated Laravel? Apache 2.4 - Request exceeded the limit of 10 internal redirects due to probable configuration error Forbidden You don't have permission to access / on this server Htaccess: add/remove trailing slash from URL

Examples related to mod-rewrite

Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04 Forbidden You don't have permission to access / on this server Htaccess: add/remove trailing slash from URL Permission denied: /var/www/abc/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable? 404 Not Found The requested URL was not found on this server Redirect all to index.php using htaccess .htaccess not working on localhost with XAMPP URL rewriting with PHP No input file specified htaccess redirect to https://www

Examples related to anchor-cms

No input file specified