Re: [PHP] Can't fetch HTTP POST data in PHP?

2003-11-18 Thread Arne Rusek
On Mon, 17 Nov 2003 15:30:43 +, Curt Zirzow wrote:

> * Thus wrote Arne Rusek ([EMAIL PROTECTED]):

> Your problem exists here:
> 
> Server API => Command Line Interface
> _ENV["SERVER_SOFTWARE"] => Boa/0.94.13
> 
> Seeing this tells me your webserver is not configured correctly,
> Boa should not be using the CLI version of php it should be using
> the CGI version.

Thank you, that was it. Boa can't run php directly. So i made php files
executable and added '#!/usr/bin/php4' at the beginning of the script.
Instead of that I should have used the cgi version, as you suggested,
which was /usr/lib/cgi-bin/php4.

Take care.

Arne Rusek

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Can't fetch HTTP POST data in PHP?

2003-11-16 Thread Arne Rusek
Hello.

On Sat, Nov 15, 2003 at 05:31:01PM -0800, Chris Shiflett wrote:
> That does seem strange. I glanced at this page of yours:
> 
> > http://zonk.matfyz.cz/php_post_problem
> 
> And I saw this:
> 
> REQUEST_METHOD => GET
> So, why was the request a GET request rather than a POST request? There is
> no content nor any entity headers either, so it doesn't seem like this
> line (telling us that the request method was GET) is wrong.
Sorry for that. Somehow me or my web browser tricked me into thinking I
saved the right file. There's a correct one now. I screwed it when I was
trying the GET method or whatever. Nonetheless it still does not work.
Neither with GET nor with POST. If you liked to glance a little bit more
maybe you'd like to see the request

http://zonk.matfyz.cz/request

It's the one used with the POST method. I sent this request to the
server with netcat and saved (hope that the right one that time:) the
result into

http://zonk.matfyz.cz/php_post_problem

again.

> However, I also don't see any URL variables, so it doesn't seem like the
> HTTP request contained any form data, whether GET or POST.
Whoa. What kind of variables did you say? Ok. This is what I thought: I
have a nonapache - boa - webserver, maybe it's POST handling could be
different. (That would be even more strange but maybe boa webserver does
not set these variables) So I'll try GET. You know how it ended. The
same way.

> echo $username;
> echo $_GET['username'];
> echo $_POST['username'];
> echo $_REQUEST['username'];
> echo $_SERVER['QUERY_STRING'];
Ok. I've put this little code of yours after var_dump($_GET):

array(0) { } 
Notice: Undefined variable: username in /home/zonk/public_html/test.php on line 11
Notice: Undefined index: username in /home/zonk/public_html/test.php on line 12
Notice: Undefined index: username in /home/zonk/public_html/test.php on line 13
Notice: Undefined index: username in /home/zonk/public_html/test.php on line 14
username=zonk&email=zonk&submit=Submit+me%21 

You see. It looks like the intrepreter hates me, doesn't it? :-)

> Hopefully one of this will output something relevant. Otherwise, I suppose
> it's possible that there is a bug in the CGI SAPI, unless I'm missing
> something.
Or we both. But it looks more like a bug to me because it should work
with no preceding actions taken.

> Hope that helps.
Oh thanks a lot. And apologies for wrong background info:)

Take care.

Arne Rusek

-- 
Arne Rusek <[EMAIL PROTECTED]>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Can't fetch HTTP POST data in PHP?

2003-11-15 Thread Arne Rusek
Hello.

I read throughout this thread and it looks like I have encountered
the same problem. Everything looks just fine but somehow the PHP
does not parse the request data sent to the script. I did some research on
that but gave up since I couldn't find how and where those data were
parsed. But I've used the PHP for a few days maybe it's just my
stupidity. Some of you more acquainted with the topic will find some info
I've gathered useful eventually.

I used this form:


Your name: 
Email: 



The test.php script contained this code:

\n";
phpinfo();
echo "\n";
var_dump($_POST);
?>

Then I saw a pretty large page but at the end there was

array(0) { }

and _that_ seemed to me pretty strange.

If someone is interested in reading through the whole result it could
be downloaded from

http://zonk.matfyz.cz/php_post_problem

I tried to change the method to GET but it didn't work either. The result
could be seen at

http://zonk.matfyz.cz/php_get_problem

Take care.

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Arne Rusek <[EMAIL PROTECTED]>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
"Resistance is futile. Open your source code and prepare for assimilation."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php