Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th June 2013, 17:17
ItsDom ItsDom is offline
Member
 
Join Date: Dec 2012
Posts: 41
Thanks: 2
Thanked 5 Times in 5 Posts
Default jailkit: php-cli + mysql problems with mysql.so + libmysqlclient.so.18

Hi,

I'm having problems getting PHP-CLI working in jailkit. Running CentOS 6.4, followed setup guide from http://www.howtoforge.com/perfect-se...ot-ispconfig-3

My end goal is for a jailkit shell user to be able to install composer themselves.

There error I'm getting is this:

Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysql.so' - libmysqlclient.so.18: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqli.so' - libmysqlclient.so.18: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_mysql.so' - libmysqlclient.so.18: cannot open shared object file: No such file or directory in Unknown on line 0
ls -l /usr/lib64/php/modules/ | grep mysql (in jailkit by web user):
Code:
-rwxr-xr-x 1 root root   53800 Jun  5 15:43 mysql.so
-rwxr-xr-x 1 root root  139864 Jun  5 15:43 mysqli.so
-rwxr-xr-x 1 root root   30304 Jun  5 15:43 pdo_mysql.so
ls -l /usr/lib64/mysql/ | grep mysql (in jailkit by web user):
Code:
lrwxrwxrwx 1 root root      24 Jun 11 14:26 libmysqlclient.so.16 -> libmysqlclient.so.16.0.0
-rwxr-xr-x 1 root root 2156904 Dec 23  2010 libmysqlclient.so.16.0.0
lrwxrwxrwx 1 root root      24 Jun 11 14:26 libmysqlclient.so.18 -> libmysqlclient.so.18.0.0
-rwxr-xr-x 1 root root 2987552 Apr 18 14:49 libmysqlclient.so.18.0.0
lrwxrwxrwx 1 root root      26 Jun 11 14:26 libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0.0
-rwxr-xr-x 1 root root 2165216 Dec 23  2010 libmysqlclient_r.so.16.0.0
-rwxr-xr-x 1 root root    7090 Apr 18 14:49 mysql_config
-rwxr-xr-x 1 root root   11936 Apr 18 14:33 mysqlbug

jk_init.ini relevant part (perl/pear stuff is for phar to be unpack phar files):
Code:
[php_cli_mysql]
comment = PHP and other bits for PHP cli
executables = /usr/bin/php, /usr/bin/perl, /usr/bin/phar.phar, /usr/bin/phar, /usr/bin/mysql
directories = /usr/share/pear, /usr/share/php, /etc/php.d
libraries = /usr/lib64/php-zts/modules/*, /usr/lib64/php/modules/*, /usr/lib64/mysql/*
regularfiles= /etc/php.ini

php --ini as root (e.g. not in jailkit):
Code:
Configuration File (php.ini) Path: /etc
Loaded Configuration File:         /etc/php.ini
Scan for additional .ini files in: /etc/php.d
Additional .ini files parsed:      /etc/php.d/apc.ini,
/etc/php.d/curl.ini,
/etc/php.d/dom.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/gd.ini,
/etc/php.d/imap.ini,
/etc/php.d/json.ini,
/etc/php.d/ldap.ini,
/etc/php.d/magickwand.ini,
/etc/php.d/mbstring.ini,
/etc/php.d/mcrypt.ini,
/etc/php.d/mssql.ini,
/etc/php.d/mysql.ini,
/etc/php.d/mysqli.ini,
/etc/php.d/odbc.ini,
/etc/php.d/pdo.ini,
/etc/php.d/pdo_dblib.ini,
/etc/php.d/pdo_mysql.ini,
/etc/php.d/pdo_odbc.ini,
/etc/php.d/pdo_sqlite.ini,
/etc/php.d/phar.ini,
/etc/php.d/shout.ini,
/etc/php.d/snmp.ini,
/etc/php.d/soap.ini,
/etc/php.d/sqlite3.ini,
/etc/php.d/tidy.ini,
/etc/php.d/wddx.ini,
/etc/php.d/xmlreader.ini,
/etc/php.d/xmlrpc.ini,
/etc/php.d/xmlwriter.ini,
/etc/php.d/xsl.ini,
/etc/php.d/zip.ini
php --ini run in jailkit as web user:
Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysql.so' - libmysqlclient.so.18: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqli.so' - libmysqlclient.so.18: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_mysql.so' - libmysqlclient.so.18: cannot open shared object file: No such file or directory in Unknown on line 0
No log handling enabled - turning on stderr logging
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none)
Cannot find module (UCD-DISKIO-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (MTA-MIB): At line 0 in (none)
Cannot find module (NETWORK-SERVICES-MIB): At line 0 in (none)
Cannot find module (SCTP-MIB): At line 0 in (none)
Cannot find module (RMON-MIB): At line 0 in (none)
Cannot find module (EtherLike-MIB): At line 0 in (none)
Cannot find module (LM-SENSORS-MIB): At line 0 in (none)
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (IPV6-ICMP-MIB): At line 0 in (none)
Cannot find module (IPV6-MIB): At line 0 in (none)
Cannot find module (IPV6-TCP-MIB): At line 0 in (none)
Cannot find module (IPV6-UDP-MIB): At line 0 in (none)
Cannot find module (IP-FORWARD-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-PASS-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-EXTEND-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
Cannot find module (NET-SNMP-VACM-MIB): At line 0 in (none)
Configuration File (php.ini) Path: /etc
Loaded Configuration File:         /etc/php.ini
Scan for additional .ini files in: /etc/php.d
Additional .ini files parsed:      /etc/php.d/apc.ini,
/etc/php.d/curl.ini,
/etc/php.d/dom.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/gd.ini,
/etc/php.d/imap.ini,
/etc/php.d/json.ini,
/etc/php.d/ldap.ini,
/etc/php.d/magickwand.ini,
/etc/php.d/mbstring.ini,
/etc/php.d/mcrypt.ini,
/etc/php.d/mssql.ini,
/etc/php.d/mysql.ini,
/etc/php.d/mysqli.ini,
/etc/php.d/odbc.ini,
/etc/php.d/pdo.ini,
/etc/php.d/pdo_dblib.ini,
/etc/php.d/pdo_mysql.ini,
/etc/php.d/pdo_odbc.ini,
/etc/php.d/pdo_sqlite.ini,
/etc/php.d/phar.ini,
/etc/php.d/shout.ini,
/etc/php.d/snmp.ini,
/etc/php.d/soap.ini,
/etc/php.d/sqlite3.ini,
/etc/php.d/tidy.ini,
/etc/php.d/wddx.ini,
/etc/php.d/xmlreader.ini,
/etc/php.d/xmlrpc.ini,
/etc/php.d/xmlwriter.ini,
/etc/php.d/xsl.ini,
/etc/php.d/zip.ini
As you can see, the files are all there, it works fine outside the jail. Any ideas?

Thanks in advanced

Last edited by ItsDom; 11th June 2013 at 17:20. Reason: forget to mention setup
Reply With Quote
Sponsored Links
  #2  
Old 15th June 2013, 16:19
ItsDom ItsDom is offline
Member
 
Join Date: Dec 2012
Posts: 41
Thanks: 2
Thanked 5 Times in 5 Posts
Default

Still no takers?

The purpose of me trying to get jailkit working is so that I can allow convenient use of CMS' which have a command line element (e.g. Laravel, CakePHP etc.) I've now got Jailkit working, got Git working in the jail and got php-cli half working in the jail (enough to extract and handle phar files) but I feel I'm now stuck at the final hurdle.

Is it possible to achieve what I'm looking for with ISPConfig?
Reply With Quote
  #3  
Old 19th June 2013, 10:35
ItsDom ItsDom is offline
Member
 
Join Date: Dec 2012
Posts: 41
Thanks: 2
Thanked 5 Times in 5 Posts
Default

Okay. Is there any way to raise this as a bug in ISPConfig.

Instead of overcomplicating thinks and doing the jk_init.ini stuff myself, I tried just adding the php and mysql binaries to the chroot apps list in ISPConfig. Still the same issue.

The problem seems to be with extensions. If I remove loading of all the extensions (remove everything from /etc/php.d in the jail) then the error messages go away, but nothing really works.....

I've tried a full fresh reinstall following http://www.howtoforge.com/perfect-se...ot-ispconfig-3 with no modifications, and still have the same problem.

I'm not sure "bug in ISPConfig" is the right terminology to use, but ultimately a feature in ISPConfig doesn't work fully in combination with one of the recommended guides.

Perhaps a note on this should be added to the guide - something along the lines of "Note: in the setup described in this guide, using the 'Jailkit chrooted applications' field to enable php-cli with mysql in Jailkit will NOT work."

Could someone please test this on another setup to ensure it's not just me please?
Reply With Quote
  #4  
Old 25th June 2013, 12:58
ItsDom ItsDom is offline
Member
 
Join Date: Dec 2012
Posts: 41
Thanks: 2
Thanked 5 Times in 5 Posts
 
Default

I have nothing to lose by bumping this.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig 3.0.3.3 fresh instalation - email tab is empty artur_gib Installation/Configuration 14 28th January 2014 19:02
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 17:26
Cannot add Mailboxes after PHP-Update hfr Installation/Configuration 5 7th November 2009 20:09
Apache2 Freezes celtic Server Operation 31 28th May 2007 17:18


All times are GMT +2. The time now is 19:19.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.