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

Plesk Subdomain Manager 0.0.2 Beta

Discussion in 'Plesk for Linux - 8.x and Older' started by haggy, Aug 19, 2006.

  1. haggy

    haggy Guest

    Hi Folks,
    after I went mad with the FU***** Plesk subdomain handling I wrote addon for Plesk.

    With the "Plesk Sudo Manager" you can manager your Subdomains.

    - make easy a forward
    - change the webroot to a existing dir of your "normal" webspace in "YOU/PATH/DOMAIN/httpdocs"

    In the attachment you can find the first version to test it on you maschine.



    Cya Haggy
  2. Crazy X

    Crazy X Guest

    Wow! Exactly for what i'm searching for :)

    But i have a Problem with the function

    function prepareDomain($dom){
    $toExec "/usr/local/psa/admin/bin/websrvmng -u --vhost-name=".$dom;
    $createVhost str_replace("{DOMAIN}",$dom,DOCROOT)."conf/vhost.conf";

    exec ('./wrapper "1" "0" "'.$createVhost.'"');
    exec ($toExec);
    for what is wrapper ? After this function there is no vhost.conf in my conf directory.

    $toExec is /usr/local/psa/admin/bin/websrvmng -u --vhost-name=mydomain.de
    $createVhost is /var/www/vhosts/mydomain.de/conf/vhost.conf
    seems both are ok...

    i see always:

    Your domain isn't prepared for the extended subdomain administration.
    Should the Plesk Sudo Manager do that now?

    Thanks for help!

    Crazy X
  3. haggy

    haggy Guest


    The wrapper calls the vhost_writer.sh (without thats u can't write the vhost.conf)

    the the permissions of "wrapper to 4755"

    chmod 4755 wrapper

    Then it works!

  4. Crazy X

    Crazy X Guest

    it don't work :(

    but, can it be that php don't allow exec ?
    because wenn i just write

    exec ('touch datei');

    there is no file named datei...
  5. haggy

    haggy Guest

    Just are question?

    U are german, right?

    Then lets talk german!!

    Ist doch einfacher für beide, oder?
  6. Crazy X

    Crazy X Guest

    Hab mir schon gedacht das du ne German Person bist :)

    Ich bin bei HostEurope und habe ein VPS (virtueller Server).
    bei phpinfo() steht das die safe_mode "Off" ist. Also ist da schon mal nicht das Problem.

    $result = shell_exec("ping ".$ip);
    echo "|".$result."|";

    funktioniert z.B. leider auch nicht :-(
    Wie kann ich den testen ob exec geht?

    Hast du ICQ (oder ähnliches)?

  7. Lonesome Walker

    Lonesome Walker Guest

    Eh, macht doch ned immer alles per ICQ klar;
    schreibt zumindest die Ergebnisse hier nieder ;)

    Ich bin auch bei HostEurope...

    Lonesome Walker
  8. Crazy X

    Crazy X Guest

    things we change:

    1. for HostEurope we need to change doit.php

    if($subdata["php"] == "true"){
    $vhost_set.= '<IfModule [B]sapi_apache2.c[/B]>\\n';
    $vhost_set.= '    php_admin_flag engine on\\n';
    $vhost_set.= '    php_admin_value open_basedir "'.str_replace("{DOMAIN}",$_GET["dom_name"],DOCROOT)."httpdocs/".$_POST["root"].':/tmp"\\n';
    $vhost_set.= '</IfModule>\\n';
    $vhost_set.= '<IfModule mod_php5.c>\\n';
    $vhost_set.= '    php_admin_flag engine on\\n';
    $vhost_set.= '    php_admin_value open_basedir "'.str_replace("{DOMAIN}",$_GET["dom_name"],DOCROOT)."httpdocs/".$_POST["root"].':/tmp"\\n';
    $vhost_set.= '</IfModule>\\n';
    2. we change the permission of wrapper to 4755

    3. we change the Owner of the Plugin-Dir (where you put your Files inside) to root:psaadm

    4. an advise: first set your options for your subdomain in Plesk like php, perl, ... and than make changes with this plugin
  9. Lonesome Walker

    Lonesome Walker Guest

    Dankeschön :D
  10. Crazy X

    Crazy X Guest

    a little revision from me in the function getDocRoot in funcs.php (red is new source)

    And at the end of the file doit.php (red is new source)

  11. ferdinandhuber

    ferdinandhuber Guest

    Ich habe all eure Fixes gemacht aber trotzdem bekomm ich immer noch die Fehlermeldung
    Beim Daraufklicken ist erscheint sie wieder !?

    Könnt Ihr mir da helfen? Danke!