Posted by Mandragon03 on 10/02/72 12:00
I am using php 5.2.5 via a wamp server on my machine. I have created a
web interface to a mysql database using php. The web interface has a
link to a php file which calls a dos batch file like this:
$Text = shell_exec("c:\mydatabase\convertdb.bat $Language");
where $Language is set to "English" or "Chinese" etc etc ( I verified
that it has the correct value ).
The batch file contains a call to mysqldump.exe.
I can run the batch file manually and it works fine, however the
batch file will not execute through the php script as called from the
web interface I created for it.
On a side note If I make a call like this:
$Text = shell_exec("dir");
echo "$Text";
it works fine.
It seams to me like a permissions issue or some security configuration
that will not allow you to call batch files. I have been looking at
safe_mode but have not had any success.
Any ideas?
Thank you for your time!
[Back to original message]
|