1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

EasyApache php modules loaded, apache restarted but php module not working for cPanel

Discussion in 'EasyApache' started by mobcdi, Aug 12, 2011.

  1. mobcdi

    mobcdi Member

    Joined:
    Jul 13, 2009
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    This is probably something very simple I'm missing but I've used easy::apache 3.5.2 to add some addition modules to the build from the exhausive list. I've saved and built it and restarted apache service but the php modules are listed up phpinfo as loaded under apache2handler but the cPanel accounts can't benefit from the new modules

    I tried the php configuration editor in WHM but that didn't show any options to work with the newly added modules

    Is there some step I'm missing out on doing

    I'm trying to configure pecl uploadprogress and php_ldap for a number of cPanel accounts on the same host
     
  2. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    To be clear, are the modules needed for the account as a website or are they needed to be used in cPanel itself? If they are appearing in phpinfo for the account, then the website should be able to make use of the modules. You will need to specify how the websites aren't able to benefit from the new modules by stating which error message(s) you are receiving.

    Now, if the modules are needed for cPanel itself for the accounts rather than the websites, then building them in the normal EasyApache manner will not work. You would need to configure them for cPanel's PHP build by EasyApache instead.
     
  3. mobcdi

    mobcdi Member

    Joined:
    Jul 13, 2009
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    Apologies I should have been clearer.

    The modules are needed by CMS software packages running under the webroot of a number of cPanel account users, its these cms's that say either they know the module is installed but not enabled or just a particular module is not available

    Running phpinfo from the accounts webroots shows the particular modules as loaded under the apache2handler section and the build date shown corresponds to the latest build generated by easyapache.

    Do i need to enable modules on an account by account basis or does it just take a bit of time for all caches of php.ini and other files to clear before the newly added modules are presented?
     
  4. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    If the phpinfo page shows the modules for those accounts, then the modules should be available to use. There isn't a cache in that manner for those accounts.

    You could always try copying the default php.ini page at /usr/local/lib/php.ini to one of the accounts to see if that makes any difference, but I don't think it's the php.ini that's the issue here--I think it's likely the detection script being used by the CMS package where the issue stems.
     
  5. mobcdi

    mobcdi Member

    Joined:
    Jul 13, 2009
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    I've checked the php.ini in the location you said but can't find any reference to the modules I need to be exposed to accounts.
    Are there additional steps I need to complete after using easyapache?
     
  6. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    Modules do not appear in php.ini unless required, so if the phpinfo page shows the modules exist, then they are loaded into php. You can always run this command to confirm they were compiled:

    Code:
    php -m | grep -i modulename
    Edit: Please replace modulename with the name of the module being checked.
     
  7. mobcdi

    mobcdi Member

    Joined:
    Jul 13, 2009
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    When I run that command I only get
    [PHP Modules]
    [Zend Modules]
     
  8. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    You would replace module with the name of the module being checked. Sorry if that wasn't clear above.
     
  9. mobcdi

    mobcdi Member

    Joined:
    Jul 13, 2009
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    No i was my mistake.

    When I run any of the following I just get the command prompt again, no output of any kind
    Code:
    php -m | grep -i mod_rewrite
    php -m | grep -i mod_authnz_ldap
    php -m | grep -i auth_default_module
     
  10. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    Please try only using rewrite or ldap or auth for checking the module for the shortname rather than the full name of the module to see what happens.
     
  11. mobcdi

    mobcdi Member

    Joined:
    Jul 13, 2009
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    I still get nothing
    Code:
    php -m | grep -i rewrite
    php -m | grep -i ldap
    php -m | grep -i auth
    if I run
    Code:
    php -m | grep -i core
    I get 1 line with
    Code:
    Core
     
  12. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    What does "php -v" return for you?

    Also, aren't the modules you are checking Apache modules rather than PHP ones? If so, you cannot use PHP to check for those modules. The syntax would be:

    Code:
    httpd -M | grep -i modulename
    Where modulename is the name of the module.
     
  13. mobcdi

    mobcdi Member

    Joined:
    Jul 13, 2009
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    php -v gets me
    php 5.3.6 cli built 3 days ago
    if i run
    Code:
    httpd -M |grep -t ldap 
    I get
    Code:
    authnz_ldap_module (static)
    ldap_module (static)
    Syntax OK
     
  14. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    Then the module exists. Does the CMS you are using provide any support at all for it via a forum or support desk system?
     
  15. mobcdi

    mobcdi Member

    Joined:
    Jul 13, 2009
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    Its moodle and drupal I have to configure but they are under separate cPanel accounts [with different urls and ip addresses] on the same host and both either error out when trying to use a module e.g ldap or don't recognise it as being installed & enabled correctly.

    Moodle 2.1.1 shows the error
    Where as Drupal fails when trying to use the same module but its error points to code that requires the ldap module.

    All Drupal sites on the same cPanel server also have a problem showing the upload progress bar
    that extension is listed in my php.ini file in /usr/local/lib under the dynamic extensions section
    Code:
    extension = "uploadprogress.so"
    and the uploadprogress.so is in the extensions folder listed under extension_dir on phpinfo

    Also if I switch to advanced mode in whw->main->service configuration->php configuration editor the uploadprogress.so is listed in an entry in the core section along with the extension_dir path
     
    #15 mobcdi, Aug 15, 2011
    Last edited: Aug 15, 2011
  16. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    Re: EasyApache php modules loaded, apache restarted but php module not working for cP

    For the "uploadprogress" option, based on what I've reviewed online that should only require doing:

    Code:
    pecl install uploadprogress
    When I ran that command in root SSH on my test machine, it does show up on my machine:

    Code:
    root@host [/]# php -m | grep -i uploadprogress
    uploadprogress
    It also appears under uploadprogress on my php.ini file at phpinfo() page.

    If it is not working, I suggest going to the site for the CMS and asking these questions. There are discussions that the option might not be available for suPHP, CGI or FCGI but only DSO (mod_php) at this location on the Drupal support discussion:

    install the PECL uploadprogress library | drupal.org

    For LDAP, it appears that it is not Apache support but PHP support that is needed. LDAP for PHP does not appear in the PHP modules listing. It is only under the Apache modules listing in EasyApache. I did the following to add support for LDAP with PHP on my machine:

    Code:
    echo "--with-ldap" >> /var/cpanel/easy/apache/rawopts/all_php5
    /scripts/easyapache
    This then compiled EasyApache with LDAP support for PHP. I do not know if more is needed to get php-ldap working, but it is appearing in my php.ini file and appearing on check for the module:

    Code:
    root@host [/]# php -m | grep -i ldap
    ldap
    I would highly suggest contacting Drupal or Moodle for their support forums, both have such forums available, to see if there is more needed for this to function.

    The Drupal support forum is at Forums | drupal.org and the Moodle support forum is at Moodle.org: Forums
     

Share This Page