Problem with Form Validation and Htaccess file |
[eluser]DavidHopkins[/eluser]
Cheers, I shall carryon having a dig about, its deffo something with the htaccess and how its dealing with my post, i shall see ! Dave
[eluser]InsiteFX[/eluser]
Dave, I will be on later. But until then try setting a route to that controller/method in ./application/config/routes.php Code: $route['login/ProcessLogin'] = 'login/ProcessLogin';
[eluser]InsiteFX[/eluser]
Dave, I set this up on my system and it runs fine coded like below with index.php removed. ./application/config/autoload.php Add the url and form helpers. ./application/controllers/login.php Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ./application/views/login.php Code: <div id="LoginContainer"> Code: // link keyed into browser // and the var_dump okarray(4) { ["cid"]=> string(3) "300" ["email"]=> string(13) "[email protected]" ["pass"]=> string(6) "202020" ["Submit"]=> string(6) "Log In" } I think it was trying to use the url_helper before it was loaded... Or because the input submit was missing the name=""
[eluser]CroNiX[/eluser]
You might need to use a different method for $config['uri_protocol'] in /application/config/config.php
[eluser]InsiteFX[/eluser]
Thanks CroNix, I forgot to mention what I was using. I am using Code: $config['uri_protocol'] = 'REQUEST_URI';
[eluser]DavidHopkins[/eluser]
Hey Guys, Sorry to say none of the above has worked =[ I have however got a firefox addon, Live HTTP headers and discovered something intresting. When i use no htaccess file and make use of index.php i get the following output Quote:http://client.domain.co.uk/index.php/login/ProcessLogin However when i use the htaccess and remove index.php i get this output Quote:http://client.domain.co.uk/login/ProcessLogin I seem to get a HTTP/1.1 404 Not Found, im not sure why this is occurring. It is probably a server issue maybe ? Or is it something htaccess can resolve? Mnay Thanks David
[eluser]gazza7364[/eluser]
This is just a thought, have you enabled rewrite in your web server, if you are using Apache 2 you need to enable this in mods_enabled, this can be done from the cli with sudo a2enmod rewrite. Also you need to set-up your default web directory with something like the following:- DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride all </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny allow from all </Directory> Any just a thought, you may have done this already. I use ubuntu and this is what I forgot to do, thinking it was set by default.
[eluser]InsiteFX[/eluser]
He already stated that hes running wordpress and that .htaccess file is working.
[eluser]InsiteFX[/eluser]
Dave this is the FireBug info I am getting Code: localhost/apptesting/index.php/login/process_login Code: localhost/apptesting/login/process_login Can you please show us your ./application/config/routes.php file
[eluser]DavidHopkins[/eluser]
Hello, My routes file is just the default that gets shipped, on all projects i have never had to make changes to this. Edit It does however have the additional route that you suggested a few posts back Here is is thou Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
Welcome Guest, Not a member yet? Register Sign In |