phpLdapAdmin apc cache error


(Pasquale Inglese) #1

NethServer Version: NethServer release 7.4.1708 (Final)
Module: phpLdapAdmin

Hi all, i have this error when I load phpLdapAdmin (@stephdl module) page:

Warning: require(): Unable to allocate memory for pool. in /usr/share/phpldapadmin/htdocs/index.php on line 52

Warning: require_once(): Unable to allocate memory for pool. in /usr/share/phpldapadmin/lib/functions.php on line 248

Notice: Undefined variable: _SESSION in /usr/share/phpldapadmin/lib/page.php on line 379

Fatal error: Call to a member function getValue() on a non-object in /usr/share/phpldapadmin/lib/page.php on line 379

Can you help me?

Thanks in advance,

(Stéphane de Labrusse) #2

Do you use php-scl ?

(Pasquale Inglese) #3

@stephdl I don’t use it.

(Marc) #4

Any caching system (APC, opcache…) in use?

(Stéphane de Labrusse) #5

Can you check in the /etc/phpldapadmin/phpldapadmin.conf if you don’t have a binary password for the ldap bind user

(Pasquale Inglese) #6

Now that you asked me, I had a doubt and I checked.
Some time ago, I installed php-apc to test it with wordpress, but then I never used it and uninstalled it. :frowning:

This happened before installing phpLdapAdmin.
So far, I don’t remember having never found this problem.
Do you think this is the cause?

(Marc) #7

According to some web search the error is related to php (or cache) memory.
You can try to increase the php memory limit. If using the stock php version:

config getprop php MemoryLimit
config setprop php MemoryLimit 512
signal-event nethserver-php-update

(Pasquale Inglese) #8

I have checked in the /etc/phpldapadmin/ folder and i found only config.php file.
In the file bind_pass is set.

(Stéphane de Labrusse) #9

Not in front of a computer, sorry

(Pasquale Inglese) #10

I tried to increase the PHP Memory limit but it didn’t work, so I looked into the web how to increase APC (cache) memory.

I share it in case it may be useful to someone else.

Edit the file /etc/php.d/apc.ini and set

apc.enabled = 1
apc.shm_segments = 1
apc.shm_size = 256M
apc.ttl = 7200
apc.user_ttl = 7200
apc.gc_ttl = 0
apc.mmap_file_mask = "/tmp/apc.XXXXXX"

Restart web server Apache.

For display exact APC memory usage i have copied /usr/share/pear/apc.php to /usr/share/phpldapadmin/htdocs/apc.php and load http://your-server-here/phpldapadmin/apc.php.

source for apc settings and display APC cache information:

(Stéphane de Labrusse) #11

could you edit your topic and add the mention of apc cache, please

(Pasquale Inglese) #12

I’m sorry, I integrated by inserting the source.