Alright DrB., I believe that is what the problem is. The server is running php 4.4.1. I've gone thru all the chmod's and such, it is a nix server. I checked out on the php site and looked thru the is_writable function, looks like there was a problem there so I took what they had there as a check and wrote a quick script to check the perms. I tested them out on my local and know that it works and was getting that it wasn't writeable, uploaded the script to the site and saw that it wasn't writable either even though the is_writable is saying that it is. I just really don't like the idea of changing the variable to turn off that checking because of a php error in the function. I think it is a good check and would really rather continue using it but I guess until ISP upgrades I'm stuck. Any suggestions on how to speed them up to the process. Thanks for all your help.
Recap:
Final solution for me is to overwrite the variable as PHP 4.4.1 is_writable is coming back erroneous as I know it's read only, don't like it, but looks like I'm stuck with it.
Attached script to check it all out:
<?php
function is__writable($path)
{
//Function taken from php.net user contributed note on is_writable function
if ($path{strlen($path)-1}=='/') //Start function again with tmp file...
return is__writable($path.uniqid(mt_rand()).'.tmp');
elseif (ereg('.tmp', $path))
{ //Check tmp file for read/write capabilities
if (!($f = @fopen($path, 'w+')))
return false;
fclose($f);
unlink($path);
return true;
}
else //We have a path error.
return 0; // Or return error - invalid path...
}
$filename = 'includes/configure.php';
if (is_writable($filename)) {
echo 'PHP is_writable function: The file is writable<br>';
} else {
echo 'PHP is_writable function: The file is not writable<br>';
}
if (is__writable($filename)) {
echo 'Custom is__writable function: The file is writable<br>';
} else {
echo 'Custom is__writable function: The file is not writable<br>';
}
?>