Codeigniter “No input file specified.” error when submitting form? |
[eluser]ErinKabbash[/eluser]
I am stuck and cannot seem to figure my issue out. I am trying to write a basic "Contact Us Form" using Codeigniter for the first time. My form on my view looks like this.. Code: <div left; padding-right: 55px; padding-left: 35px;'> and my controller pages.php looks like this.. Code: <?php I have the "emailsender" function just redirecting me back to the same page as a test, but it won't even do that?! I get a "No input file specified." error every time. My config file looks like this.. Code: /* any finally my .htaccess looks like this.. Code: RewriteEngine On When I click on the submit button for the form it sends me to /index.php/pages/emailsender and displays the "No input file specified." Error. I am using a GoDaddy Server, not sure if that makes a difference.
[eluser]WanWizard[/eluser]
That makes a world of difference. Just Google "codeigniter godaddy no input file" and you know why...
[eluser]ErinKabbash[/eluser]
I have Googled the issue and posted to multiple forms. Can you please describe the solution? I have tried to change my .htaccess file as suggested on Google and also tried to edit the config.php file as stated on Google. Neither seems to fix the issue? My .htaccess is (Includes the ? after index.php as suggested on google).. RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) index.php?/$1 In my config.php I have.. $config['base_url'] = 'http://mysite.com'; $config['index_page'] = ""; $config['uri_protocol'] = "AUTO";
[eluser]ErinKabbash[/eluser]
After hours of banging my head against the wall I solved my own problem.. you need to use the direct link instead of the short hand of the form open tag.. like this.. echo form_open('http://mysite.com/welcome/emailsender'); instead of this.. echo form_open('welcome/emailsender');
[eluser]Tpojka[/eluser]
I don't know if you have different practice, but everyone I saw coding (including myself) is using forslash at the end in value for base_url key: Code: $config['base_url'] = 'http://site.tld/';
[eluser]CroNiX[/eluser]
@Tpojka, yeah that's correct. It even states that right there in the config file notes where you set it in config (which the OP copy/pasted): Quote:URL to your CodeIgniter root. Typically this will be your base URL, WITH a trailing slash: http://example.com/ The CI internal functions depend on it being set correctly, WITH the trailing slash. Unless that is fixed, you can expect problems elsewhere. |
Welcome Guest, Not a member yet? Register Sign In |