PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a simple script that backup the contents of a database and place the file on the server.
The problem is that this script works fine on my Apache server, but not on the IIS server (HTTP 500 error).
try providing the full path to the mysqldump executable, its probably not on the include paths. also, check that you are using the right credentials for the server
Thanks for your help, I have the correct credentials and have tested the mysqldump function on the server manually and it writes to the directory no problem.
Is there anything I can test to see if the system function is working correctly, e.g. replace the $command variable with something simple?
Generally I use exec() and not system(). Either way, the process running it (probably apache) might not have sufficient permissions. Check the output from the system() function call for more information on what's going on. Try running it with a basic command such as 'ls'