problem with POST submit in apache

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-...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-28-2005
fcastillo@hostgreen.com
 
Posts: n/a
Default problem with POST submit in apache


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.

  #2 (permalink)  
Old 08-28-2005
David Dorward
 
Posts: n/a
Default Re: problem with POST submit in apache

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
  #3 (permalink)  
Old 08-28-2005
fcastillo@hostgreen.com
 
Posts: n/a
Default Re: problem with POST submit in apache


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


  #4 (permalink)  
Old 08-28-2005
David Dorward
 
Posts: n/a
Default Re: problem with POST submit in apache

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:53 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0