
06-28-2011, 12:15 AM
|
|
Senior Member
|
|
Join Date: Jun 2010
Posts: 100
|
|
Quote:
Originally Posted by webizen
Could not duplicate the issue. sample code snippet is as follows:
Code:
<?php
include '../../test1/public_html/test1.php';
...
?>
open_basedir is empty.
|
We enabled WHM/cPanel open_basedir, one site already had issues with it.
A series of includes to take a site forums info and put it on the front page.
Includes like
include "forums/blah/bluuu.php" and required "conf_global.php; in the forums dir which the conf was also in that dir was now failing too. Code that worked for years.
I added a ./ infront of every include, switched require to include_once for some reason required "./blah" caused issues. On a few I did the full path of /home/username/public_html/path/to/php/include
Now it works fine.
pen_basedir no value no value
include_path .:/usr/lib/php:/usr/local/lib/php .:/usr/lib/php:/usr/local/lib/php
Yet phpinfo shows the above, so I ignored module they said here http://www.litespeedtech.com/support...?t=1033&page=2 and then the home made page went to wonk again
Coppermine gallery online users include script uses the below to include config, we got a unable to connect error
require ('include/config.inc.php');
The error we got in error_log
8-Jun-2011 00:10:41] PHP Warning: include_once() [<a href='function.include'>function.include</a>]: Failed opening '/home/boo/public_htmlrenders/include/config.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/boo/public_html/renders/onlinestats_external.php on line 23
We ended up using
include_once $_SERVER['DOCUMENT_ROOT'] . '/renders/include/config.inc.php';
Is this similar to your problem?
|