crazy exec()...

From: Date: Sat, 06 Oct 2001 20:05:58 +0000
Subject: crazy exec()...
Groups: php.general 
Request: Send a blank email to php-general+get-70246@lists.php.net to get a copy of this message
I'm still struggling to get exec() (or whatever) to work on my Win98 webserver.... it's running Apache 1.3.12 and Mysql-Max. somewhere in my code I have this: <? $newBkpFile=date("d-m-Y_H-i-s").".sql"; $cmd="mysqldump -h $dbHost --user=$local_user --password=\"$local_pwd\" --opt --databases e2f > $newBkpFile"; exec($cmd); ?> if I do something like die($cmd) and copy paste it into the DOS prompt, it works like a charm and dumps the DB to the new file. But exec gives me the most weird results... for starters it shouldn't output anything since there's a '>' in the command right? But it does... this is what it outputs (when I use system() instead to debug): # MySQL dump 8.14 #
# Host: localhost    Database: e2f
#-------------------------------------------------------- # Server version 3.23.38-max what is this? it looks like the beggining of a dump right? but where is the rest??? why does it suddenly STOP? Please HELP!

« previous php.general (#70246) next »