Jump to content

exec function in PHP 4 and IIS7 on windows server 2003


raman

Recommended Posts

I have a PHP script containing the function exec which works fine in PHP 4 in IIS 7 on Windows 7. However this function does not work in PHP 4 in IIS 5 on windows server 2003. But I have to make it work there because that is what we have on our web server.

Can someone provide a solution?

Link to comment
Share on other sites

Why do you think this is a PHP problem, when your PHP version is the only constant here? 

 

I would suggest looking over the IIS5 configuration and checking the runtime implememntation of PHP and the permissions that it is granted.  IIS7 and IIS5 use different implememntations of the CGI/FastCGI runtimes for scrip languages, and servers have more restrictive runtime permissions that desktops do.

Link to comment
Share on other sites

I am sorry for the mistake in the question. Actually the PHP version with IIS 7 is PHP 5. Infact, PHP 4 was not compatible with IIS 7 and Mysql 5 which I have.

That's why I think that this is a PHP problem.

This page provides some clues:

http://php.net/manual/en/ref.exec.php

However I did not know how to give rights of read and execute for the cmd.exe file to the IIS user.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.