Drobo

DroboPorts php-5.3.6 missing libmysqlclient.so?

Hoping Ricardo sees this.

I just installed the php-5.3.6 package from DroboPorts.com (amazing work on the site!), but PHP fails to run. For example, if I SSH in and run php -i, I get this output:

/mnt/DroboFS/Shares/DroboApps/php/bin/php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

Have I done something wrong, or is the package faulty?

Hello there!

Well, the page does mention that you require MySQL, although only for compilation. My bad.

The easiest way to fix this is to install MySQL, and immediately disable it using the DroboAdmin if you do not need MySQL. You might also need to adjust your LD_LIBRARY_PATH (see below). Edit: I just checked and if you install MySQL there is no need to change LD_LIBRARY_PATH.

Otherwise, a less simple solution is to just download the MySQL package, unpackage it, pick only the libmysqlclient.so.18.0.0 from the lib folder, copy it into php’s lib folder and adjust your LD_LIBRARY_PATH variable as required. Like this:

export LD_LIBRARY_PATH=/mnt/DroboFS/Shares/DroboApps/php/lib:$LD_LIBRARY_PATH

The complicated solution is to recompile php yourself, but removing the references to MySQL on the configuration line for php. Like this:

CFLAGS="$CFLAGS -O3" ac_cv_php_xml2_config_path=$LIBXML/bin/xml2-config ./configure --host=arm-none-linux-gnueabi --prefix=$DEST --enable-all=shared --enable-xml=shared --enable-phar=shared --enable-libxml --with-iconv=$LIBICONV --with-iconv-dir=$LIBICONV --with-zlib-dir=$ZLIB --with-bz2=$BZIP --with-pcre-regex=$PCRE --with-pcre-dir=$PCRE --with-libxml-dir=$LIBXML --with-libexpat-dir=$LIBEXPAT --with-openssl-dir=$OPENSSL --with-curl=$CURL --with-jpeg-dir=$LIBJPEG --with-png-dir=$LIBPNG --with-mcrypt=$LIBMCRYPT --without-mysql --disable-intl --disable-pcntl --without-pear --without-enchant --without-gmp --without-imap --without-ldap --without-mssql --without-oci8 --without-pdo-oci --without-adabas --without-sapdb --without-solid --without-ibm-db2 --without-ODBCRouter --without-empress --without-empress-bcs --without-birdstep --without-iodbc --without-esoob --without-unixODBC --without-dbmaker --without-interbase --without-pdo-dblib --without-pdo-firebird --without-pgsql --without-pdo-pgsql --without-pdo-odbc --without-sybase-ct --without-custom-odbc --without-pspell --without-libedit --without-readline --without-recode --without-snmp --without-tidy --without-xsl --without-caudium --with-config-file-path=$DEST/etc

And the lazy solution is to wait for me to recompile a new version which would statically link libmysqlclient. That one may take a while, so I probably would do one of the easy fixes for now. :slight_smile:

Alright, statically linking libmysqlclient was much easier than I thought. A new version of the package is available on DroboPorts at http://www.droboports.com/app-repository/php-5-3-6

Give it a try and let me know how it went.

Slick! Thanks, Ricardo!