View Single Post
  #2   (View Single Post)  
Old 20th September 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

for one thing, you might actually try checking for errors....

You've said nothing about your webhost, so there is nothing that anyone here can assume about the execution environment.


system() returns the last line of output on success, false on error. Also because of being a (server side) web scripting language, it has security that can be set up --- safe mode ! When safe mode is enabled, the command is escaped, killing shell specials (e.g. > becomes \>). Safe mode can also be used to restrict the commands that can be executed by PHP scripts.


If zip is failing, it's quite possible that either:

A.) zip/mysqldump is not installed,
B.) zip/mysqldump is not in your search path (or safe_mode_exec_dir),
C.) You do not have permission to execute the program(s),
D.) the arguments are wrong (e..g you can execute zip, but mysqldump args \> file failed)


I don't know MySQL enough to know what access controls may be placed on a user trying to mysqldump their own data, but if it's possible to restrict that, it could be set that way on your host.


When it comes to learning PHP, if you go to the documentation and read the 'Language Reference' section, you've learned most anything you need to know.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.

Last edited by TerryP; 20th September 2008 at 06:26 PM.
Reply With Quote