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

running command line and php

Discussion in 'Plesk for Linux - 8.x and Older' started by stuayre, Jan 21, 2007.

  1. stuayre

    stuayre Guest

    0
     
    Hi,

    im trying to write an automated setup script in php
    but i can't seem to get the domain.sh or any of the other
    command line tools to work in PHP.

    I've tried...

    Code:
    exec('usr/local/psa/bin/./domain.sh -i mydomain.com',$result);
    

    Code:
    exec('/usr/local/psa/bin/./domain.sh -i mydomain.com',$result);
    

    Code:
    exec('../../../../usr/local/psa/bin/./domain.sh -i mydomain.com',$result);
    

    but $result is always empty, it works fine from shell, how can I run these programs from within PHP?


    cheers

    Stu
     
  2. stuayre

    stuayre Guest

    0
     
    Just to answer my own question


    this is the only one that works

    Code:
    exec('/usr/local/psa/bin/./domain.sh -i funkygroup.com 2>&1',$status);
    

    but it always errors with "Permission denied"


    does anyone know what i need to do to get this to work?



    cheers

    Stu
     
Loading...