Jin597 Posted May 15, 2007 Share Posted May 15, 2007 I've been having some troubles figuring out why the mkdir command doesn't work... currently have php5.0 installed and I am trying to do the command via a web-script. Below is the past of the data. Any ideas why the mkdir function is always returning false? (permissions are 775) $mydir = $_POST['directoryname']; if (mkdir($mydir, 0755)) { echo "success"; }else{ echo "failed"; } I've tried just a straight mkdir('testing', 0755); and it also didn't work... not sure what is going wrong here. Quote Link to comment https://forums.phpfreaks.com/topic/51449-solved-mkdir-troubles/ Share on other sites More sharing options...
Orio Posted May 15, 2007 Share Posted May 15, 2007 Add to the top of the script error_reporting(E_ALL); to see if you get any errors. Orio Quote Link to comment https://forums.phpfreaks.com/topic/51449-solved-mkdir-troubles/#findComment-253378 Share on other sites More sharing options...
Jin597 Posted May 15, 2007 Author Share Posted May 15, 2007 thanks for the response Orio, put the line in right at the start of the script. No errors were reported. However, does it matter if in php.ini that display_errors = Off? if so, can I set it to On via the .htaccess file? Quote Link to comment https://forums.phpfreaks.com/topic/51449-solved-mkdir-troubles/#findComment-253381 Share on other sites More sharing options...
Jin597 Posted May 15, 2007 Author Share Posted May 15, 2007 found the problem... it was in permissions. the parent folder had the wrong permissions ... ah.. need sleep... however, still not sure why this didn't show up with the errors on, but anyway, it works now... will look more in the am. marking as [solved - PMFI] Problem magically fixed itself Quote Link to comment https://forums.phpfreaks.com/topic/51449-solved-mkdir-troubles/#findComment-253396 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.