Re: Unable to load dynamic library / mysql.so



Dear all,

2007/9/6, Matthew Seaman <m.seaman@xxxxxxxxxxxxxxxxxxxxxx>:

I got a php warning and I am not sure what would be the best way to
deal with it. I'd like to be able to load the dynamic extension as
without it database back-end sites won't work. Will it help to force
upgrade of php4 and php4-extensions (portupgrade -f)?

php -v
PHP Warning: Unknown(): Unable to load dynamic library
'/usr/local/lib/php/20020429/mysql.so' - Shared object
&quot;libmysqlclient.so.15&quot; not found, required by
&quot;mysql.so&quot; in Unknown on line 0
PHP 4.4.7 (cli) (built: Jul 28 2007 17:27:57)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

ldconfig -r | grep mysql

ldconfig -r | grep mysql
search directories:
/lib:/usr/lib:/usr/lib/compat:/usr/X11R6/lib:/usr/local/lib:/usr/local/lib/compat/pkg:/usr/local/lib/mysql:/usr/local/lib/dovecot:/usr/local/lib/dovecot/imap:/usr/local/lib/dovecot/pop3:/usr/local/lib/dovecot/lda:/usr/local/lib/pth:/usr/local/lib/apache2
134:-lmysql_drv.7 => /usr/local/lib/libmysql_drv.so.7
206:-lmysqlclient.16 => /usr/local/lib/mysql/libmysqlclient.so.16
207:-lmysqlclient_r.16 => /usr/local/lib/mysql/libmysqlclient_r.so.16


Seems you've actually installed mysql-client-5.1.x rather than the
mysql-client-5.0.x PHP is looking for.

Recompiling PHP will make it link against the later shlib. In fact,
you should run this:

portupgrade -fr mysql-client

(or the equivalent in whatever ports management package you prefer)

This has done the trick and solved the problem. Thank you very much
for being so helpful!

Zbigniew Szalbot
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [PHP] PHP Performance and System Load
    ... General performance tip do not include more than 10 files a page load. ... Uses php Adodb ... At the moment I am trying to lower the number of filesystem calls as ... over a symlink placed in every webspace directory. ...
    (php.general)
  • Re: High Scores
    ... If you want to view High scores it returns Could Not load scores ... here is the PHP script ... Edit the game Flash file to point to this file on your server ... >> And the PHP script is here ...
    (alt.php)
  • Re: about structure.
    ... Of course if you want to use a load of checkboxes, it works too, just modify ... I thought about using a database... ... "I thought about using php... ... server needs to call upon php... ...
    (alt.php)
  • Re: Loading png images into a mysql table/database
    ... I have decided to use PHP and MySQL. ... I can load jpeg files into the table ... I do a select from the database, and then echo the image (with ... header(Content Type: image/jpeg) ...
    (comp.lang.php)
  • Re: [PHP] Re: can a session be used in a query?
    ... I've noticed that I somtimes have to get the page to load ... What I normally do is upload a blank php page with the same name as the one ... This one pulls all data regardless of user level: ... the query UserName = $UserName I get an undefined variable error... ...
    (php.general)