Click to See Complete Forum and Search --> : include(); differences when using ISAPI or CGI (win)


robtbs
05-24-2005, 07:56 PM
Iv got some strange behaviour going on with my php installation....

I have plesk installed....
PHP works fine in default mode (CGI)

as soon as i switch to ISAPI mode for domains something goes odd with the include() function....

for instance...

---------
file: index.php

$incpath = '/includes';
include($incpath.'functions.php');
---------

works fine

---------
file: functions.php

include($incpath.'draw_functions.php');
---------

because functions.php is being included in index.php which is in doc root,
functions.php still needs the /includes dir to include anything in the /includes dir because in effect functions.php has become a part of index.php

Correct?

Should be fine
Well it works fine under php CGI

under ISAPI it complains

main(includes/draw_functions.php): failed to open stream: No such file or directory

my include path is exactly as the default for windows:

include_path='.;./includes;./pear'

Both ISAPI and CGI are using the same php.ini, why should one look in on place and one look somewhere else....

doesnt make sence...

id appreciate anyones help.
Many thanks
Rob

weekender
05-31-2005, 05:56 PM
try using is_file and file_exists