Fun with compiling PHP 5.1 (help)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Junx

    Fun with compiling PHP 5.1 (help)

    Alright, I'm trying to compile PHP 5.1 with the following options:
    ../configure --with-openssl --with-zlib --with-bz2 --enable-bcmath
    --enable-calendar --enable-mbstring --with-mcrypt --with-mhash
    --with-mysqli --with-mysql --enable-embedded-mysqli --disable-pdo
    --with-pgsql --with-pspell

    So far I've been able to get all dependencies and whatnot up to the
    MySQL area. The last error I get with it is:
    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... yes
    checking for mysql_set_serve r_option in -lmysqlclient... no
    configure: error: wrong mysql library version or lib not found. Check
    config.log for more information.

    Any ideas? I have the MySQL 4.1 libraries and server and whatnot, and
    I can't install (or use) the 4.0 libraries due to whatever reason they
    don't allow that to work.

  • Mike Willbanks

    #2
    Re: Fun with compiling PHP 5.1 (help)

    Junx,[color=blue]
    > Alright, I'm trying to compile PHP 5.1 with the following options:
    > ./configure --with-openssl --with-zlib --with-bz2 --enable-bcmath
    > --enable-calendar --enable-mbstring --with-mcrypt --with-mhash
    > --with-mysqli --with-mysql --enable-embedded-mysqli --disable-pdo
    > --with-pgsql --with-pspell
    >
    > So far I've been able to get all dependencies and whatnot up to the
    > MySQL area. The last error I get with it is:
    > 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... yes
    > checking for mysql_set_serve r_option in -lmysqlclient... no
    > configure: error: wrong mysql library version or lib not found. Check
    > config.log for more information.
    >
    > Any ideas? I have the MySQL 4.1 libraries and server and whatnot, and
    > I can't install (or use) the 4.0 libraries due to whatever reason they
    > don't allow that to work.
    >[/color]

    For MySQL 4.1+ you can not use --with-mysql. You have to use
    --with-mysqli. If you were to look at the documentation for that
    specific extension you would find it there.

    Furthermore the best way to make sure php finds the correct libs for
    mysql is to do: --with-mysql=/path/to/mysql_config

    Hope that helps.

    --
    Mike Willbanks
    Zend Certified Engineer

    Comment

    • Junx

      #3
      Re: Fun with compiling PHP 5.1 (help)

      Alright, thanks, that basically did it. I think the problem was that I
      had --with-mysqli and --enable-embedded-mysqli both at once.

      Comment

      • Mike Willbanks

        #4
        Re: Fun with compiling PHP 5.1 (help)

        Junx wrote:[color=blue]
        > Alright, thanks, that basically did it. I think the problem was that I
        > had --with-mysqli and --enable-embedded-mysqli both at once.
        >[/color]

        Actually you had --with-mysql instead of mysqli. You actually can have
        both in the configure statement but it just needs to be uniform mysqli :)

        --
        Mike Willbanks
        Zend Certified Engineer

        Comment

        Working...