Control Web Panel

WebPanel => PHP => Topic started by: venty on September 05, 2018, 09:44:02 AM

Title: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 05, 2018, 09:44:02 AM
Hi,

After a new installation of the CWP and a selected version of the PHP with the PHP switcher 7.2.9, in the daily messages (Anacron job 'cron.daily' on hosting.v.com) I have the following text:

"/etc/cron.daily/cwp:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/cwp/php71/lib/php/extensions/no-debug-non-zts-20151012/memcache.so' - /usr/local/cwp/php71/lib/php/extensions/no-debug-non-zts-20151012/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0"


What can I do?
Thanks in advance!

BR
Venty
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: Sandeep on September 05, 2018, 12:55:29 PM
reinstall php 7.2.9 with memcached selected or remove the memcached/memcache extension line from php.ini
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 06, 2018, 06:18:05 AM
Hi,

memcached is necessary so I would not remove remove the memcached/memcache extension line from php.ini ...

For the reinstallation php 7.2.9 with memcached, these few reinstallations with PHP switcher would not lead to further errors in the panel's work, to the creation of temporary files that will make the system work harder or other...

By the way, when (in firrs time) I chose to install php 7.2.9 I had put the tick on memcached...


What I do?!?  now I repeat it?? PHP switcher?!?

Thanks i n advance!


BR
Venty
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: Sandeep on September 06, 2018, 02:49:19 PM
you need to have memcached not memcache for php 7.xx
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 06, 2018, 03:24:57 PM
 :reinstall or remove in php.ini
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: bullten on September 06, 2018, 05:47:21 PM
what is output of

Code: [Select]
/usr/local/cwp/php71/bin/php --ini
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 06, 2018, 06:38:39 PM
 ???
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 06, 2018, 08:38:34 PM
HP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/cwp/php71/lib/php/extensions/no-debug-non-zts-20151012/memcache.so' - /usr/local/cwp/php71/lib/php/extensions/no-debug-non-zts-20151012/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
Configuration File (php.ini) Path: /usr/local/cwp/php71
Loaded Configuration File:         /usr/local/cwp/php71/php.ini
Scan for additional .ini files in: /usr/local/cwp/php71/php.d
Additional .ini files parsed:      (none)
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 06, 2018, 08:49:50 PM
And... I have new installation of the CWP and a selected version of the PHP 7.2.9 with the PHP switcher ... I've never worked with a version of the PHP 7.1.x???
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: bullten on September 06, 2018, 09:16:03 PM
what does this gives?

Code: [Select]
grep -n -A1 memcache.so /usr/local/cwp/php71/php.ini
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 06, 2018, 09:24:17 PM
1920:extension=memcache.so
green:white=red
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: bullten on September 06, 2018, 09:56:37 PM
nano /usr/local/cwp/php71/php.ini

press ctrl+w ctrl+t and enter 1920

Comment out the line like below

# extension=memcache.so

save and restart cwp-php

service cwp-phpfpm restart

now check if you get the error

/usr/local/cwp/php71/bin/php -v
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: bullten on September 06, 2018, 09:57:55 PM
After that you can ask cwp development team how memcache got installed there.
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 06, 2018, 10:01:28 PM
but that's going to comment memcache.so, and memcache will not be active???
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: bullten on September 06, 2018, 10:16:05 PM
you dont have memcache installed on cwpserver php. How come you have its entry in its php file?
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 06, 2018, 10:43:12 PM
but what should I do to have memcache?
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: bullten on September 06, 2018, 10:49:03 PM
Why would you have memcache for cwpsrver php.

I understand if you want to have memcache you can have for php used by website.

This path /usr/local/cwp/php71/bin/php -v is for webserver php which is used by centos web panel server cwpsrv

/usr/local/bin/php -v this is your php path used by you website.

You are getting confused between two myfriend :)
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 07, 2018, 12:04:41 AM
I do not know if I will ...
and why is this grudge?
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 07, 2018, 04:13:19 AM
I do not know if I will ...
and why is this error for memcache?

Please do not know how to delete the top answer, the quote is the correct text ...
How to delete it here or edit it?!?
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: Sandeep on September 07, 2018, 05:51:22 AM
please don't modify cwp configuration else you've lots of problem.
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 07, 2018, 10:04:44 AM
Ok, but as was clear from the discussion memcache is missing:

Posted by: bullten « on: September 06, 2018, 10:49:03 PM » Insert Quote

"This path /usr/local/cwp/php71/bin/php -v is for webserver php which is used by centos web panel server cwpsrv.."

...which means I obviously have already touched something and modify cwp configuration ...


What do I do in this case - reinstall CWP?

BR
Venty
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: bullten on September 07, 2018, 11:02:46 AM
There is no need to reinstall CWP

run as below
 
Code: [Select]
yum reinstall cwpphp -y
service cwp-phpfpm restart
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 07, 2018, 11:38:49 AM
and that will restore memcache???
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: bullten on September 07, 2018, 01:40:44 PM
The above command will reset cwp php to original state as it should be.
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 10, 2018, 02:45:12 PM
There is no need to reinstall CWP

run as below
 
Code: [Select]
yum reinstall cwpphp -y
service cwp-phpfpm restart

Hi,

I've run the code above, and I think everything is all right now, but I'm still excited about why this happened, and why did you get lost for memcache?

1. I've installed the memcached for the CWpanel, is that why?
2. With with PHP switcher I changed the version of the PHP to 7.2.9 for the sites, but it automatically changed the version of the PHP for the CWpanel and in this version 7.2.9 there is no memcache and there is a memcached?
3. Other..???

Please help me to find out the reason, I think to do a clean installation of everything but do not want to repeat this error?

Thanks in advance!

BR
Venty
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: bullten on September 12, 2018, 05:07:13 AM
I told you to run below commands to make cwp server php return to original state as it was when originally installed. I wonder why would you install memcache for cwp server php?

Quote
1. I've installed the memcached for the CWpanel, is that why?

yes

Quote
2. With with PHP switcher I changed the version of the PHP to 7.2.9 for the sites, but it automatically changed the version of the PHP for the CWpanel and in this version 7.2.9 there is no memcache and there is a memcached?

If that happened report to the developers. Its a bug then

Clean installation will not make any difference.
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 12, 2018, 05:34:49 AM
what does this gives?

Code: [Select]
grep -n -A1 memcache.so /usr/local/cwp/php71/php.ini

Hi,

thank you for the answer, but ask:

1. Is there a difference between memcached and memcache?

2. How do I report them to pay attention?

3. Now that I've retaken with
Code: [Select]
  yum reinstall cwpphp -y, service cwp-phpfpm restartand ,  then executed the command quoted above
Code: [Select]
grep -n -A1 memcache.so /usr/local/cwp/php71/php.ini , does not it give me such an answer 1920:extension=memcache.so???

Thanks in advance!
BR
Venty
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: bullten on September 12, 2018, 05:54:14 AM
Memcached is a server which runs on port 11211. Memcache is php extension to access memcached server.
Quote
grep -n -A1 memcache.so /usr/local/cwp/php71/php.ini

It doesn't give answer that means its installed installed. So its perfectly fine.
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: venty on September 12, 2018, 05:59:55 AM
Does that mean I have to have both memcached and memcache???
Somewhere I read that memcache is only a version of PHP 5.6
Title: Re: PHP Warning: PHP Startup: Unable to load dynamic library...
Post by: bullten on September 12, 2018, 06:13:16 AM
https://pecl.php.net/package/memcached
https://pecl.php.net/package/memcache

see the last release dates.