Building PHP with mysql support on CentOS

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

    Building PHP with mysql support on CentOS

    Can someone please help me build php with mysql support on CentOS. Have
    installed MySql and that works okay. I have downloaded the latest version of
    php and tried to build it but I keep getting errors about missing function
    mysql_connect() . This appears to be caused by not having extensions=mysq l in
    the php.ini file. However when I build php it does not make a mysql.so file,
    where does this come from? I have tried using the configure --with-mysql but
    it still does not generate it. I have managed to get it from another
    distribution but it does not work correctly due to incorrect versions of
    shared libraries.
    How do you build the mysql.so file?

    Thanks

    Jon


  • David Haynes

    #2
    Re: Building PHP with mysql support on CentOS

    John Smith wrote:[color=blue]
    > Can someone please help me build php with mysql support on CentOS. Have
    > installed MySql and that works okay. I have downloaded the latest version of
    > php and tried to build it but I keep getting errors about missing function
    > mysql_connect() . This appears to be caused by not having extensions=mysq l in
    > the php.ini file. However when I build php it does not make a mysql.so file,
    > where does this come from? I have tried using the configure --with-mysql but
    > it still does not generate it. I have managed to get it from another
    > distribution but it does not work correctly due to incorrect versions of
    > shared libraries.
    > How do you build the mysql.so file?
    >
    > Thanks
    >
    > Jon[/color]

    Disclaimer: I use Fedora Core 4

    With Fedora, the --with-mysql (or --with-mysqli) needs to point to the
    mysql_config program (typically in the bin directory of mysql).
    So, my directive is:
    --with-mysqli=/opt/local/mysql/bin/mysql_config

    -david-

    Comment

    • John Smith

      #3
      Re: Building PHP with mysql support on CentOS

      Thanks for this, i have tried this with the same outcome, we seem to be
      missing mysql.so

      Thanks

      Jon
      "David Haynes" <david.haynes2@ sympatico.ca> wrote in message
      news:iIeRf.3866 4$Gz4.16414@fe1 3.usenetserver. com...[color=blue]
      > John Smith wrote:[color=green]
      >> Can someone please help me build php with mysql support on CentOS. Have
      >> installed MySql and that works okay. I have downloaded the latest version
      >> of php and tried to build it but I keep getting errors about missing
      >> function mysql_connect() . This appears to be caused by not having
      >> extensions=mysq l in the php.ini file. However when I build php it does
      >> not make a mysql.so file, where does this come from? I have tried using
      >> the configure --with-mysql but it still does not generate it. I have
      >> managed to get it from another distribution but it does not work
      >> correctly due to incorrect versions of shared libraries.
      >> How do you build the mysql.so file?
      >>
      >> Thanks
      >>
      >> Jon[/color]
      >
      > Disclaimer: I use Fedora Core 4
      >
      > With Fedora, the --with-mysql (or --with-mysqli) needs to point to the
      > mysql_config program (typically in the bin directory of mysql).
      > So, my directive is:
      > --with-mysqli=/opt/local/mysql/bin/mysql_config
      >
      > -david-
      >[/color]


      Comment

      • David Haynes

        #4
        Re: Building PHP with mysql support on CentOS

        John Smith wrote:[color=blue]
        > Thanks for this, i have tried this with the same outcome, we seem to be
        > missing mysql.so
        >[/color]

        Are you using a pre-packaged mysql or one you have built yourself?
        If you are building it yourself, you should find the libraries in lib/mysql/

        -david-

        Comment

        Working...