PDA

View Full Version : Global Error Issue, Can I get some help?


Uniphix
02-20-2005, 12:31 AM
Okay I seem to get an issue here and there are some things I am trying to do right now and that is... trying to get my other php files to link to the global.php..

I have this error


Warning: main(): Unable to access ./global.php in /home/httpd/vhosts/paragonix.org/httpdocs/portal/races/index.php on line 32

Warning: main(./global.php): failed to open stream: No such file or directory in /home/httpd/vhosts/paragonix.org/httpdocs/portal/races/index.php on line 32

Fatal error: main(): Failed opening required './global.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/paragonix.org/httpdocs/portal/races/index.php on line 32

And this is what I have...

<?php
error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'adv_index');
define('VBA_PORTAL', true);

//chdir('/forums');

$phrasegroups = array();
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array();

require_once('./global.php');

$navbits = array();
$navbits[$parent] = 'Races';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');

eval('print_output("' . fetch_template('races') . '");');
?>

Zachery
02-20-2005, 12:37 AM
is this file in the same directory as global.php

Uniphix
02-20-2005, 12:58 AM
Nope

This is what I plan on having...

ROOT/forums/etc.etc.

ROOT/portal/races/all race stuff here...
ROOT/portal/classes/all class stuff here...

I have a index.php in my ROOT folder that is my main homepage...

While I have my forums in my forums..

Zachery
02-20-2005, 01:15 AM
then uncomment this line

//chdir('/forums');

;)

chdir('./forums');

if that doesn't work try

chdir('../forums');

Uniphix
02-20-2005, 02:00 AM
Warning: chdir(): SAFE MODE Restriction in effect. The script whose uid is 10482 is not allowed to access /home/httpd/vhosts/paragonix.org/httpdocs/portal owned by uid 0 in /home/httpd/vhosts/paragonix.org/httpdocs/portal/races/index.php on line 7

Warning: main(): Unable to access ./global.php in /home/httpd/vhosts/paragonix.org/httpdocs/portal/races/index.php on line 14

Warning: main(./global.php): failed to open stream: No such file or directory in /home/httpd/vhosts/paragonix.org/httpdocs/portal/races/index.php on line 14

Fatal error: main(): Failed opening required './global.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/paragonix.org/httpdocs/portal/races/index.php on line 14

This is what I edited...


<?php
error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'adv_index');
define('VBA_PORTAL', true);

chdir('../forums');

$phrasegroups = array();
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array();

require_once('./global.php');

$navbits = array();
$navbits[$parent] = 'Races';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');

eval('print_output("' . fetch_template('races') . '");');
?>

OKay I aM still having issues with both tries...

Uniphix
02-23-2005, 10:19 PM
Okay Still need help I seem to not be able to figure this out :surprised:

sabret00the
02-23-2005, 10:26 PM
chdir('../forums');

should read
chdir('/home/httpd/vhosts/paragonix.org/httpdocs/forums/');

Uniphix
02-23-2005, 10:39 PM
I'll give it a try

Works great thanks

and I need a / before home to get it right hehe