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?

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.

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.

Archived

This topic is now archived and is closed to further replies.

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