Floydian Posted September 22, 2008 Share Posted September 22, 2008 Alrighty, I've got an sql file that is 100% tested and works. On a linux os, I can run shell_exec('mysql blahblah') and the sql file loads up into the database no problems. On windows, this fails for some reason. The mysql/bin folder is in my system path, so the path isn't the problem here. I've tested the database connection (yes, the command does use -u, -p) and the everything about the database connection is good. The problem seems to be centered on the shell_exec not executing the command. PHP is not running in safe mode as demonstrated by this script: <?php $output = shell_exec('dir'); echo $output; ?> This script does indeed produce the desired output. I'm not running php from the command line, but running as an apache module. Apache 1.3 PHP 5.2.5 Windows XP Thanks for any help. Quote Link to comment Share on other sites More sharing options...
Floydian Posted September 22, 2008 Author Share Posted September 22, 2008 Re: shell_exec and windows Problem solved. I had a configuration setting set wrong. So, the code was working. It was just user error. ;) Quote Link to comment Share on other sites More sharing options...
POG1 Posted September 22, 2008 Share Posted September 22, 2008 Re: shell_exec and windows :mrgreen: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.