PHP error when hosting

13 views
Skip to first unread message

Pasindu

unread,
Oct 11, 2012, 10:29:12 AM10/11/12
to mchoice-...@googlegroups.com

Hi
I get the following error when running my php application. The safe mode is off and open_basedir is set to /home/:/usr/lib/php:/tmp. dose anyone know how to fix this error.
Thank You in advance.

PHP Warning:  curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]:
CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in


Isuru Madusanka

unread,
Oct 11, 2012, 11:16:40 AM10/11/12
to mchoice-...@googlegroups.com
your Java app is expecting the User-Agent header to be set. Since Curl does not send a User-Agent header by default, you will need to set one. Try adding this above your option to set CURL_TIMEOUT_m2. curl_setopt($ch, CURLOPT_USERAGENT, "PHP/".PHP_VERSION );

If for some reason it does not like that User-Agent string, you might want to try using one from an actual browser

Reply all
Reply to author
Forward
0 new messages