Summary of running EXE program using PHP under IIS75

Source: Internet
Author: User
Spent several days to study how to use PHP running EXE program under IIS7.5, finally a bit of success, although the operation is successful but a lot of restrictions, such as now only run "pure background" of the program, directly upload the file form of the image also failed (upload Photo stream can be successful), still need to try further.

Here's a brief look at the things to be careful about:

1. Configure the Site Directory permissions to increase the IUSR account;

2. Configure the Cmd.exe file permissions to increase the IUSR account;

3. If necessary, add the IUSR account to Administrator privileges (but this is a big security risk, so consider it carefully);

4. A very important point--php use EXEC () and other functions, can only execute "pure background" program, otherwise it will cause the case of the program card dead;

The PHP code is as follows:

 
  Execution result ". $result;? >

The source code for Opf.exe is as follows:

#include
 
  
   
  using namespace std; int main (int argc,char*argv[]) {    file* FILE =fopen ("D:\\wwwroot\\a.txt" , "W");    fprintf (file, "good morning!");    fclose (file);    return 2;}
 
  

The above describes the use of PHP under the IIS75 to run EXE program summary, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Related Article

    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.