This is a discussion on problem with POST submit in apache within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hello, I has a red hat 9 with Apache/2.0.40 (Red Hat Linux) , i have php, and php-...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello, I has a red hat 9 with Apache/2.0.40 (Red Hat Linux) , i have php, and php-mysql. I has a problem with POST or GET data, the problem is that in php when i submit a form the variables are not submited, they are filtered by apache or php and the script did not receive the POST or GET variables DATA. I think it has relation with the directives <LIMIT GET POST> , but i has try all the posibilities and i has not resolve my problem. I think i has this problem 2 years ago on the same distribution off RED HAT (it dont happend on apache 1.03 by default) but i did not remember who to solve this. Has anyone idea about this problem and how to solve it? Thanks in advance. Francisco. |
|
|||
|
fcastillo@hostgreen.com wrote:
> I has a red hat 9 Ouch. That hit end of life quite some time ago, I hope you are keeping up with security updates (although not from Red Hat). > with Apache/2.0.40 (Red Hat Linux) , i have php, and > php-mysql. I has a problem with POST or GET data, the problem is that > in php when i submit a form the variables are not submited Then your HTML is wrong. Perhaps you mean that you don't receive them in your script? Most likely (since you haven't provided any code to check) you are trying to access them as if register_globals was switched on (i.e. <input name="foo"> in HTML and $foo in PHP). Register_globals is switched off by default (it is not conducive to writing secure scripts), and you should access them though $_POST['foo'], $_GET['foo'] and $_REQUEST['foo']. > I think it has relation with the directives <LIMIT GET POST> If so, it would present the user with an error message when they tried to submit the form. -- David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/> Home is where the ~/.bashrc is |
|
|||
|
Thanks David, The solution (as you say) of my problem was in php.ini with : ...... register_globals = on ...... David Dorward wrote: > fcastillo@hostgreen.com wrote: > > > I has a red hat 9 > > Ouch. That hit end of life quite some time ago, I hope you are keeping up > with security updates (although not from Red Hat). > > > with Apache/2.0.40 (Red Hat Linux) , i have php, and > > php-mysql. I has a problem with POST or GET data, the problem is that > > in php when i submit a form the variables are not submited > > Then your HTML is wrong. > > Perhaps you mean that you don't receive them in your script? Most likely > (since you haven't provided any code to check) you are trying to access > them as if register_globals was switched on (i.e. <input name="foo"> in > HTML and $foo in PHP). Register_globals is switched off by default (it is > not conducive to writing secure scripts), and you should access them though > $_POST['foo'], $_GET['foo'] and $_REQUEST['foo']. > > > I think it has relation with the directives <LIMIT GET POST> > > If so, it would present the user with an error message when they tried to > submit the form. > > -- > David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/> > Home is where the ~/.bashrc is |
|
|||
|
fcastillo@hostgreen.com wrote:
Please don't top-post. http://www.faqs.org/rfcs/rfc1855.html > The solution (as you say) of my problem was in php.ini with : > register_globals = on A poor solution that removes one level of protection against insecure scripts. I strongly suggest you turn it back off and use, as I suggested previously, the $_POST/GET/REQUEST super globals in your script instead. -- David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/> Home is where the ~/.bashrc is |