The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOAP extension for cPanel PHP

Discussion in 'General Discussion' started by cyon, Nov 7, 2008.

  1. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    Is there an option to compile the cPanel PHP (/usr/local/cpanel/3rdparty/bin/php) with your one options? I need the SOAP (PHP5) extension within the skin.

    Otherwise i've to use nuSOAP or PEAR:SOAP.

    Thanks for your advise.
     
  2. apscinsspl

    apscinsspl Well-Known Member

    Joined:
    Mar 15, 2008
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    In order to compile php with soap you need to login to WHM--update apache -- select your configuration and keep proceeding till you get the exhaustive list option where you will find soap, check the box and compile apache.

    After that soap should be enabled for you.
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    That only updates the system PHP installation, not the one cPanel uses.

    To update the binary cPanel uses, create a new profile in EasyApache wherein you enable SOAP support for PHP. Save the profile and don't build. Then copy your new profile like this (using example.yaml as the profile file name):

    Code:
    # mv /scripts/makecpphp.profile.yaml /scripts/makecpphp.profile.yaml.backup
    # cp /var/cpanel/easy/apache/profile/custom/example.yaml /scripts/makecpphp.profile.yaml
    # /scripts/makecpphp
    
    The /scripts/makecpphp command builds a new PHP binary for cPanel to use.
     
  4. touma

    touma Member

    Joined:
    Apr 13, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    São Paulo - Brasil
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The profile that /scripts/makecpphp uses nowadays is stored in /var/cpanel/easy/apache/profle/makecpphp.profile.yaml. The easiest way to create one of these profiles is to go through EasyApache, click on Exhaustive Options List in Step 5 and instead of building, just saving the profile. This profile will be saved in /var/cpanel/easy/apache/profile/custom/. I recommend making a backup of makecpphp.profile.yaml before overwriting it.
     
  6. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    EasyApache has the option to setup SOAP but as your subject says that you do not want to use EasyApache, I might mention that it is very easy to manually install this as well and for that one is pretty much just compiling PHP with the "--enable-soap" configure option:
    Code:
    # cd /usr/local/src
    # wget http://us2.php.net/get/php-5.2.10.tar.bz2/from/this/mirror
    # tar zxvf ./php-5.2.10.tar.bz2
    # cd php-5.2.10
    # make clean
    # ./configure --enable-soap [b]!!!YOUR OTHER OPTIONS HERE!!![/b]
    # make
    # make test
    # make install
    
    (Get !!!YOUR OTHER OPTIONS HERE!!! by looking at your phpinfo() screen)
     
  7. touma

    touma Member

    Joined:
    Apr 13, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    São Paulo - Brasil
    Guys,

    I was trying to change on hand the line Cpanel::Easy::PHP5::SOAP: 0 to 1, but found on /scripts/makecpphp the system '/scripts/cpanel_easy_sanity_check', '--quiet'; command that overwrites the makecpphp.profile.yaml file on every run.

    It's safe to disable this line? If it is, a cpanel update won't bring back this line?

    Can i manually change the yaml file?

    Thanks!
     
  8. Secmas

    Secmas Well-Known Member

    Joined:
    Feb 18, 2005
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    Is this still needed or with the new easyapache and/or whm is not required anymore?
     
  9. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The profile used by makecpphp is now:

    /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
     
  10. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Here is a revised set of commands (where your custom build profile file name is "example.yaml"):
    Code:
    # mv /var/cpanel/easy/apache/profile/makecpphp.profile.yaml /var/cpanel/easy/apache/profile/makecpphp.profile.yaml.backup
    # cp /var/cpanel/easy/apache/profile/custom/example.yaml /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
    # /scripts/makecpphp
     
  11. Secmas

    Secmas Well-Known Member

    Joined:
    Feb 18, 2005
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    Excelent! Thanks.
     
  12. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    cPanelDon's writeup is accurate.
     
  13. t00r

    t00r Registered

    Joined:
    Sep 16, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    i have a similar problem, please help me, how can i setup the SOAP ext.
     
  14. t00r

    t00r Registered

    Joined:
    Sep 16, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    when i do /scripts/makecpphp the /scripts/cpanel_easy_sanity_check in makecpphp everything rewrite like was in previous file. please help me
     
  15. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    What method is being used to modify the EasyApache build profile?

    To help clarify, what is the precise indication that "everything" is being rewritten like the (default?) previous file?
     
  16. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Please disregard my last reply as quoted above. When testing further I was able to reproduce the issue as described; to the best of my knowledge I believe this current behavior is intended by design.

    In regard to modifying the stock-default EasyApache3 (EA3) build profile for "makecpphp" we are considering and evaluating ways simplify the process; for reference, this feature enhancement is being tracked via the following internal case ID number: #30130

    In the meantime here are a set of steps as an alternative to the last revised set of commands.

    1.) Prepare and save the build profile using EasyApache, then copy the newly-saved build profile; in the following command replace "example.yaml" with the original file name of your custom build profile:
    Code:
    # cp -pv /var/cpanel/easy/apache/profile/custom/example.yaml /var/cpanel/easy/apache/profile/makecpphp_custom.profile.yaml
    2.) Save a fresh backup of the original script "makecpphp":
    Code:
    # cp -pv /scripts/makecpphp /scripts/makecpphp.backup
    3.) For reference purposes, check the existing build profile path before it's updated in the next step:
    Code:
    # grep "^my \$makecpphp_profile" /scripts/makecpphp
    4.) Update the variable defining the build profile path used by the script:
    Code:
    # perl -p -i -e 's/makecpphp\.profile\.yaml/makecpphp_custom\.profile\.yaml/g' /scripts/makecpphp
    5.) For confirmation, verify the build profile path was updated correctly:
    Code:
    # grep "^my \$makecpphp_profile" /scripts/makecpphp
    6.) If the path was updated successfully, proceed to run the script "makecpphp":
    Code:
    # /scripts/makecpphp

    The following command may be used if needing to restore the "makecphp" script from the backup that was saved earlier:
    Code:
    # cp -pv /scripts/makecpphp.backup /scripts/makecpphp
     
    #16 cPanelDon, Dec 12, 2009
    Last edited: Dec 12, 2009
Loading...

Share This Page