You are here: POST with curl causing Apache to lock up « PHP Programming Language « IT news, forums, messages
POST with curl causing Apache to lock up

Posted by Leo on 11/18/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!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация