PHP Warning: PHP Startup: Unable to load dynamic library './xcache.so' - ./xcache.so: cannot open shared object file: No such file or directory in Un

So receive this warning on few servers? Why? As the error says, cannot load, the file might not b there. Wut to do? check.

[root@ns46 cur]# /usr/local/bin/php -v
PHP Warning: PHP Startup: Unable to load dynamic library './xcache.so' - ./xcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.2.10 (cli) (built: Jul 7 2009 02:36:57)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

Lets see config file. Wait, which config file? check.

[root@ns46 cur]# /usr/local/bin/php -i | grep Loaded
PHP Warning: PHP Startup: Unable to load dynamic library './xcache.so' - ./xcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
Loaded Configuration File => /usr/local/Zend/etc/php.ini
[root@ns46 cur]#

Now we know which one is loaded, now vi (in this case i just grep)

[root@ns46 cur]# grep "xcache.so" /usr/local/Zend/etc/php.ini
extension=xcache.so
[root@ns46 cur]#

Hm.. lets try edit it to zend_extension instead. Then restart the httpd service.

[root@ns46 cur]# vi /usr/local/Zend/etc/php.ini
[root@ns46 cur]# /etc/init.d/httpd restart

Then, check again,

[root@ns46 cur]# /usr/local/bin/php -vFailed loading xcache.so: xcache.so: cannot open shared object file: No such file or directory
PHP 5.2.10 (cli) (built: Jul 7 2009 02:36:57)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

Syet! srill prob.. hmm so where is xcache.so in my server, check where it is, and im pretty sure this is because the system cant locate it as its not within php's included PATH.

[root@ns46 cur]# /usr/local/bin/php -i | grep include_path
include_path => .:/usr/local/lib/php => .:/usr/local/lib/php
[root@ns46 cur]# locate xcache.so
/usr/local/lib/php/extensions/xcache.so

Eyh!!? demmit! wuts the problem.. hmm.. maybe should try the full path instead.. vi the php.ini then restart the httpd service. ( in my case, i edited to zend_extension=/usr/local/lib/php/extensions/xcache.so)

[root@ns46 cur]# vi /usr/local/Zend/etc/php.ini
[root@ns46 cur]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd:
[root@ns46 cur]#

Now, test again:

[root@ns46 cur]# /usr/local/bin/php -v
PHP 5.2.10 (cli) (built: Jul 7 2009 02:36:57)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with XCache v1.2.2, Copyright (c) 2005-2007, by mOo
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies
[root@ns46 cur]#


Yeah! Its loaded now! Sankyu2~ :D

//alak

Comments

Post a Comment

Popular posts from this blog

SAP Backdoors {placeholder Post]

Fiori Apps Keep Calling Internal Hostname / Internal FQDN