Don't know how to fix, but for some reason I have had a lot of hassle using mysqldump with the -pPassword command, linux and windows. Never seems to work for me, it should according to documentation, so it might be ignoring that option and prompting for password input, in which case your sunk, use an SH script to echo a password to prompt. Or create a user without password if your system allows this, but a huge security risk.

adarshakb

12-19-2010, 06:32 PM

actually that didnot work at all for me :(

Finally i used another script from phpclasses website and got the same job done.

I still need to findout whats wrong with this tho :confused:

djm0219

12-19-2010, 06:51 PM

Does your provider allow external programs to be run by PHP? Does your installation of PHP have safe_mode enabled?

The return of false from the system command indicates that the system call is not working. See http://us.php.net/manual/en/function.system.php for more details.

Have you tried using exec instead of system? If you're doing a DB dump you really shouldn't need anything it might return. I've been using exec via a cron to back up DBs for years without any problems/issues.

adarshakb

12-19-2010, 07:18 PM

if i use the same system() function to execute ANY other commands and output to a file i am getting proper output.
The question of hosting doesnt come here as this error is in my local comp AND host

My safe mode is off

Inigoesdr

12-19-2010, 11:45 PM

Try using the full path to mysqldump. You might also have to escape your password if it contains spaces or special characters.

adarshakb

12-20-2010, 08:41 AM

Try using the full path to mysqldump. You might also have to escape your password if it contains spaces or special characters.
If i do that how can i execute it on server then(using godaddy)? also i dont have any special characters in password so there is no problem.