Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2016-05-12 21:42:06

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

The "open_basedir restriction in effect" error

Some users may encounter an error message like:

realpath() [function.realpath]: open_basedir restriction in effect

We have patched Backlight 1.0.1 with a fix for this.  Steps to fix:

1. Download Backlight 1.0.1 or newer again.
2. Replace these two files:

backlight/framework/helpers/URLHelper.php
backlight/publisher/application/helpers/PathBuilder.php

Offline

#2 2016-05-12 21:57:03

chumby
Member
Registered: 2014-10-23
Posts: 188

Re: The "open_basedir restriction in effect" error

Thanks for the update, Ben.

Yes all working for me now.

Cheers
Chumby

Offline

#3 2016-05-17 06:07:41

RCBakker
Member
Registered: 2012-12-05
Posts: 14

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.

Offline

#4 2016-05-17 06:56:46

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: The "open_basedir restriction in effect" error

The error I'm seeing on your site is nothing to do with open_basedir. It looks like something is broken in your host's PHP configuration. I suggest you take this up with their technical support.

Offline

#5 2016-05-17 07:19:10

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: The "open_basedir restriction in effect" error

looks like it's working now?


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#6 2016-05-19 06:50:54

RCBakker
Member
Registered: 2012-12-05
Posts: 14

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?

Offline

#7 2016-05-19 07:19:41

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: The "open_basedir restriction in effect" error

php 5.2.6 or newer according to the requirements on the product page.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#8 2016-05-29 01:30:58

Sven
Member
Registered: 2016-01-01
Posts: 30

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

Any idea how to fix it?

Many thanks
Sven M

Offline

#9 2016-05-29 07:04:41

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

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.

Offline

#10 2016-05-30 06:37:03

Sven
Member
Registered: 2016-01-01
Posts: 30

Re: The "open_basedir restriction in effect" error

Hi Ben
may 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?
Krgds
Sven M

Offline

#11 2016-05-30 09:56:28

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

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.

Offline

#12 2016-05-30 10:01:46

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

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.

Offline

#13 2016-07-16 21:00:56

Sven
Member
Registered: 2016-01-01
Posts: 30

Re: The "open_basedir restriction in effect" error

Hey Ben, issue is solved now. Had to switch to another host ;-(

Offline

#14 2016-07-16 21:09:51

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: The "open_basedir restriction in effect" error

Hi Sven, sorry to hear you had to go to the trouble of changing hosts.  Can I ask who you were hosting with previously?

Offline

#15 2016-07-16 21:33:04

Sven
Member
Registered: 2016-01-01
Posts: 30

Re: The "open_basedir restriction in effect" error

Sure, it was www.tophoster.de

Offline

#16 2016-07-19 06:19:52

No_name
Member
From: Germany
Registered: 2016-07-14
Posts: 30
Website

Re: The "open_basedir restriction in effect" error

Hello Sven I have the same problem and the same hoster

I have ride tophoster. He ask my

"Weiterhin ist open_base_dir eine Sicherheitsfunktion, die verhindert, dass php-scripte außerhalb Ihres Ordners zugriff haben.
"
??

Offline

#17 2016-07-24 00:28:51

Sven
Member
Registered: 2016-01-01
Posts: 30

Re: The "open_basedir restriction in effect" error

Hi, sorry to hear that you are having the same issues than me.
I've tried it several times with them, but absolutely no chance.
Changing the host was the only solution.

Offline

Board footer

Powered by FluxBB