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, Link to comment https://forums.phpfreaks.com/topic/116060-error-in-a-php-mysql-script/ 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 Link to comment https://forums.phpfreaks.com/topic/116060-error-in-a-php-mysql-script/#findComment-596786 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 Link to comment https://forums.phpfreaks.com/topic/116060-error-in-a-php-mysql-script/#findComment-596792 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. Link to comment https://forums.phpfreaks.com/topic/116060-error-in-a-php-mysql-script/#findComment-596797 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 Link to comment https://forums.phpfreaks.com/topic/116060-error-in-a-php-mysql-script/#findComment-596803 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.