|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-04-22 10:58 UTC] pajoye@php.net
[2010-04-22 10:58 UTC] pajoye@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: pajoye
[2010-04-22 10:58 UTC] pajoye@php.net
[2010-04-22 13:49 UTC] pajoye@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 22:00:01 2025 UTC |
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