I've been through most similar posts and all over the web trying this and the other to no avail. Recently put a site on ehosts.com and ever since enjoy all sorts of freak stuff.
Identical scripts work fine on a number of sites and hosts so maybe this is a hosting issue and should probably go some other place? The scenario is that mkdir randomly works before refusing further service again for no obvious reason.
I am aware this is not much of a programming issue and likely off-topic for SO, but perhaps someone could still point me in the right direction before the question is closed.
The code is as simple as mkdir($dir, 0777)
In addition I have played with
$mask = umask(0)
before and umask($mask)
after the mkdir call. Plus, I checked permissions and is_writable($dir)
and all is well. I'm out of ideas, hence the post.
EDIT: Here is the funny part:
if (!is_dir($dir)) {
$mask = umask(0);
mkdir($dir);
umask($mask);
}
Nothing in error log.