The php exec () function cannot be executed in windows server 2008.

Source: Internet
Author: User
Tags php file
In windows server 2008 R2, the php execute command fails to call the. Exe file, but the php file is executed in the command line, and the. Exe file can be called.

 

The security mechanism of windows server is not the same as that of linux. Apart from opening ports, components and services are also required. php running users must have full permissions on the components.

 

In windows server, how to open the port is not mentioned. The following describes how to allow users to have component permissions.

 

1, "start"-> "run"-> 32-bit system input dcomcnfg or 64-bit system input comexp. msc

 


Component Commands

 

2. "component service"-> "computer"-> "My Computer"-> "DCOM configuration" find the component you want to execute, add the everyone user and modify the ID

 


Add everyone users to components

 


Modify component ID User

 

3. "server management devices"-> "configuration"-> "service"-> "apache" right-click Properties

 


Modify the login user of apache

 

After the modification, restart apache so that you can use php to call the. Exe program of the group. The preceding example uses word as an example. In the end, we recommend that you do not use a windows System. windows is a pitfall.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.