Results 1 to 4 of 4
-
04-16-2004, 12:31 PM #1Aspiring Evangelist
- Join Date
- Jun 2003
- Posts
- 352
another php problem can you help?
one of my friends is having another php problem. check this out below
this is the error:
Warning: Unknown(/usr/local/apache/htdocs/random/random.php): failed to open stream: No such file or directory in /home/user/public_html/sources/display.class.php(217) : eval()'d code on line 97
Warning: (null)(): Failed opening '/usr/local/apache/htdocs/random/random.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/user/public_html/sources/display.class.php(217) : eval()'d code on line 97
and the code for this file isPHP Code:// Define document root:
//***
define("ROOT", $_SERVER['DOCUMENT_ROOT']."/");
//--------------------------
//***
// Start up Sessions :
//***
session_start();
//---------------------------
//***
// Load Required Files(config, fuctions, classes, etc):
//***
require ROOT."config.php";
require ROOT."sources/functions.php";
require ROOT."sources/mysql.class.php";
require ROOT."sources/Vars.class.php";
require ROOT."sources/User.class.php";
require ROOT."sources/display.class.php";
-
04-16-2004, 02:44 PM #2Aspiring Evangelist
- Join Date
- Jun 2003
- Posts
- 352
any ideas?
-
04-16-2004, 03:40 PM #3Newbie
- Join Date
- Jan 2004
- Location
- Montana
- Posts
- 9
Hmm
Check the permissions - chmod the php file you're working with to 755.
-
04-17-2004, 09:32 AM #4Junior Guru Wannabe
- Join Date
- Feb 2004
- Posts
- 82
I think the problem is that your Document Root is not where your files are as by the look of it you are using Apache's userdir feature (are you accessing it by http://some.site.com/~username/?) so it can't find the files it is trying to include.
Try chaning define("ROOT", $_SERVER['DOCUMENT_ROOT']."/"); to: define("ROOT", "/home/user/public_html/");