Hayce Posted January 14, 2008 Share Posted January 14, 2008 My host's server recently crashed and now my directory creation code is failing. Seems I'm able to great a directory using mkdir() but I am unable to create any another directories inside it. I can see in plesk that the newly created folder has a uid and gid of "apache" which is different to the other folders. After searching it seems that the host has safe_mode on, I've found a fair bit of info/people that have this issue but whats the fix? Unsure if I can get the host to turn it off so how can I create folders and sub folders? Any help appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/86011-mkdir-only-one-level/ Share on other sites More sharing options...
kickassamd Posted January 15, 2008 Share Posted January 15, 2008 Its been a bit since I have done anything like that with *nix but in Windows in order to create folders within folders you have to have write permissions on that folder in order for PHP to be able to create the folders. Have you checked this? CHMOD 777 Quote Link to comment https://forums.phpfreaks.com/topic/86011-mkdir-only-one-level/#findComment-439418 Share on other sites More sharing options...
Hayce Posted January 15, 2008 Author Share Posted January 15, 2008 Yea mate tried that. Tried creating with 0777 / 0755 / 02777 no joy. Tried chmod() with the same after initial creation and still nothing. Seems to me that it's a ownership problem rather than permissions but I can't find the fix lol. And yea this is under *nix. Quote Link to comment https://forums.phpfreaks.com/topic/86011-mkdir-only-one-level/#findComment-439423 Share on other sites More sharing options...
kickassamd Posted January 15, 2008 Share Posted January 15, 2008 Have you contacted your host? Last time I had an issue like this b4 I moved to Windows hosting was with Host Gator and I couldnt execute a few PHP files because of the UID or something was incorrect, contacted them and walla. Quote Link to comment https://forums.phpfreaks.com/topic/86011-mkdir-only-one-level/#findComment-439425 Share on other sites More sharing options...
Hayce Posted January 15, 2008 Author Share Posted January 15, 2008 I sure have and last time he looked he reckoned he couldn't see anything a-miss. Just so I'm clear though, this is a server problem and not something on my (code) end? Because I've been scratching my head for a while and coming up with nothing, ideally I'd like to be able to say "you have to change xyz for me, thank you". Quote Link to comment https://forums.phpfreaks.com/topic/86011-mkdir-only-one-level/#findComment-439432 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.