Forum
Vimeo Field Types curl error
I get the following error using the Vimeo field type. (The site is on Mediatemple Grid server.
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in /nfs/c04/h02/mnt/66163/domains/domain.com/html/enkel/addons/fieldtypes/vimeo/vimeo.class.php on line 194
Warning: Cannot modify header information - headers already sent by (output started at /nfs/c04/h02/mnt/66163/domains/domain.com/html/enkel/addons/fieldtypes/vimeo/vimeo.class.php:194) in /nfs/c04/h02/mnt/66163/domains/domain.com/html/enkel/core/inc/top.php on line 13
Warning: Cannot modify header information - headers already sent by (output started at /nfs/c04/h02/mnt/66163/domains/domain.com/html/enkel/addons/fieldtypes/vimeo/vimeo.class.php:194) in /nfs/c04/h02/mnt/66163/domains/domain.com/html/enkel/core/inc/top.php on line 14
Any idea why I get these error messages? Everything seems to work, and outputs correctly.
The site is on Mediatemple grid, and has SSL certificate (https)
You should turn off Safe Mode. It's deprecated and a bad idea. Might be better still to update to a modern version of PHP.
I've updated the PHP to: PHP 5.5.18
And then I got this instead:
Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set in /nfs/c04/h02/mnt/66163/domains/domain.com/html/enkel/addons/fieldtypes/vimeo/vimeo.class.php on line 194
Warning: Cannot modify header information - headers already sent by (output started at /nfs/c04/h02/mnt/66163/domains/domain.com/html/enkel/addons/fieldtypes/vimeo/vimeo.class.php:194) in /nfs/c04/h02/mnt/66163/domains/domain.com/html/enkel/core/inc/top.php on line 13
Warning: Cannot modify header information - headers already sent by (output started at /nfs/c04/h02/mnt/66163/domains/domain.com/html/enkel/addons/fieldtypes/vimeo/vimeo.class.php:194) in /nfs/c04/h02/mnt/66163/domains/domain.com/html/enkel/core/inc/top.php on line 14
Ok. The issue there is pretty much as it says. You have
open_basedir
set, and that is incompatible with theCURLOPT_FOLLOWLOCATION
curl option.I don't have a solution to that.
I don't really know what open_basedir and CURLOPT_FOLLOWLOCATION is.
But would it help if i set a path for open_basedir in the php.ini file? Or can it be turned off?
Turning it off should do the trick.
Ok, any idea how to turn it off? it's not mentioned in the php.ini file?
open_basedir
does appear in your php.ini at all?Nope, no mention of it at all.
You might need to ask your host, then.
If your on (mt) Media Temple, you won't be able to turn open_basedir off. So Vimeo field type won't work for anyone on (mt) server.
Maybe there's a workaround, I'm trying to grab the id from a vimeo video to use in a jquery lightbox. And i wanted to use the <perch:content id="video" type="vimeo" output="id" />
Is there any way in perch to removed a (predefined) part of a text input, i.e. remove https://vimeo.com/ from https://vimeo.com/116981030 so I'm left with just the id number?
It would probably be simplest to remove the
CURLOPT_FOLLOWLOCATION
from the field type.Ok, how do I remove it?
It's on line 194 or thereabouts:
comment it out:
Thanks Drew! It works now without the warning (error message)
I experienced the same problem on Media Temple GRID.
I commented out line 194 as described above, removes the error messages.
It's worth mentioning, this isn't a problem on Media Temple VPS servers.