Forum Moderators: coopster

Message Too Old, No Replies

Include Issue

         

joedub

2:05 pm on Sep 5, 2005 (gmt 0)

10+ Year Member



Hello,

I recently installed i-rater onto a server for someone and cant get the thing running. The problem is this...

'index.php' includes 'admin/config.php'

no problem there

'admin/config.php' includes 'admin/supersetup.php'

BUT the file 'admin/config.php' includes 'admin/supersetup.php' using the line include('supersetup.php').

The problem is as 'index.php' started the include 'chain' the subsequently included files share the path of index.php so its looking for 'supersetup.php' in the directory containing 'index.php' rather than admin where config.php is located.

When i modify admin/config.php to "include('admin/supersetup.php')" it finds the file, but im not really up for modifying the includes of every file!

Is there a quick fix i can use here, maybe a php setting to fiddle with?

Any help much appreciated, cheers

jatar_k

7:14 pm on Sep 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



man that always bugs me when you install a 'stable' script that doesn't work.

hmm, are there other files including config.php?

one option is to look at is auto_prepend
from
[php.net...]

In order to automatically include files within scripts, see also the auto_prepend_file [php.net]and auto_append_file configuration options in php.ini.

these are set as PHP_INI_PERDIR so it can be set in php.ini, .htaccess or httpd.conf

also look at include_path [php.net] which is PHP_INI_ALL so you can set it from anywhere