Page 1 of 1

Two errors...[SOLVED]

Posted: Mon Jan 30, 2006 2:31 pm
by raghavan20
I am writing a script to backup a database structure and data...
1. When there is a file that exists...I am not able to delete it using unlink()...why?
2. The script runs for more than 30s but it stops after that time....how do I make it run until it takes the backup of all necessary structure and data

Code: Select all

Warning: unlink(recoverDatabase.sql): Permission denied in j:\apache\apache\htdocs\backup\FileHandler.class.php on line 75

Fatal error: Maximum execution time of 30 seconds exceeded in j:\apache\apache\htdocs\backup\FileHandler.class.php on line 67

Posted: Mon Jan 30, 2006 2:40 pm
by josh

Code: Select all

set_time_limit(0);



chmod(0777, 'file')

Posted: Mon Jan 30, 2006 2:40 pm
by raghavan20
it is a windows machine...

Posted: Mon Jan 30, 2006 2:41 pm
by josh
Then check the directory/file is not read only (right click - properties)

Posted: Mon Jan 30, 2006 3:09 pm
by raghavan20
thanks a lot jshpro2 that worked and solved two problems...