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

Possible API bugs?

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by Matthew James, Apr 12, 2010.

  1. Matthew James

    Matthew James Basic Pleskian

    21
    73%
    Joined:
    Dec 7, 2009
    Messages:
    71
    Likes Received:
    1
    Hi,

    It seems that whatever you try and set the php_handler_type to for a domain template created through the API, it ignores the setting and sets it to "module".

    The request I sent included the following which returned "ok" and the template was created:

    <property>
    <name>php_handler_type</name>
    <value>cgi</value>
    </property>

    Yet when looking in Plesk or retrieving the details of the template, it shows it set as Apache Module:

    <property>
    <name>php_handler_type</name>
    <value>module</value>
    </property>

    Also, it seems to ignore the "same_ssl" parameter for setting "Use a single directory for housing SSL and non-SSL content". In fact, it doesn't even report "same_ssl" back as one of the parameters when retrieving info about the template, you can see it's not checked in Plesk for the template though.

    Has anybody come across these bugs? If so, do you know of any workarounds?

    Thanks
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    You should use it as

     
  3. Matthew James

    Matthew James Basic Pleskian

    21
    73%
    Joined:
    Dec 7, 2009
    Messages:
    71
    Likes Received:
    1
    Well it doesn't matter if you set it as fastcgi or cgi, it still gets completely ignored and just gets set as apache module. According to the "retrieving descriptors of hosting settings", this should be possible:

    <property>
    <name>php_handler_type</name>
    <type>string</type>

    <enum>
    <value>module</value>
    <label>__php_module_handler</label>
    </enum>

    <enum>
    <value>cgi</value>
    <label>__php_cgi_handler</label>
    </enum>

    <enum>
    <value>fastcgi</value>
    <label>__php_fastcgi_handler</label>
    </enum>

    <writable-by>admin</writable-by>
    <label>__php_run_as</label>
    <extension>
    <levels>domain</levels>
    <levels>subdomain</levels>
    </extension>
    </property>

    Also, do you know why the "same_ssl" parameter is also being ignored, this is also listed when retrieving descriptors of hosting settings:

    <property>
    <name>same_ssl</name>
    <type>boolean</type>
    <writable-by>admin</writable-by>
    <label>__same_ssl</label>
    <extension>
    <levels>domain</levels>
    <levels>subdomain</levels>
    </extension>
    </property>

    Thanks
     
    Last edited: Apr 14, 2010
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    I have forwarded your questions to developers. I will update this thread with their reply as soon as I receive it.
     
  5. Matthew James

    Matthew James Basic Pleskian

    21
    73%
    Joined:
    Dec 7, 2009
    Messages:
    71
    Likes Received:
    1
    Thanks for that.
     
  6. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    1. The 'php_handler' option is ignored when 'php' option is set to false or not specified in API-RPC request.
    Try to set the 'php' option to enabled and set required php handler type. This can be done during the creation of domain template:

    2. We have already submitted bug about ignoring of the 'same_ssl' option. It is under developer's investigation now.
     
  7. Matthew James

    Matthew James Basic Pleskian

    21
    73%
    Joined:
    Dec 7, 2009
    Messages:
    71
    Likes Received:
    1
    My original request already contained this (and it set php to on without any problems) yet it ignores the php handler type. If you were able to get it to work, please can you send me the exact full request that you sent?
     
  8. Matthew James

    Matthew James Basic Pleskian

    21
    73%
    Joined:
    Dec 7, 2009
    Messages:
    71
    Likes Received:
    1
    Is there a further update on this?

    In the meantime, I have attempted to add an Event Handler on domain creation that sets same_ssl to true and php_handler_type to cgi yet this doesn't work.

    If I run the same command that I am adding the the Event Handler via SSH, it works fine and updates them as expected:

    /usr/local/psa/bin/domain.sh --update testingtestingtesting.com -php_handler_type cgi -same_ssl true
    SUCCESS: Update of domain 'testingtestingtesting.com' complete.

    Is there a reason why this wouldn't work with the Event Handler, can I see Event Handler error logs anywhere?

    Thanks
     
  9. Matthew James

    Matthew James Basic Pleskian

    21
    73%
    Joined:
    Dec 7, 2009
    Messages:
    71
    Likes Received:
    1
    Is there an update on this?

    It's really bad that these simple bugs are not resolved even after a few months of them being reported, this is causing problems for me as I cannot use your API properly.

    I don't want to have to move to a different control panel but feel I might have to if some of these bugs aren't resolved once they have been reported.
     
Loading...