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 2015-12-21 17:21:28

sultan1
Member
Registered: 2013-10-12
Posts: 2

Suddenly I get this error message

While trying to open my gallery pages I suddenly get the following error. Changed nothing. Any idea?

is_readable(): open_basedir restriction in effect. File(/dev/urandom) is not within the allowed path(s): (/var/www/vhosts/familielvb.nl/:/tmp/)|#0 [internal function]: ErrorHandler::handleError(2, 'is_readable(): ...', '/var/www/vhosts...', 66, Array) #1 /var/www/vhosts/familielvb.nl/httpdocs/wp-includes/random_compat/random.php(66): is_readable('/dev/urandom') #2 /var/www/vhosts/familielvb.nl/httpdocs/wp-includes/compat.php(338): require('/var/www/vhosts...') #3 /var/www/vhosts/familielvb.nl/httpdocs/wp-settings.php(80): require('/var/www/vhosts...') #4 /var/www/vhosts/familielvb.nl/httpdocs/wp-config.php(83): require_once('/var/www/vhosts...') #5 /var/www/vhosts/familielvb.nl/httpdocs/wp-load.php(37): require_once('/var/www/vhosts...') #6 /var/www/vhosts/familielvb.nl/httpdocs/galleries/phplugins/phplugins.php(130): require_once('/var/www/vhosts...') #7 /var/www/vhosts/familielvb.nl/httpdocs/ttg-be/templates/gallery/wp-gallery-flvb-black/template_index.php(19): require_once('/var/www/vhosts...') #8 /var/www/vhosts/familielvb.nl/httpdocs/ttg-be/publisher/application/controllers/GalleryController.php(323): include_once('/var/www/vhosts...') #9 [internal function]: GalleryController->gallery('', 'index', '') #10 /var/www/vhosts/familielvb.nl/httpdocs/ttg-be/framework/controllers/Controller.php(41): call_user_func_array(Array, Array) #11 /var/www/vhosts/familielvb.nl/httpdocs/ttg-be/framework/Framework.php(124): Controller->dispatch(Array) #12 /var/www/vhosts/familielvb.nl/httpdocs/galleries/andros-sept-2015/lib.php(48): Framework->route() #13 /var/www/vhosts/familielvb.nl/httpdocs/galleries/andros-sept-2015/index.php(4): route(Array) #14 {main}|URL: /galleries/andros-sept-2015/index.php

Offline

#2 2015-12-21 20:43:15

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Suddenly I get this error message

Did your host change anything, i.e. server configuration, PHP version, etc.?

If you're using PHPlugins and having errors, then the first step in troubleshooting should be to disable your PHPlugins functions, to see whether the site works otherwise.


Matt

The Turning Gate, http://theturninggate.net

Offline

#3 2015-12-21 21:24:11

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

Re: Suddenly I get this error message

And be sure to include links to your site and/or specific problem galleries, that always helps in troubleshooting


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

Offline

#4 2016-01-01 21:08:58

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

Re: Suddenly I get this error message

Hey, I'm also getting the same error message, just after having updated to Wordpress 4.4. I've figured out that deleting the phplugins.php file solves it. But I'm using the phplugins for using the Wordpress menu on all pages, so I really would like to get this function back. Any ideas how to fix it? Many thank in advance!
Krgds
Sven M

Here is the error message:
is_readable(): open_basedir restriction in effect. File(/dev/urandom) 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/)|#0 [internal function]: ErrorHandler::handleError(2, 'is_readable(): ...', '/home/www/web39...', 66, Array) #1 /home/www/web394/html/blog/wp-includes/random_compat/random.php(66): is_readable('/dev/urandom') #2 /home/www/web394/html/blog/wp-includes/compat.php(338): require('/home/www/web39...') #3 /home/www/web394/html/blog/wp-settings.php(80): require('/home/www/web39...') #4 /home/www/web394/html/blog/wp-config.php(94): require_once('/home/www/web39...') #5 /home/www/web394/html/blog/wp-load.php(37): require_once('/home/www/web39...') #6 /home/www/web394/html/phplugins/phplugins.php(150): require_once('/home/www/web39...') #7 /home/www/web394/html/ttg-be/templates/gallery/gallery_portfolio/template_index.php(19): require_once('/home/www/web39...') #8 /home/www/web394/html/ttg-be/publisher/application/controllers/GalleryController.php(328): include_once('/home/www/web39...') #9 /home/www/web394/html/ttg-be/publisher/application/controllers/GalleryController.php(196): GalleryController->gallery('37124', 'index', '') #10 [internal function]: GalleryController->anywhere('pages-gallery', 'index', '') #11 /home/www/web394/html/ttg-be/framework/controllers/Controller.php(41): call_user_func_array(Array, Array) #12 /home/www/web394/html/ttg-be/framework/Framework.php(124): Controller->dispatch(Array) #13 /home/www/web394/html/lib.php(48): Framework->route() #14 /home/www/web394/html/index.php(3): route(Array) #15 {main}|URL: /index.php

Webpage: www.sven-michael.com (but I have deleted the phplugins.php file for the time being)

Offline

#5 2016-01-02 04:19:22

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

Re: Suddenly I get this error message

weird. I just set up a new test site using WP 4.4 and the menus are working fine, no errors like you're seeing.

Make sure you've got a .htaccess file in the root of your site and that it's writable. Also make sure the wp-content/ folder has write permissions set.
See this part of the tutorial: http://ce4.theturninggate.net/docs/doku … _wordpress


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-01-02 04:32:23

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

Re: Suddenly I get this error message

another thing to check is that your hosting company hasn't switched you to a different server. Verify that the server path you're using for phplugins and the path to the WordPress installation are still valid.

Step 3, 5, and 7 of the tutorial
http://ce4.theturninggate.net/docs/doku.php?id=ce4_102


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

Offline

#7 2016-01-03 04:47:32

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

Re: Suddenly I get this error message

Many thx! I've checked all the hints and can confirm they are set up properly. Still the same issue.

Offline

#8 2016-01-03 08:59:22

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

Re: Suddenly I get this error message

can you enable phplugins in a gallery template and post an album (created with that template) that displays the problem? This will give Matt something to look at.


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

Offline

#9 2016-01-03 20:19:50

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

Re: Suddenly I get this error message

Offline

#10 2016-01-04 07:30:51

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Suddenly I get this error message

Can you send me FTP information so that I can take a look? I'll also need to know where your PHPlugins file is located on the server so that I can get to it to look at the code therein.


Matt

The Turning Gate, http://theturninggate.net

Offline

#11 2016-01-04 12:24:33

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

Re: Suddenly I get this error message

Does line 66 of wp-includes/random_compat/random.php start with @, like this?

@is_readable('/dev/urandom')

That should suppress the warning.  WP 4.4 (and possibly earlier) includes the @.  If your version doesn't, then try adding it (or upgrading, if you're comfortable with that).

Offline

#12 2016-01-04 17:25:37

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Suddenly I get this error message

PHPlugins are not the problem. The error is occurring on the following line in phplugins.php:

require_once(__ROOT__.'/wp-load.php');

So it's happening when we shout out to WordPress.

There are other reports of this error occurring after the WordPress 4.4 update -- for WordPress users, not TTG users -- such as this one:
https://wordpress.org/support/topic/war … -44-update

Try the solution there (basically, just upload a fresh copy of the WordPress files) and see whether that helps.


Matt

The Turning Gate, http://theturninggate.net

Offline

#13 2016-01-04 18:16:14

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

Re: Suddenly I get this error message

Looking further into this, it looks to be a problem with TTG's ErrorHandler.  Unbeknownst to me, custom error handlers are called even when errors have been marked to be suppressed.  I will need to write some code to see how our ErrorHandler should go about detecting that the error should not be shown.
Sven, once I have some working code, will you be willing to help test it on your site?  This should be a matter of changing a single file (ErrorHandler.php).

Offline

#14 2016-01-04 18:27:51

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

Re: Suddenly I get this error message

... and the solution was staring right at me. 

Please edit ttg-be/framework/helpers/ErrorHandler.php and change line 69 from:

//if (error_reporting() == 0) {return;}

to

if (error_reporting() == 0) {return;}

Offline

#15 2016-01-04 21:05:47

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

Re: Suddenly I get this error message

Perfect! That has solved it, many thx!!!

Offline

#16 2016-01-04 21:27:02

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

Re: Suddenly I get this error message

Great, thanks for confirming!  We don't use "@" to suppress errors in our code, and are of the opinion that writing code that raises errors and then suppresses them is questionable at best. 
There will be a minor update to TTG BE soon for WP compatibility.  Since you've already applied the fix, there won't be any need for you to upgrade.

Offline

#17 2016-01-07 18:54:21

sultan1
Member
Registered: 2013-10-12
Posts: 2

Re: Suddenly I get this error message

Thanks! Works!

Offline

Board footer

Powered by FluxBB