Discussion: MySQL upload problem
Afficher un message
Vieux 12/09/2007, 02h27   #5
brian
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] MySQL upload problem

tedd wrote:
> I was thinking that I could ftp the sql file to the clients server and
> then run a php script on his server, something like:
>
> $sql = "mysql -h$dbhost -u$dbuser -p$dbpass $dbname < $filename";
> system($sql);
>
> But, that didn't work -- however -- using mysqldump did download the
> file. So, I'm close.
>
> I know that safe_mode is ON, but I'm not sure if that's what's causing
> the failure or something else.
>


Just a thought: did you pass the full path for $filename?

Also, pass in a return var to read:

system($sql, $ret);

if ($ret === 0) { echo 'sucess'; }

Sorry, you'll have to hunt down the other return codes that MySQl might
send back.

If safe_mode is enabled, your command will be escaped with
escapeshellcmd() but that's about it.

If you can FTP it but can't get a shell is there any chance you could
convince an admin to run the script?

brian
  Réponse avec citation
 
Page generated in 0,04354 seconds with 9 queries