ID: 33475
User updated by: edman007x at mac dot com
Reported By: edman007x at mac dot com
Status: Open
Bug Type: cURL related
Operating System: Linux (slackware-current)
-PHP Version: 5.0.4
+PHP Version: 5.0.4/5.1b2
New Comment:
i upgraded the server to 5.1b2 and it still didn't work
Previous Comments:
------------------------------------------------------------------------
[2005-06-25 22:21:44] edman007x at mac dot com
Description:
------------
in my php 5.0.3 and php 5.0.4 servers curl did not write
to the cookieJar file even though it is writable and
there are cookies that were received
phpinfo for working server is @ http://
edman007.optikhosting.com/phpinfo.php
phpinfo for php server that doesn't work is @ http://
server.antiwindows.gotdns.com/phpinfo.php
Reproduce code:
---------------
<?php
header('Content-type: text/plain');
$file = tempnam('/tmp', 'php_bug_test');//should be writable
//a check
echo is_writable($file)?'This File Is Writable':'This File Is not
Writable';
echo "\n";
//and again
echo system('ls -lah '.$file);
echo "\n";
$ch = curl_init('http://www.yahoo.com/');///this site will give me a
cookie
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, $file);
curl_exec($ch);
curl_close($ch);
echo file_get_contents($file);
unlink($file);
?>
Expected result:
----------------
(i got this from a php 4.3.11 server)
This File Is Writable
-rw------- 1 nobody nobody 0 Jun 25 15:15
/tmp/php_bug_testKzXWcK
-rw------- 1 nobody nobody 0 Jun 25 15:15
/tmp/php_bug_testKzXWcK
# Netscape HTTP Cookie File
# http://www.netscape.com/newsref/std/cookie_spec.html
# This file was generated by libcurl! Edit at your own
risk.
.www.yahoo.com TRUE / FALSE 1149188400 FPB
311up3uh111brer0
Actual result:
--------------
(i got this from my php 5.0.4 server)
This File Is Writable
-rw------- 1 nobody nobody 0 2005-06-25 16:15 /tmp/
php_bug_testYspF2w
-rw------- 1 nobody nobody 0 2005-06-25 16:15 /tmp/
php_bug_testYspF2w
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33475&edit=1