Hi,
I have PHP Version 5.2.6-1+lenny9, these settings:
variables_order = "EGPCS"
register_globals = On
register_long_arrays = On
post_max_size = 8M
Get is working fine using globals but post does not, also
if I try in a perl/cgi script:
my $cgi=new CGI;
if ($cgi->param('domain')) {
...
}
it goes inside if block only when $domain variable comes from url/get not from post form.
So in php is the same, $domain has value only when it comes from GET and not from POST.
But if I use echo count($_POST) is also showing 0, post is empty.
I understand that is a mess but what I must do is to make this apllication that was working
on an old debian with old php and perl versions work into new latest stable releases...
Regards,
Adrian
get works but not POST
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: get works but not POST
Firstly, you do realize that register global is deprecated, and highly discouraged? If you want to capture all the request variables, you should be using the $_REQUEST super-global.
However, as for your issue. Can you post the HTTP headers of your post request along with relevant var_dump() of the $_REQUEST super-global? I recommend Fiddler2 if you need an HTTP debugger.
However, as for your issue. Can you post the HTTP headers of your post request along with relevant var_dump() of the $_REQUEST super-global? I recommend Fiddler2 if you need an HTTP debugger.