Welcome Guest, Not a member yet? Register   Sign In
I cannot receive post data.
#21

[eluser]CodeIgniteMe[/eluser]
or you could use the form helper functions to handle your form tags.
Code:
<?php
  echo form_open('controller/function');
  echo form_input('txtSomething',set_value('txtSomething'));
  echo form_submit('btnSubmit','Send');
  echo form_close();
?>
#22

[eluser]kjanko[/eluser]
The problem was another, mod_rewrite was disabled by default on wamp. It's all working now.
#23

[eluser]toopay[/eluser]
[quote author="kjanko" date="1309542060"]The problem was another, mod_rewrite was disabled by default on wamp. It's all working now.[/quote]

Another devil's thing, from un-proper htaccess. :-S Glad you solved it quickly.
#24

[eluser]nairit01[/eluser]
Facing same problem on Windows 7 (64 bit), Apache 2.2.22, CI 2.1.4

POSTed data from all forms untraceable.

But as soon as I stop using the .htaccess redirection to remove index.php from the CI URLs, everything works perfectly. It may be a bug of Apache mod_rewrite on Windows 7. I believe I have used the same Apache & CI on Windows XP without any issues. Also I never face any problem with mod_rewrite on LINUX.

Some users have reported on stackoverflow.com that the .htaccess is redirecting twice. Redirecting to index.php and then again to index.php
That is why $_POST and $this->input->post() is blank.
#25

[eluser]InsiteFX[/eluser]
I am running Windows 7 Pro ( 64-bit ) with xampp and have no problems with Post data at all so it must be your configuration.
#26

[eluser]nairit01[/eluser]
I have Apache 2.2.22 Win32 x86 no SSL installed with typical configurations using Windows Installer. I am almost sure that the POST data loss is due to mod_rewrite of .htaccess.

May be the Apache is facing problem(regarding POST data loss on re-directing with mod_rewrite) on the 64 bit OS. But otherwise it is working fine.

I could not get any Apache for Win 64 that can install with Windows Installer. I always install Apache, PHP, MySQL, phpMyAdmin individually on both Windows and Linux. Don't prefer XAMPP/WAMP.
#27

[eluser]CroNiX[/eluser]
Make sure you aren't throwing any 404 errors, like a missing image or stylesheet because CI gets called to handle the 404 which is another request.
#28

[eluser]nairit01[/eluser]
Thanks buddy CroNIX ! Your small hint helped me to solve the .htaccess problem. My redirection part was written inside this :
Code:
<IfModule mod_rewrite.so>
....
</IfModule>

That part was not being entered. There was another part below that which was being entered :
Code:
<IfModule !mod_rewrite.so>
ErrorDocument 404 /ci/index.php
</IfModule>

And the whole CI 's index.php removal from URL was working fine from that part below. Only the POST ed data was inaccessible because it was no longer a proper form post. Rather it was a redirection to the error page, which by chance was also index.php

Trial and error helped me to detect that this block will be entered correctly :
Code:
<IfModule mod_rewrite.c>
....
</IfModule>

Even though the modules file extension on Windows is .so and not .c as in Linux
And we should always create a separate error.php for redirecting the 404 errors and never use the same index.php

Valuable insight for me and may be you other readers.




Theme © iAndrew 2016 - Forum software by © MyBB