Bug #51890 [NEW]: CURL Problem
| From: | seizu at gmx dot at | Date: | Sat, 22 May 2010 21:10:17 +0000 |
| Subject: | Bug #51890 [NEW]: CURL Problem | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-150738@lists.php.net to get a copy of this message | ||
From:
Operating system: Windows XP
PHP version: 5.3.2
Package: Scripting Engine problem
Bug Type: Bug
Bug description:CURL Problem
Description:
------------
The script copy the URL into an existing file (robot.txt)
The error occurs when you run the test script from the command line
by providing the absolut path of your php.exe like
>c:\php\php.exe test.php
When you don't provide the absolut php path, the problem does not occure
>php test.php
Test script:
---------------
<?php
$outfile="c:\\robots.txt";
$infile="http://www.astrobox.at/robots.txt";
$ch = curl_init($infile);
$fo = fopen($outfile, "rb+" );
curl_setopt($ch, CURLOPT_FILE, $fo);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fo);
?>
Expected result:
----------------
nothing
Actual result:
--------------
C:\phpda>c:\php\php.exe C:\phpda\test.php
PHP Warning: curl_setopt(): the provided file handle is not writable in
C:\phpda\test.php on line 7
Warning: curl_setopt(): the provided file handle is not writable in
C:\phpda\test.php on line 7
User-agent: *
Disallow: /administrator/
Disallow: /cache/
Disallow: /components/
Disallow: /editor/
Disallow: /help/
Disallow: /images/
Disallow: /includes/
Disallow: /language/
Disallow: /mambots/
Disallow: /media/
Disallow: /modules/
Disallow: /templates/
Disallow: /installation/
Disallow: /astrobox/produkte/
Disallow: /option/
--
Edit bug report at http://bugs.php.net/bug.php?id=51890&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51890&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51890&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51890&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=51890&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51890&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=51890&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=51890&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=51890&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=51890&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=51890&r=support
Expected behavior: http://bugs.php.net/fix.php?id=51890&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=51890&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=51890&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=51890&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51890&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51890&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=51890&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=51890&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=51890&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=51890&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=51890&r=mysqlcfg