mc_fish
mc_fish

Reputation: 503

PHP cURL cookie problems

I have the strangest problem:

if i try to post a cookie with curl i get a http_code 500, when i leave the cookie out it works normally?!

i added the cookie like this:

curl_setopt($curl, CURLOPT_COOKIE, 'someCookie=' . $_COOKIE['someCookie'] . '; path=/');

Any ideas? Just hints, bounce ideas..anything

curl_info:

Array (
     [url] => valid url
     [content_type] => text/html; charset=utf-8
     [http_code] => 500
     [header_size] => 279
     [request_size] => 270
     [filetime] => -1
     [ssl_verify_result] => 0
     [redirect_count] => 0
     [total_time] => 0.345595
     [namelookup_time] => 2.3E-5
     [connect_time] => 0.000122
     [pretransfer_time] => 0.000126
     [size_upload] => 1026
     [size_download] => 52106
     [speed_download] => 150771
     [speed_upload] => 2968
     [download_content_length] => -1
     [upload_content_length] => 1026
     [starttransfer_time] => 0.000814
     [redirect_time] => 0
     [certinfo] => Array ( )
     [redirect_url] =>
)

Note: no errors happen and i see everything in access log (http_code 500 though)

I can successfully execute the command from the command line so are there any ideas as to what may be preventing php from executing it?

Upvotes: 0

Views: 402

Answers (1)

mc_fish
mc_fish

Reputation: 503

the most idiotic problem i had ever seen was happening because of the path

i dont know why or how...but when i removed it, it worked just fine

edit: so after about 4 hours of research an do-try-redo testing i figured it out: path in combination with an internal server error...

of course the error was not logged in any log, anyway tnx 4 the help

Upvotes: 1

Related Questions