Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Need help creating MySQL backups with system()
Old 01-29-2008, 02:07 AM Need help creating MySQL backups with system()
The PHP Professor

Posts: 340
Name: Alex
Location: Behind You
Trades: 0
I have recently learned about the "mysqldump" in PHP. I try to execute the following commands, but when i do i get a blank file:

PHP Code:

system
("mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname > $backupFile"); 
I'm currently running PHP5(Latest version) and i receive no errors when script is executed. Can somone help me?

Thanks in advance!
__________________
Go Kirby! <(" . "<) (^" . "^) (>" . ")> Talkupation!
microcolt is offline
Reply With Quote
View Public Profile Visit microcolt's homepage!
 
 
Register now for full access!
Old 01-29-2008, 03:01 AM Re: Need help creating MySQL backups with system()
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
Show us please how does the command look like after substitution of all variables, and also what is the value of second argument to system() which you do not use right now.

First of all I can recommend to use absolute path to mysqldump.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 01-29-2008, 09:58 AM Re: Need help creating MySQL backups with system()
ersinacar's Avatar
Junior Talker

Posts: 1
Trades: 0
Quote:
Originally Posted by microcolt View Post
I have recently learned about the "mysqldump" in PHP. I try to execute the following commands, but when i do i get a blank file:

PHP Code:

system
("mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname > $backupFile"); 
I'm currently running PHP5(Latest version) and i receive no errors when script is executed. Can somone help me?

Thanks in advance!
have your user permission for run this command line ?
ersinacar is offline
Reply With Quote
View Public Profile
 
Old 01-29-2008, 06:08 PM Re: Need help creating MySQL backups with system()
The PHP Professor

Posts: 340
Name: Alex
Location: Behind You
Trades: 0
i dont know, i know that i can use the system() function though.
__________________
Go Kirby! <(" . "<) (^" . "^) (>" . ")> Talkupation!
microcolt is offline
Reply With Quote
View Public Profile Visit microcolt's homepage!
 
Old 02-01-2008, 11:30 PM Re: Need help creating MySQL backups with system()
tazmanny's Avatar
Banned

Posts: 16
Name: manuel
Trades: 0
doesnt your host allow backups? I have tried 2 webhosts wiht php support on both and I have had the option to back up all my databases, usernames, files and everything else.
tazmanny is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Need help creating MySQL backups with system()
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.68733 seconds with 12 queries