Problem w/ mysql extension installation

Matthew Seaman m.seaman at
Sat Jan 16 12:30:04 UTC 2010

jaymax wrote:
> phpmyadmin requires the mysql extension which is apparently not included in
> the mysql54 ports

Well, PHP modules aren't provided at all by the mysqlNN-{client,server,scripts}
ports.  You want databases/php5-mysql or databases/php5-mysqli

I have certainly been able to install phpmyadmin with mysql-5.4.x from the 
ports -- it works perfectly well.

> Installing it from 
> /usr/ports/databases/php5-mysql ==>
> ---
> ---
> ---
> In file included from /usr/local/include/php/main/../main/php_config.h:2839,
>                  from /usr/local/include/php/Zend/zend_config.h:1,
>                  from /usr/local/include/php/Zend/zend.h:53,
>                  from /usr/local/include/php/main/php.h:34,
>                  from
> /usr/ports/databases/php5-mysql/work/php-5.2.12/ext/mysql/php_mysql.c:32:
> /usr/local/include/php/ext/php_config.h:1:30: error: ext/mysql/config.h: No
> such file or directory
> *** Error code 1
> 1 error
> *** Error code 1
> Stop in /usr/ports/databases/php5-mysql.
> Indeed /usr/local/include/php/ext/mysql/config.h is not present!
> Should this have been installed with the mysql installation or from a
> dependency?
> How can I correct this ?

Not sure what went wrong here, but .../ext/mysql/config.h is part of the
php5-mysql module you're trying to install:

% pkg_which /usr/local/include/php/ext/mysql/config.h

That file shouldn't be referenced from that location when building the 
php5-mysql module -- rather it should use a version of it included with
the PHP sources.

I see from your later message that this problem has gone away for you,
however, for the benefit of the archives, the best thing to do in this
circumstance is generally to 'make clean' in the port concerned and start
again from the beginning.  If the problem goes away, then it was probably
a transient local problem.  On the other hand, if it persists, then its 
likely to be a configuration problem on your system, or a bad interaction
between that port and something else you've got installed.  It might be
a bug in the port, but considering how popular the combination of php and
MySQL is, chances are hundreds or thousands of other people would have 
experienced the same thing, and the problem would have been fixed in short



Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP:     Ramsgate
                                                  Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-questions mailing list