Active Directory Products
Calls To Calendar
SMS To CSV
SMS To Gmail
Voicemail To Gmail
How Long For Me
<< Back To All Blogs
Resolving CURLOPT_FOLLOWLOCATION cannot be activated with PHP and CURL
Thursday, June 6th, 2013
We were recently using a class we had created to access RETS/MLS in PHP which required that both cookies could be written locally and CURLOPT_FOLLOWLOCATION was enabled.
The actual error was CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in /var/file/location
We are running this particular site as a virtual host on Apache.
To both disable safe mode as well as remove the open_basedir issue follow these instructions. Please note that safe mode is going away in future versions of PHP.
1. Fire up your UNIX shell of choice, navigate to the location of your httpd.conf file for the virtual host (or your single httpd.conf file with multiple virtual hosts enabled):
#: cd /var/www/virtualhosts/domain.com/conf
2. Edit the file
# vi httpd.conf
3. Add the following 2 lines to the required location in your httpd.conf file and save the edits:
php_admin_flag safe_mode off
php_admin_flag open_basedir none
4. Reload the apache service
#: service httpd reload
You're all set!
Optionally you could also change this configuration in the default php.ini file, but this is a much safer and restricted approach.
Apachein' Tom Out.
Fedora Core 20 and Apache Virtual Host on mounted share
Calling .NET WebService From PHP
Netbeans and PHP: A promising future
Parsing XML in PHP with SimpleXML
Simple encryption class for PHP
Currently no comments.
Add A Comment
Email Address: (not public, used to send notifications on further comments)
Enter the text above, except for the 1st and last character: