OK...I am running RedHat 7.3 with PHP 4.2.3 and mysql-3.23.49-3.
I am in the process of setting all 3 up...apache, php, and mysql. MYSQL IS ALREADY INSTALLED FROM RPM. I am in the php directory and run the command:

./configure --with-mysql=/path/to/mysql

Once I run it, the very last line when done compiling says:

configure: error: Cannot find header files under /path/to/mysql

Nothing seems to work!! I'm not literally typing in "/path/to/mysql" of course.....i've tried a variety of paths....my question is : what is the path to the mysql "header files"..with a RPM install..??

When I do a find, I get the following output referring to mysql:

/var/lib/mysql
/var/lib/mysql/mysql
/usr/bin/mysql
/usr/lib/mysql
/usr/share/mysql
/usr/local/php-4.2.3/ext/mysql
/usr/local/php-4.2.3/pear/DB/tests/mysql

Thanks

    should be /usr/include/mysql/

    If not just search for mysql.h and wherever that is...thats where your include dir for mysql is.

    good luck

    tha_mink

      I tried to point it to /usr/include/mysql...there is no sign of any dorectory or file in /usr/include...so I did a search for mysql.h and it said : /usr/local/php-4.2.3/ext/mysql/libmysql/mysql.h...so I tried that path....still didn't work!!

      Should I just download the scource mysql tarball?? I hate pointing to programs installed by RPMs b/c data it seems is in multiple directories...

      Any other suggestions??

        Oh yeah...now i remember. You installed via rpm so there is no header files. You need to download and install em. Lucky for you there is a header file rpm for mysql. Search out the RPM...may be on your Redhat disc and install the rpm. It will probably install the header files in /usr/include/mysql but may put em somewhere else. Either way...get the header rpm (they may call it mysql development or something). Install it and then you should have em.

        good_luck

        tha_mink

          ok....I installed the mysql-devel rpm off the cd...I did a "ls mysql"
          on the /usr/include and it list the following:

          dbug.h my_global.h mysql_com.h raid.h
          errmsg.h my_list.h mysqld_error.h sslopt-case.h
          m_ctype.h my_net.h mysql.h sslopt-longopts.h
          m_string.h my_no_pthread.h mysql_version.h sslopt-usage.h
          my_config.h my_pthread.h my_sys.h sslopt-vars.h

          I then entered: ./configure --with-mysql=/usr/include

          and get the same error!! What is going on here!!

            is it /usr/include/
            or
            /usr/include/mysql/

              4 months later

              This is what I used:

              ./configure \
              --with-apxs2=/usr/local/apache/bin/apxs \
              --with-mysql \
              --prefix=/usr/local/apache/php \
              --with-config-file-path=/usr/local/apache/php \
              --enable-track-vars \
              --enable-force-cgi-redirect \
              --disable-cgi \
              --with-zlib \
              --with-gettext \
              --with-gdbm

              As reccomended by:

              http://dan.drydog.com/apache2php.html

              Do I need to install MySql first?

                I installed mysql and get the same problem.

                  I dont get any errors when i remove
                  --with-gdbm

                  but what the is gdbm anyways?

                    I fixed this by installing some gdbm dev package

                      Write a Reply...