Re: phpMyAdmin not loading MySQL extensions

From: Matthew Seaman (m.seaman_at_infracaninophile.co.uk)
Date: 02/16/04

  • Next message: Robert Golovniov: "Wine"
    Date: Mon, 16 Feb 2004 20:14:39 +0000
    To: freebsd-newbies@freebsd.org, freebsd-questions@freebsd.org
    
    
    

    On Mon, Feb 16, 2004 at 12:31:28PM -0600, Tweax Daemon wrote:

    >
    > I'm having trouble configuring phpMyAdmin. I guess from when I try to view it
    > in a browser I get the message unable to load mysql extensions the msql link
    > re-directs me to the phpmyadmin site where its states about it can't load
    > mysql.so which is on my system I tried placing it in the same directory but
    > that didn't work. Changing many things in the config.inc.php file but I still
    > get the same error. Has anyone been successful at getting phpMyAdmin to work on
    > FreeBSD 4.8, if so please info me

    Works fine for me. I assume you have compiled up php with the mysql
    support included? It's in the default configuration, so it should be
    there even if you've installed packages from the FTP sites. In any
    case, look at the output of the phpinfo() function to verify that you
    have compiled it with all of the right options:

        % /usr/local/bin/php << EOF | grep MySQL
        ? <? phpinfo() ?>
        ? EOF
        MySQL Support => enabled

    Now it does sound as if you don't have libmysqlclient.so on your
    library search path. Try running these commands and compare the
    output to what I get:

        % ldd /usr/local/libexec/apache/libphp4.so | grep mysql
                libmysqlclient.so.12 => /usr/local/lib/mysql/libmysqlclient.so.12 (0x28608000)

        % ldconfig -r | grep mysql
                search directories: /usr/lib:/usr/lib/compat:/usr/X11R6/lib:/usr/local/lib:/usr/local/lib/mysql:/usr/local/lib/compat/pkg:/usr/local/lib/pth
                166:-lmysqlclient_r.12 => /usr/local/lib/mysql/libmysqlclient_r.so.12
                167:-lmysqlclient.12 => /usr/local/lib/mysql/libmysqlclient.so.12

    At a guess the problem is that you don't have '/usr/local/lib/mysql'
    on your shared library search path. You can fix that (as a one-off)
    by:

        # ldconfig -m /usr/local/lib/mysql

    after which the ldd(1) and ldconfig(8) commands above should show
    libmysqlclient.so being correctly located. Then restart apache:

        # apachectl graceful

    and the PHP module should pick up the required MySQL stuff.

    Don't worry if the .so version number on your system is different --
    I'm running mysql-4.0.18 which implies libmysqlclient.so.12. Other
    MySQL versions will be different.

    You can preserve the ldconfig setup, or rather recreate it on each
    reboot, by putting:

        ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib /usr/local/lib/mysql"

    into /etc/rc.conf.

            Cheers

            Matthew

    -- 
    Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                          Savill Way
    PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
    Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
    
    



  • Next message: Robert Golovniov: "Wine"

    Relevant Pages

    • Re: phpMyAdmin not loading MySQL extensions
      ... > I'm having trouble configuring phpMyAdmin. ... > in a browser I get the message unable to load mysql extensions the msql link ... I assume you have compiled up php with the mysql ...
      (freebsd-questions)
    • Re: Can no connects to mySQL database
      ... And what issues do their developers "not know how to correct"? ... Why MySQL need have more security than FTP programs?(that works ... this has nothing to do with phpMyAdmin. ...
      (comp.lang.php)
    • Re: phpMyAdmin installation problem
      ... > Hello Henry! ... > Ok, no foreign party software besides phpMyAdmin, that limits the ... >> control user and pass and grants in mysql, select cookie, start mysql, ... > config.inc.php file by accident. ...
      (Fedora)
    • Re: Wamp help! mySQL wont start
      ... I have copied the Coppermine folder in the www wamp folder and named it something like "MyPhotoAlbum". ... Version de MySQL: ... But if I launch the "start Wamp server" I get a fatal error of the CLI that makes it shut down. ...
      (alt.php)
    • Re: Wamp help! mySQL wont start
      ... I have copied the Coppermine folder in the www wamp folder and named it something like "MyPhotoAlbum". ... Version de MySQL: ... et "password" dans votre configuration et vous assurer qu'elles correspondent aux informations fournies par l'administrateur du serveur MySQL. ...
      (alt.php)