Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP MySQLi PDO Errors

Status
Not open for further replies.

kherge

Programmer
Nov 14, 2007
14
US
I am trying to install PHP v5.2.5 on Redhat ES 3 but I keep receiving this error during the build configuration:

checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
checking for mysql_close in -lmysqlclient... yes
checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
checking for mysql_set_server_option in -lmysqlclient... yes
checking for mysql_stmt_field_count in -lmysqlclient... yes
...snip...
checking for MySQL support for PDO... yes
checking for mysql_config... not found
configure: error: Cannot find MySQL header files under

Here is how I am configuring PHP for the build:

Code:
./configure --with-apxs=/usr/local/apache/bin/apxs \
            --with-mysql=/usr/local/mysql \
            --with-mysqli=/usr/local/mysql/mysql_config \
            --with-zlib \
            --enable-bcmath \
            --with-bz2 \
            --with-curl \
            --with-curlwrappers \
            --enable-exif \
            --enable-ftp \
            --with-gd \
            --with-ttf \
            --enable-gd-native-ttf \
            --enable-mbstring \
            --with-mcrypt \
            --with-mhash \
            --with-ncurses \
            --enable-pcntl \
            --with-pdo-mysql \
            --with-pdo-pgsql \
            --with-pgsql \
            --with-mm \
            --enable-soap \
            --enable-sockets \
            --enable-sqlite-utf8 \
            --enable-sysvmsg \
            --enable-sysvsem \
            --enable-sysvshm \
            --with-xmlrpc \
            --with-xsl \
            --enable-zip \
            --with-pear \
            --enable-zend-multibyte

I installed this version of MySQL:

mysql-5.0.45-linux-i686.tar.gz
 
Built from source and set the prefix to /usr/local/mysql but I'm still getting the same error message.
 
can you see the header files in /usr/local/mysql?

and can you see the mysql_config file in the same location?
 
i notice that you are not enabling pdo in the config, nor building it as a shared library. are you intentionally building it as static? (note that if you do build as shared, the sqlite lib also needs to be
Code:
--enable-pdo=shared --with-pdo-sqlite=shared --with-sqlite=shared

 
I haven't explicitly stated anywhere that I wanted static or shared. I don't know how much an impact that would have on what I plan on doing.

I recompiled MySQL without the embedded server option and it worked. Just need to fix all other missing libraries.

Thanks, jpadie.
 
i would compile pdo and the others as shared as you can then update them easily (using pecl) without the need to recompile all of php. the main diff is with shared libs you also need to enable them in php.ini. no great sweat.

glad you got it working.
 
@jpadie: I took your advice and made the PDOs shared. Thanks.

Hmm, compiled PHP and did the [tt]make test[/tt]. 7 tests failed and it asked me to send the report since I may have found a bug in PHP.

It had somethings to do with the following:
date OO cloning
Bug #16069
iconv stream filter
IPv6 Loopback test
htmlentities() test 2
htmlentities() test 4
htmlentities() test 15

Any help is appreciated. TIA
 
sounds strange, but i would not worry about the test results. if php loads and works ok then ignore them. if you google the errors then you can see whether you think that they are likely to affect your scripts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top