By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,751 Members | 1,175 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,751 IT Pros & Developers. It's quick & easy.

Problem with exec

P: 31
Hi,

I am using PHP 5.2.5 and IIS 5.1 on Windows XP SP3 machine. I am trying to execute an exe by using exec or system command.
When I run this php script from the command line it works fine without any problem.
When I try to run the script from IE7 the exe is crashing,
sample code:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. exec("C:\\temp\\uudecode.exe c:\\temp\\test.txt");//or
  3. system("cmd.exe /c C:\\temp\\uudecode.exe c:\\temp\\test.txt");
  4. ?>
  5.  
I got that uuencode code from uuencode.

What will be the reason for crashing???

If everything works well I have to put this on window 2003 server.
Oct 10 '08 #1
Share this Question
Share on Google+
2 Replies


pbmods
Expert 5K+
P: 5,821
Heya, Nelluru.

If the executable is crashing, it sounds like a problem with the executable, not with your PHP script.

Do you get any error message or debug output?
Oct 10 '08 #2

P: 31
Heya, Nelluru.

If the executable is crashing, it sounds like a problem with the executable, not with your PHP script.

Do you get any error message or debug output?
If there is any problem with the exe it should crash while running the php script in command line.
What is the difference in executing a script in command line and in browser???

I get the error message.
Oct 11 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.