Reply to Re: MySqldump creates empty file

Your name:

Reply:


Posted by J.O. Aho on 08/22/06 04:15

rhys@biznz.net wrote:
> I am trying to create a one click backup database script so non-geek
> office staff can do backups, but so far I can only output empty files -
> the new file appears, but it is empty....
>
> E.G.
> $db_user = "root";
> $db_password = "";
> $db_database = "or";
> $db_server = "localhost";
> $backup_path = "C:\\xampp\\htdocs\\openreal\\admin\\backup\\";
> $path_to_mysqldump = "C:\\xampp\\mysql\\bin\\";
> $filename = "backup".date("YmdHis").".sql";
>
> shell_exec ("mysqldump $db_database > $path_to_mysqldump.$filename
> --user=$db_user --password=$db_password");
>
> I have tried various forms of this syntax with no content output?

Don't think microsofts qdos supports stream redirections and I don't think you
want a dot as the first in the filename.

try

shell_exec ("mysqldump $db_database --result-file=$path_to_mysqldump$filename
--user=$db_user --password=$db_password");


//Aho

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация