No input file specified. Godaddy |
Help! After days and trying every combination of .htaccess and config.php I could find, I still have "No input file specified".
CodeIgniter will bring up the welcome screen as long as I don't try to call a controller, but fails on any one I try. such as; http://mysite.org/CodeIgniter/index.php/main or http://mysite.org/CodeIgniter/main with .htaccess Site is Godaddy shared Economy Linux hosting (Yes I wish it was a different host) with Wordpress and Wordfence installed in the root. CodeIgniter is installed in: /CodeIgniter PHP Version 5.6.27 The problem seems to be the way Godaddy handles paths, but I'm not smart enough to figure it out. These entries are in the error log: DEBUG - 2017-12-08 10:20:59 --> No URI present. Default controller set. INFO - 2017-12-08 10:20:59 --> File loaded: /home/content/50/8634350/html/CodeIgniter/application/views/welcome_message.php Here are some server varibles, both ran from directory /test: Working site: _SERVER['DOCUMENT_ROOT']: /home1/raymayna/public_html _SERVER['SUBDOMAIN_DOCUMENT_ROOT']: _SERVER['HTTP_HOST']: mysite.com _SERVER['SERVER_NAME']: mysite.com Current Path: /home1/raymayna/public_html/test Non working Godaddy site: _SERVER['DOCUMENT_ROOT']: /var/chroot/home/content/50/8634350/html _SERVER['SUBDOMAIN_DOCUMENT_ROOT']: /var/chroot/home/content/50/8634350/html _SERVER['HTTP_HOST']: mysite.org _SERVER['SERVER_NAME']: mysite.org Current Path: /home/content/50/8634350/html/test Note the differences in DOCUMENT_ROOT and Current path on the Godaddy site. Here is my CodeIgniter configuration: config.php $config['base_url'] = 'http://mysite.org/CodeIgniter/'; $config['uri_protocol'] = 'REQUEST_URI'; Also tried, $config['uri_protocol'] = 'QUERY_STRING'; $config['index_page'] = 'index.php'; with no .htaccess in /CodeIgniter Also tried, $config['index_page'] = ''; with the following .htaccess in /CodeIgniter; .htaccess RewriteEngine On RewriteCond %{REQUEST_URI} ^/system.* RewriteRule ^(.*)$ index.php?/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ index.php?/$1 [L] I am wondering if Wordfence is my problem, as there is this in the PHP configuration: auto_prepend_file /home/content/50/8634350/html/wordfence-waf.php And this in /user.ini ; Wordfence WAF auto_prepend_file = '/home/content/50/8634350/html/wordfence-waf.php' ; END Wordfence WAF The root also has an .htaccess with the following, which is the way I inherited this can of worms; RewriteEngine on RewriteRule ^6052317648/(.*)$ inconvertible-exclaiming.php [QSA,L] RewriteEngine On RewriteCond %{ENV:REDIRECT_STATUS} 200 RewriteRule ^ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{HTTP_USER_AGENT} (google|yahoo|msn|aol|bing) [OR] RewriteCond %{HTTP_REFERER} (google|yahoo|msn|aol|bing) RewriteRule ^(.*)$ ironwood-insure.php?$1 [L] # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # Wordfence WAF <Files ".user.ini"> <IfModule mod_authz_core.c> Require all denied </IfModule> <IfModule !mod_authz_core.c> Order deny,allow Deny from all </IfModule> </Files> # END Wordfence WAF Also I was testing to see if mod_rewrite was working and found that this doesn't work on the Godaddy site, but does on working site. RewriteRule ^link([^/]*).html$ rewrite.php?link=$1 [L] If I explicitly set the base like this it works on Godaddy. RewriteBase /test/ RewriteRule ^link([^/]*).html$ rewrite.php?link=$1 [L] I don't need to get rid of needing index.php, as this is for a backend application, I just need it to work. Has anyone gotten CodeIgniter to work on a similar configuration?
If you search the forums you will find what your looking for, I do not have the links.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
I have worn out the Google search engine looking for a solution. There are many instances of this going back to 2008. I have tried at least 20 combinations of .htaccess and various configurations in config.php, none of which have had any effect. To further frustrate my efforts, Godaddy does not provide error logging for this account. As of now I am running CodeIgniter on Bluehost and just linking pages from the Godaddy site. but hoped to get it working on Godaddy. Godaddy support is useless.
Try to set Options and DirectoryIndex.
Code: Options +FollowSymLinks -MultiViews -Indexes (12-09-2017, 08:33 AM)jreklund Wrote: Try to set Options and DirectoryIndex.
Does it really need to be a subfolder from mysite.org? Create a subdomain like backend.mysite.org, so it won't inherit any other rules.
I gave up. There appears to be no way to run Codeigniter on this type of Godaddy account. They have a lot of different plans and apparently some work, but not this one. Something in the way they handle paths completely screws up Codeigniter. Just when you think you have it working, it throws another error about variables or files not found.
Try this code
RewriteEngine On RewriteBase / #Removes access to the system folder by users. #Additionally this will allow you to create a System.php controller, #previously this would not have been possible. #'system' can be replaced if you have renamed your system folder. RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ /index.php?/$1 [L] #When your application folder isn't in the system folder #This snippet prevents user access to the application folder #Submitted by: Fabdrol #Rename 'application' to your applications folder name. RewriteCond %{REQUEST_URI} ^application.* RewriteRule ^(.*)$ /index.php?/$1 [L] #Checks to RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] |
Welcome Guest, Not a member yet? Register Sign In |