php not sending php_auth_user with fput

From: Date: Thu, 17 Aug 2000 20:38:03 +0000
Subject: php not sending php_auth_user with fput
Groups: php.general 
Request: Send a blank email to php-general+get-12361@lists.php.net to get a copy of this message
I'm using this script to send a relocation posting, with the variables not on the URI, but as a post. So I use a script that opens a socket and sends the header strings with fput. The problem is that the script that is been relocated to ask for the PHP_AUTH_USER variable to be set, and it looks like it isn't. Here are the codes: relocation script: <? function redirigir($valores){ /* $valores is an array with 3 strings $valores[0] -> host $valores[1] -> path $valores[2] -> variables */ $host = $valores[0]; $port= 80; echo $postdata = $valores[2]; $valores[1]; if ($sp = fsockopen($host,$port)) { fputs($sp,"POST $valores[1] HTTP/1.0\n"); fputs($sp,"Host: $host\n"); fputs($sp,"Content-type: application/x-www-form-urlencoded\n"); fputs($sp,"Content-length: " . strlen($postdata) . "\n"); //fputs($sp,"Connection: close\n\n"); fputs($sp,$postdata); // optionally print the response while (!feof($sp)) { echo fgets($sp,128); } fclose($sp); } } ?> the script which is been relocated to starts with something like this: if (! isset($PHP_AUTH_USER)) { Header("Location: index.php"); exit; } What can be wrong? -- "And I'm happy, because you make me feel good, about me." - Melvin Udall ----------------------------------------------------------------- Martín Marqués email: martin@math.unl.edu.ar Santa Fe - Argentina http://math.unl.edu.ar/~martin/ Administrador de sistemas en math.unl.edu.ar -----------------------------------------------------------------

« previous php.general (#12361) next »