Hi sagar

The $xarray,$status parameters are part of the PHP exec command not the
embedded mysqldump command.

   $result = exec("mysqldump -umyname --password=mypassword
                 databsename >db.dump",$xarray,$status);

Thanks, Tony


sagar wrote:
> 
> did u got it or not ?
> recently i used the mysqldump.
> 
> the syntax is as used by me is
> 
> mysqldump [OPTIONS] database [tables] > (destination file);
> 
> i dont know why used $xarray,$status.
> 
> hope u'll clear out
> 
> /sagar
> 
> ----- Original Message -----
> From: Tony Frasketi <[EMAIL PROTECTED]>
> To: sagar <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 04, 2001 11:53 PM
> Subject: Re: [PHP] Newbie Question: mysqldump via PHP
> 
> > Hi Sagar
> > My goof in the email composition! 'tablename' should have been 'dbname'.
> > So yes, the database name is specified and I am attempting to dump the
> > entire database with all tables.
> >
> > Thanks for point out my error.
> >
> > sagar wrote:
> > >
> > > Did u mention the database name from where the table has to be
> > > picked up.
> > >
> > > check out the manual for correct syntax.
> > >
> > > /sagar
> > > ----- Original Message -----
> > > From: Tony Frasketi <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, September 04, 2001 11:25 PM
> > > Subject: [PHP] Newbie Question: mysqldump via PHP
> > >
> > > > Hello listers
> > > >
> > > > I'm trying to implement a mySQL database dump via PHP4 on a unix
> system
> > > > as follows...
> > > >
> > > >    ------------------------------------------------------
> > > >    $result = exec("mysqldump -umyname --password=mypassword
> > > >                   tablename >db.dump",$xarray,$status);
> > > >    echo "status[$status]<br>";
> > > >    ------------------------------------------------------
> > > >
> > > > I get the following error PHP error message...
> > > >
> > > >    status[127]
> > > >
> > > > and the file 'db.dump' has been created but it has 0 bytes.
> > > >
> > > >    -rw-r--r-- 1 nobody nobody 0 Sep 4 13:27 db.dump
> > > >
> > > > Although I can execute the mysqldump program from the unix shell and I
> > > > get...
> > > >
> > > >    -rw-r--r-- 1 myname myname 23704 Sep 4 13:18 db.dump
> > > >
> > > > My questions are...
> > > >
> > > >  1. Can the mysqldump program be executed via PHP or not and if not
> > > > can you please explain why?
> > > >
> > > >  2. Is there another way of doing this via PHP?
> > > >
> > > > Thanks in advance
> > > > Tony Frasketi
> > > > P.S. Please answer direct, since I'm only subscribed to the digest.
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > >
> > > _________________________________________________________
> > > Do You Yahoo!?
> > > Get your free @yahoo.com address at http://mail.yahoo.com
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to