NYCPHP Meetup

NYPHP.org

[nycphp-talk] php install: "can't find mysql headers"

Hans Zaunere lists at zaunere.com
Sun Jul 10 14:55:26 EDT 2005


> Okay, I decided to go with a source install, and now I'm just confused.
> As I mentioned earlier I installed php 4.3.11 from source this morning
> without removing the existing php rpms, and I noticed that some things
> weren't working.  So I went back and removed those rpms and tried to
> rebuild again, but the problems don't go away.
> 
> The real problem I'm trying to solve is that apache (1.3) is
> consistently segfaulting on a few apparently randomly chosen calls.
> That is, I have a few links on my site that are garuanteed to cause a
> segmentation fault in apache, but it's seems oddly random why those
> links are broken and not any other.  So I thought, maybe it's an arcane
> php bug; upgrade to latest and then submit a bug-report if necessary.
> Even stranger, now that I've upgraded, I get the *same* behavior, but on
> *different* links (including any select operations with phpMyAdmin, but
> not update, insert, etc., and not selects in other php scripts...)
> 
> But my hope has been that, maybe, just maybe, there IS a bug in php's

Hmm, unlikely - at least for something this simple.  It's probably a cross
compile/RPM issue/version mismatch.

> mysql support somewhere, and if I were to compile
> --with-mysql=/path/to/mysql-headers I might just be okay.  But that
> seems a no-go, too.
> 
> Using '--with-mysql=/usr/include/mysql' gets me the error 'Cannot find
> MySQL header files under /usr/include/mysql'; same for
> '--with-mysql=/usr/lib/mysql'.  Those are the only two directories that
> rpm says contain files from the MySQL-devel package.  And
> /usr/include/mysql does contain mysql.h .

So you have the RPMs of MySQL installed?  And you've also installed the
libs/headers/shared libs/ RPMs from mysql.com, right?  Just to be overly
certain, you also have all the same version number and playform, right?

Before installing them, remove all MySQL or PHP RPMs.

rpm -qa | grep -i mysql
rpm -qa | grep -i php

Then of course rpm -e each one.

Once you seem to have things settled on that end, install the MySQL rpms.
And probably wouldn't hurt to run ldconfig and check ldconfig -p to make
sure the libs are installed and ready to be found (ie, they are listed).

Now you can compile PHP, specifying the base path of the MySQL install,:

--with-mysql=/usr

Give that a try and see if it helps.


---
Hans Zaunere
President, Founder

New York PHP
http://www.nyphp.org

AMP Technology
Supporting Apache, MySQL and PHP







More information about the talk mailing list