I think I found a clue by playing around with the import script.

It seems that the 'file_exists' function works ok if the file being checked is in a directory below my httpdocs directory like:
Quote
/var/www/vhosts/dennyp.com/httpdocs/ubb
But it isn't working for files above the httpdocs directory for files in directories like
Quote
/var/www/vhosts/dennyp.com/cgi-bin/ubbcgi

I wrote this test script
Quote
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
</head>

<body>
<?php
$x="/var/www/vhosts/dennyp.com/cgi-bin/ubbcgi/vars_misc.cgi";
$y="/var/www/vhosts/dennyp.com/httpdocs/ubb/on.gif";
echo $x;
?>.<br/><?
if (file_exists ($x)){
echo "It's there";
}
else {
echo "Not there";
}
?>.<br/><?
echo $x;
?>.<br/><?
if (file_exists ($y)){
echo "It's there";
}
else {
echo "Not there";
}
?>
</body>

</html>

It returned
Quote
/var/www/vhosts/dennyp.com/cgi-bin/ubbcgi/vars_misc.cgi.
Not there.
/var/www/vhosts/dennyp.com/cgi-bin/ubbcgi/vars_misc.cgi.
It's there

But both files are there.

Last edited by DennyP; 08/16/2009 3:02 AM.

DennyP - www.dennyp.com
DennyP Travel