From:
Operating system: N/A
PHP version: 5.3.2
Package: Safe Mode/open_basedir
Bug Type: Feature/Change Request
Bug description:CURLOPT_FOLLOWLOCATION error message is misleading
Description:
------------
The following error message is semantically wrong (and for the "newbies"
that
aren't familiar with PHP, very misleading/confusing):
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION can
not be
activated when in safe_mode or an open_basedir is set in <file> on line
<line>
>From a purely grammatical standpoint, that error message is saying that one
of
the following conditions caused the error: either you're in safe_mode, or
an
open_basedir option was set in <file>. The "in <file> on line <line>" that
directly follows the open_basedir bit makes it sound like one should look
for
something dealing with "open_basedir" in <file> in order to resolve the
error
(assuming they aren't in safe mode).
This situation actually happened on a PHP support community I'm a member
of. I
only mention this to show that I'm not simply quibbling over
semantics/grammar
but rather trying to clarify a misleading error message.
Test script:
---------------
<?php
ini_set('open_basedir', '/'); // for testing purposes
$ch = curl_init();
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
Expected result:
----------------
No output.
Actual result:
--------------
PHP Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated
when in
safe_mode or an open_basedir is set in G:\php\test.php on line 6
--
Edit bug report at http://bugs.php.net/bug.php?id=51629&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51629&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51629&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51629&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51629&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=51629&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51629&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=51629&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=51629&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=51629&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=51629&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=51629&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=51629&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=51629&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51629&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51629&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51629&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=51629&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=51629&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=51629&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=51629&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=51629&r=mysqlcfg