1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

PHP exec() function doesn't work

Discussion in 'Plesk for Windows - 8.x and Older' started by seigo, Jun 22, 2005.

  1. seigo

    seigo Guest

    0
     
    Hi,

    I setuped Plesk 7.5 om Windows 2003 Server.
    but PHP exec() function doesn't work.
    Do you know how to solve this problem?

    Thanks.
     
  2. alex042

    alex042 Guest

    0
     
    Functions like these are disabled when safemode is on so you may need to turn safemode off on the server or for that domain. You may want to only turn it off for that domain because these kind of functions can be a security hazard so by fixing this 'problem' you can create another one if you allow everyone on the server access to these functions.
     
  3. OlegB

    OlegB Guest

    0
     
    I think that Plesk users haven't access to c:\windows\system32\cmd.exe. You should add to psacln group read and execute permissions to cmd.exe
     
  4. flyby

    flyby Guest

    0
     
    how do i turn off safemode?
     
  5. vekna

    vekna Guest

    0
     
    It is a simple =))
    in C\windows\php.ini
    safe_mode = Off
     
  6. seigo

    seigo Guest

    0
     
    Hi guys again,

    We have just switched to Plesk again and I still have problems :) A few facts:

    - fafe_mode is off
    - cmd.exe is copied to Plesk's PHP folder and permissions for everyone is setted

    It worked for PHP version which has been installed manually for IIS as CGI and now when we installed Pleask exec function stops working. Strange.

    Thanks for any additional help!
     
  7. AbsolutelyFreeW

    AbsolutelyFreeW Guest

    0
     
    beside the permission to php, permission to the file you want to run with exec and directories along its path is necessary. In addition, you need to check your program runs with the internet user, by using runas command. if exec does not work for yuo, you may also try using popen/pclose
     
  8. seigo

    seigo Guest

    0
     
    I tryed to set permissions for Everyone for cmd file which I call from exec() function. In this command file I call convert.exe (Imagemagick utility) to make some changes on image file. I also set permissions for Everyone to folder where convert.exe copy result image. Those steps do not help to run the process :( It's interesting but the same stuff works well in other hosting management solution.
     
  9. davecates

    davecates Guest

    0
     
    anyone got a solution?
    I just upgraded to Php 5.2.5. exec was working fine until then and now it's broken. I only have ISAPI being used - is CGI needed?
    Any help please???
     
  10. davecates

    davecates Guest

    0
     
    I've just found that, via using FileMon, when I upgraded the version of PHP on my server it not only screwed with my Plesk CP but also the permissions!!!
    That was why I couldn't use the exec command from within PHP - even with CMD.exe set with permissions it was the IWPD_1 account that required permissions.
    Hope this helps point someone else in right direction ;)
     
Loading...