stelthius Posted July 22, 2008 Share Posted July 22, 2008 Hi guys, just wondering if anyone can shed some light on this little problem im having, i get this error on a MySQL backup script Warning: mkdir() [function.mkdir]: No such file or directory in /var/www/html/panel/modules/mysql/backup.php on line 24 Database Backup Here is lines 20 - 30 from that page $path = $row_User['homedir'] . '/_Backups/'; if (!is_dir($path)) { mkdir($path, 0777); <- This is line 24 } echo "<b>Database Backup</b><br>"; $database = $db_name; $counter = 0; Any help or ideas is welcome guys, Quote Link to comment Share on other sites More sharing options...
craygo Posted July 22, 2008 Share Posted July 22, 2008 Try using the absolute path for your directory locations. Example $path = '/var/www/html/panel/modules/mysql/'.$row_User['homedir'].'/_Backups'; Also when working with directories leave out the last slash Ray Quote Link to comment Share on other sites More sharing options...
stelthius Posted July 22, 2008 Author Share Posted July 22, 2008 Thanks for the reply, but i tried it and it didnt work, its confusing me now because it will let a admin account make a backup but not a user account, but both the user and admin files have the same perms, so im lost here lol Quote Link to comment Share on other sites More sharing options...
craygo Posted July 22, 2008 Share Posted July 22, 2008 try using 775 not 777. Some hosts won't allow 777. Quote Link to comment Share on other sites More sharing options...
stelthius Posted July 22, 2008 Author Share Posted July 22, 2008 Hi mate, Im the host, this is a server in my Network in the DC so yes everything on the box is allowed, and id just like to say i solved the problem thanks for your help mate also. Rick Quote Link to comment 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.