Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter FormValidator Example doesn't work out of the box
#7

[eluser]futo[/eluser]
Started with changing my '.htaccess' to what CroNiX suggested. - No difference.

With $config['uri_protocol'] = 'PATH_INFO'; I'm thrown back to '/index.php' when I try to access the controller 'form.php' through 192.168.2.115/form ... the rewrite rules from above acts in this.

Setting my '.htaccess' back to what was before. Still nothing useful - just a redirection to the main '/index.php' page in the root (/var/www/index.php - where /var/www/ is the root).

Setting my '.htaccess' to what CroNiX suggested again.

Changing to $config['uri_protocol'] = 'QUERY_STRING';. Shows no difference to 'PATH_INFO'.

Changing to $config['uri_protocol'] = 'ORIG_PATH_INFO';. Shows no difference to 'PATH_INFO'.

Changing back to original value: $config['uri_protocol'] = 'REQUEST_URI'; Now the 'form.php' is shown as expected - and not the main '/index.php' - when i write 192.168.2.115/form in the browser.

So this definitive rules out $config['uri_protocol'] under the given circumstance.

In the beginning af the main '/index.php' file in the root (/var/www/) I set this code:

Code:
if(isset($_POST)){
   echo '<br> index - $_POST is set! <br>';
   echo count($_POST) . '<br>';
  
   echo 'index - var_dump($_POST)--&gt;>';
   var_dump($_POST);
   echo '<<--var_dump($_POST) <br><br>';
  
  } else {
   echo '$_POST is NOT set! <br>';
  }

This returns the following:

Code:
index - $_POST is set!
0
index - var_dump($_POST)--&gt;>array(0) { } <<--var_dump($_POST)

Changing the name of the method inside 'form.php' from 'index' to 'yobro' and calling the class and the method in the 'myform.php' with 'form_open('form/yobro')'. The form shows up in the browser as before - and still no values inside $_POST. Also no values inside $_POST by the above code in the main '/index.php'.

Yes, I would say that I'm using an htaccess to remove index.php from the url. But looking through my original '.htacces', I'm uncertain now where ...


Messages In This Thread
CodeIgniter FormValidator Example doesn't work out of the box - by El Forum - 03-22-2013, 05:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB