1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php-mysql package

Discussion in 'Tomato Firmware' started by ulyan, Jun 28, 2012.

  1. ulyan

    ulyan Networkin' Nut Member

    Hi there,

    I have a problem when I install php-mysql extension. I see they are present but when I execute php -v I get this error that I am unable to understand why it happens or find any solution on the web. If someone is kind enough to give me a hand, I'll be gratefull.

    Thank you.

    The error:
    root@NAS:/opt# php -v
    PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/lib/php/extensions/mysql.so' - File not found in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/lib/php/extensions/mysqli.so' - File not found in Unknown on line 0
    PHP 5.2.17 (cli) (built: Feb 23 2012 11:54:03)
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    Inside the folder /opt/lib/php/extensions/:
    root@NAS:/opt# ls /opt/lib/php/extensions/
    bcmath.so      exif.so        pdo.so        sqlite.so      xmlreader.so
    bz2.so        ftp.so        pdo_mysql.so  sysvmsg.so    xsl.so
    calendar.so    mysql.so      pdo_sqlite.so  sysvsem.so    zlib.so
    dba.so        mysqli.so      shmop.so      sysvshm.so
    dom.so        openssl.so    sockets.so    xml.so
  2. koitsu

    koitsu Network Guru Member

    The debugging/troubleshooting environment in TomatoUSB is sub-par. This is going to be fairly painful to do due to lack of utilities.

    Chances are mysql.so and mysqli.so aren't loading because those are dynamically linked to another library, such as libmysqlclient.so.X. This model was done away with in later PHP (5.4.x) where the MySQL driver is now provided natively within PHP (e.g. no external dependency).

    The only way to determine this would be to do: ldd /opt/lib/php/extensions/mysql.so and on mysqli.so too. Note the command is ldd, not ld.

    You should report these problems to whoever provided you with the PHP build + binaries + libraries, as well as all its extensions. That individual should provide support for this issue.
  3. ulyan

    ulyan Networkin' Nut Member

    Who maintain this repositories ? I think it is not an easy task to build your own packages, isn't it ? I don't want to blame this people but it seems there are far too many things broken with this optware, or maybe untested. I think they should change the concept a little bit.

    Anyway thanks koitsu, but I think I'll stop for now. Too much hassle. If I knew how to build packages I would gladly spend time on it.
  4. lancethepants

    lancethepants Network Guru Member

    Optware is old, mostly outdated and hardly maintained. Fortunately there's a new optware called entware. It works nearly identically to optware.
    It is actively maintained, with much newer packages.
    Using entware for fun I've setup Nginx + PHP + MySQL + SSL + IPv6 + PHP Eaccelerator + wordpress etc. You want the php eaccelerator for caching scripts to speed things up.
  5. koitsu

    koitsu Network Guru Member

  6. ulyan

    ulyan Networkin' Nut Member

    Thanks guys. lance.. I was curious about trying this opkg thing :). Wow it really has quite up-to-date packages or far more recent ones.

Share This Page