|
Posted by Leo on 11/13/99 11:44
Can anyone help or offer some explanation with this problem:
I'm trying to do a POST from one of my PHP pages, to another page on my
site using curl.
To maintain the session I'm sending the current session cookie in the
headers using
$headerArray = array("Cookie: " . session_name() . "=" .
session_id());
then
curl_setopt( $ch, CURLOPT_HEADER, 1 );
curl_setopt( $ch, CURLOPT_POST, 1 );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $postArray );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 0 );
curl_setopt( $ch, CURLOPT_HTTPHEADER, $headerArray);
curl_exec( $ch );
The problem is, once this is submitted, Apache goes into an infinite
loop and has to be restarted. This only happens when I send the
current session cookie, if I change it slightly there's no problem
(although obviously the session is lost).
There seems to be mention of a similar problem on the post called 'CURL
and $_SESSION problem' but the guy is trying to achieve something
different so it doesn't get addressed.
Very grateful for any help with this!
[Back to original message]
|