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

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
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
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
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.
 

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
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?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
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.
 

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
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?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
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.
 

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
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]
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
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.
 

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
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
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
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.
 

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
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
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
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.
 

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
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
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
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?
 

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
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
The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled if you want to use this authentication plugin.
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
Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the PECL uploadprogress library
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
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
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