$_POST and $this->input->post() are always empty on localhost site |
[eluser]ian[/eluser]
I've been working with CodeIgniter for about a month to maintain and update a pre-existing website. I had never noticed this problem until needing to update a login page and noticed that none of my forms that perform a POST(this also includes a contact page that sends an email) were working on my development site running on my Macbook. I can access variables in $_POST outside of the CI install, but when placing them inside of a CI controller, trying to access the variables either through $_POST or $this->input->post('varname') gives me 0 values. I suspect the culprit is either in my config file or my .htaccess. I am using mod_rewrite and have some rewrite conditions/rules, mostly just allowing me to remove index.php from my URL. I've checked my header activity using the Live HTTP Headers Firefox extension, but do not see any redirects (and I don't expect any) that might cause the POST data to be lost. I'm accessing the site through a virtual host at http://url.dev that points to localhost. My environment: Mac OSX Apache 2.2 PHP 5.3.4 CodeIgniter 1.7.2 This has been driving me absolutely crazy for a week, and I don't understand how something as simple as accessing POST data can be so hard to do and so hard to track down in CodeIgniter. Any thoughts for things I could try? |
Welcome Guest, Not a member yet? Register Sign In |