Solved

Compiling with MySQLi

Posted on 2006-06-22
17
1,213 Views
Last Modified: 2013-12-13
Hello Experts,
I have been trying to compile and install php with the MySQLi extensions.  My Linux Dist. is FC4. So far I have not had any luck.
I have MySQL 5.0.22 installed on the same box (this is a development box). Does anyone have a step by step set of instructions that
states what I need and what commands to issue? I've been bouncing back and forth between the MySQL and PHP help documents, and
find they it's hard to get a clear cut answer on just what I'm really supposed to do.
So far I have downloaded php-5.1.4.tar.gz, unpackaged it and tried to do ./configure --with mysqli=/usr/bin. It keeps telling me that I have the wrong MySQL client, but I have the 5.0.22 client installed also.
Thanks for any help.
Chad
0
Comment
Question by:ChadMarsh
  • 9
  • 5
  • 3
17 Comments
 
LVL 2

Author Comment

by:ChadMarsh
ID: 16960244
Here is the exact error

checking whether to enable embedded MySQLi support... no
checking for mysql_set_server_option in -lmysqlclient... no
configure: error: wrong mysql library version or lib not found. Check config.log for more information.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 16967190
> It keeps telling me that I have the wrong MySQL client, but I have the 5.0.22 client installed also.
ok, then you first need to identify the correct mysql client and libraries. How did you install mysql 5.x?
Try with
  mysql -V
  which mysql
  ldd `which mysql`
and post result
0
 
LVL 2

Author Comment

by:ChadMarsh
ID: 16968120
[root@mercedes ~]# mysql -V
mysql  Ver 14.12 Distrib 5.0.22, for pc-linux-gnu (i686) using readline 5.0

[root@mercedes ~]# which mysql
/usr/bin/mysql

[root@mercedes ~]# ldd `which mysql`
        not a dynamic executable

Thanks
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 16968229
sounds like you're missing the includes of mysql 5.x
How did you install MySQL 5.x, using rpm? then you need to install a devel package also.
0
 
LVL 2

Author Comment

by:ChadMarsh
ID: 16968280
I did use an RPM and I have the MySQL-devel 5.0.22-0 package installed.

I used the RPM's from this section "Linux x86 generic RPM (statically linked against glibc 2.2.5) downloads"
on the MySQL website.
0
 
LVL 48

Expert Comment

by:hernst42
ID: 16968443
depending on where you have installed your mysql-5.0.22 libs try using

./configure --with-mysqli=/usr
or
./configure --with-mysqli=/usr/local/mysql

How did you install those mysql 5.0.22 libs?
0
 
LVL 2

Author Comment

by:ChadMarsh
ID: 16968480
I'll try those configure commands.
I used RPM's also to install the libs.
0
 
LVL 2

Author Comment

by:ChadMarsh
ID: 16968501
Both commands produced the following:

checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
mysql_config not found
configure: error: Please reinstall the mysql distribution

Do you think it would be wise to uninstall all of those RPM's and start over?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Author Comment

by:ChadMarsh
ID: 16968505
My mysql_config file resides in /usr/bin
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 16969904
> I used RPM's also to install the libs.
the RPMs should tell your where it installs, try
   rpm -ql ....
0
 
LVL 2

Author Comment

by:ChadMarsh
ID: 16971070
They look like they are in the logical folders. Is there anything specific you would like to see?
I'm getting close to rebuilding the whole box and loading everything with tar files..
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 16973281
> logical folders.
please post the path where the include files and libs are installed
0
 
LVL 48

Expert Comment

by:hernst42
ID: 16981604
Did you used the rpm from FC4 or from the mysql-page? If you used FC4 make sure also the mysql-devel rpm is installed also
0
 
LVL 2

Author Comment

by:ChadMarsh
ID: 16985290
I went ahead and took out my RPM install and re-installed it from a tar
My lib folder is /usr/local/mysql-max-5.0.22-linux-i686/lib  I'm thinking this is not right.
My include folder is /usr/local/mysql-max-5.0.22-linux-i686/include

I did set up a link to access those folders from /usr/local/mysql
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 250 total points
ID: 16987371
you have to specify these installation paths as option to the ./configure command
0
 
LVL 48

Assisted Solution

by:hernst42
hernst42 earned 250 total points
ID: 16990439
Then try
./configure --with-mysqli=/usr/local/mysql-max-5.0.22-linux-i686

to build that extension
0
 
LVL 2

Author Comment

by:ChadMarsh
ID: 17009137
Thanks for the help. I ended up reinstalling FC4 with the default php and mysql, then I upgraded mysql with the 5.0.22 RPM.
Still a little buggy, but it's working.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now