Jump to content
MakeWebGames

shell_exec and windows


Floydian

Recommended Posts

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...