I have an autoloader that uses a cachefile with file locations. For various reasons there might be an issue with the path, which results in an open_basedir error. This is fine, but i want to place an if() in front to see if the error is going to occur. However, I am not aware of any functions that take a $path and check it for any open_basedir restrictions. Does anyone know how to handle this?
Thanks.
I don't know about specifically testing for open_basedir errors, but you could simply test if you can touch() it, and check for a false result, e.g.:
if (@touch($path) == false); // use @ to suppress errors // Houston, we have a problem }