PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Help! safe_mode / open_basedir error (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Help! safe_mode / open_basedir error
#822
IslandDesign (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Help! safe_mode / open_basedir error 3 Months, 2 Weeks ago Karma: 0  
Installed Yahoo Stock Quote a short while ago and am getting an error message...

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/username/public_html/modules/mod_yahoostockquote/mod_yahoostockquote_lib.php on line 274

I did verify that the host has Curl enabled before installing.

Help!
 
  The administrator has disabled public write access.
#823
kksou (Admin)
Admin
Posts: 451
graph
User Online Now Click here to see the profile of this user
Re:Help! safe_mode / open_basedir error 3 Months, 2 Weeks ago Karma: 9  
As your warning message stated:


Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/username/public_html/modules/mod_yahoostockquote/mod_yahoostockquote_lib.php on line 274


If you do a google search on the above, you'll see that this is a known "issue" with curl when in safe_mode or an open_basedir is set.

If you're not comfortable setting safe mode to off, then you have to do a bit of additional work. There are many solutions suggested in the net. I would suggest you take a look at some of the solutions in User Contributed note of php.net first. (Note: load the page and search for "safe_mode" ).

You have the source code. All you need is to change line 274 "curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true)" to whatever your preferred solution suggested.

I'm on a business trip right now. Hence the late reply. And I won't be able to test any of those suggested solutions now. When I have some time, I might test some of these solutions and release one version that give support for safe_mode on, or maybe one version that doesn't use curl.

Hope this helps.

Regards,
/kksou
 
  The administrator has disabled public write access.
#829
IslandDesign (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:Help! safe_mode / open_basedir error 3 Months, 2 Weeks ago Karma: 0  
Thank you kksou,

I solved the problem by creating a php.ini file after contacting my hosting provider who said: "suPHP to parse php files, you have the option of using a custom php.ini file"

The php.ini file contained the following...



suPHP_ConfigPath /home/username/public_html/
safe_mode = Off


Thanks again for your quick response and assistance.

IslandDesign
 
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2009. kksou.com. All Rights Reserved