raman Posted July 4, 2011 Share Posted July 4, 2011 I am using IIS on windows Xp and windows server 2003. In my php script is embedded exec function to execute a command. however this function is working on windows 7 but not on windows XP and windows server 2003. Can someone suggest a solution? Quote Link to comment https://forums.phpfreaks.com/topic/241030-exec-not-working-in-windows/ Share on other sites More sharing options...
QuickOldCar Posted July 4, 2011 Share Posted July 4, 2011 Can you show the script? I'll run it similar on my xp and see if it works. Is usually permissions issue though. Quote Link to comment https://forums.phpfreaks.com/topic/241030-exec-not-working-in-windows/#findComment-1238057 Share on other sites More sharing options...
raman Posted July 4, 2011 Author Share Posted July 4, 2011 The script is very long, but I will just show how it is. <?php /*code .... */ exec(./blast.pl) ?> Quote Link to comment https://forums.phpfreaks.com/topic/241030-exec-not-working-in-windows/#findComment-1238110 Share on other sites More sharing options...
trq Posted July 4, 2011 Share Posted July 4, 2011 Could be any number of things, you will need to provide more information. Can you execute the script form the command line? Do you even have Perl installed? Quote Link to comment https://forums.phpfreaks.com/topic/241030-exec-not-working-in-windows/#findComment-1238116 Share on other sites More sharing options...
raman Posted July 4, 2011 Author Share Posted July 4, 2011 Yes I can execute it from command line, I also have perl installed. Quote Link to comment https://forums.phpfreaks.com/topic/241030-exec-not-working-in-windows/#findComment-1238118 Share on other sites More sharing options...
trq Posted July 4, 2011 Share Posted July 4, 2011 Care to at least attempt to help us help you? What error are you getting? You do have error reporting on don't you? Quote Link to comment https://forums.phpfreaks.com/topic/241030-exec-not-working-in-windows/#findComment-1238120 Share on other sites More sharing options...
raman Posted July 4, 2011 Author Share Posted July 4, 2011 the script keeps on running without the exec line. i don't know where to turn on error reporting and where to watch it. Quote Link to comment https://forums.phpfreaks.com/topic/241030-exec-not-working-in-windows/#findComment-1238178 Share on other sites More sharing options...
dcro2 Posted July 6, 2011 Share Posted July 6, 2011 Put this at the top of your script: error_reporting(E_ALL); ini_set('display_errors', 1); You may want to try passing ./exec.pl to the perl executable itself. Quote Link to comment https://forums.phpfreaks.com/topic/241030-exec-not-working-in-windows/#findComment-1239048 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.