TheMayhem Posted April 27, 2011 Share Posted April 27, 2011 I am working on a debug script to see if users had setup my script correctly. The very last part I have is a little debug section where it checks for some common errors. I am having problems with one last part, which is checking to see if they correctly setup the chmod permissions to 0777. This is my coding below: // Directory Permissions $path = $_SERVER['DOCUMENT_ROOT']; $customavatar = $path."/customavatars"; $smilies = $path."/images/smilies"; $store = $path."/images/pointmarket/store"; $text4 = $vbphrase['market_maintenance_directory_good']; $icon4 = "$site_url/checkmark.png"; if (!is_writable(dirname($customavatar))) { $badfolder = $customavatar; $text4 = $vbphrase['market_maintenance_directory_bad']; $icon4 = "$site_url/warning.gif"; } if (!is_writable(dirname($smilies))) { $badfolder = $smilies; $text4 = $vbphrase['market_maintenance_directory_bad']; $icon4 = "$site_url/warning.gif"; } if (!is_writable(dirname($store))) { $badfolder = $store; $text4 = $vbphrase['market_maintenance_directory_bad']; $icon4 = "$site_url/warning.gif"; } Now I've physically tested it to see if I have all directories chmodded to 0777 and they all are. However, whenever I output each time I am being shown that the directories are showing me that they aren't writeable because $badfolder, $text4, and $icon4 are all being reassigned within the if statement. I've tried each one of the three above to see and all of them are going within the if statement even though they shouldn't be. Can anyone tell me what I might be doing wrong? Quote Link to comment https://forums.phpfreaks.com/topic/234805-trouble-with-is_writable/ 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.