Re: The "open_basedir restriction in effect" error

Re: The "open_basedir restriction in effect" error

I have got the same error on my website www.pictures2keep.nl. This fix was NOT the solution for me. I visited my page from both Safari and Firefox on my Mac and from an iphone. On all of those devices this error appeared. It was working OK, but not anymore...I'm running Backlight 1.01 with Pages included.

Re: The "open_basedir restriction in effect" error

That's just the problem: sometimes it's broken and sometimes it magically works. Which PHP-Version should my provider use?It has PHP Version 5.6.21 configured, but maybe I can ask them to change it in a version which works with BackLight?

Re: The "open_basedir restriction in effect" error

Hi,

unfortunately I'm getting a open_basedir restriction error when trying to upload an image

Something went wrong

tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/www/web394/html/:/home/www/web394/phptmp/:/home/www/web394/files/:/home/www/web394/atd/:/usr/local/php5.5/lib/php/:/usr/local/php5.5/pear/) in ImageEntity.php on line 77

Re: The "open_basedir restriction in effect" error

Hi Sven, Backlight needs to be able to access the /tmp directory (or wherever the host saves files during uploads) in order to handle the image uploads. This looks like a configuration issue with your host. I suggest you contact their technical support.

Re: The "open_basedir restriction in effect" error

Hi Benmay thanks for your help!I've received from the technical support the answer that the /tmp directory is not available (as it is a shared directory), but that the /phptmp directory should be used. Is there a chance to change that directory in blacklight?KrgdsSven M

Re: The "open_basedir restriction in effect" error

Hi Sven, Backlight uses the directory as configured on the host. As far as I can tell our code can not change the location. Instead, this needs to be set in the php.ini file with the upload_tmp_dir setting. Are you able to change php.ini settings via your site's control panel?If not I suggest asking your host for advice on how to configure your site to use the phptmp directory.

Re: The "open_basedir restriction in effect" error

I suggest pushing this back to your host. The PHP documentation says "if open_basedir is on, then the system default directory must be allowed for an upload to succeed". That means your host has effectively broken file uploads by setting open_basedir but not adding the tmp directory to the allowed paths.