Call to undefined function: mysql_connect()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rpnew
    New Member
    • Aug 2007
    • 189

    Call to undefined function: mysql_connect()

    Hi,

    well i know that i've some problem here with php and mysql.. mainly with php compilation with mysql...
    now i've "php 4.2.2" on server... and "mysql Ver 14.12 Distrib 5.0.24, for pc-linux-gnu (i686) using readline 5.0"

    1. when i run phpinfo() it shows

      --with-mysql=shared,/usr but no mysql related other info
    2. when i run php from commandline then it shows following error "PHP Warning: Unable to load dynamic library '/usr/lib/php4/mysql.so' - libmysqlclient. so.10: cannot open shared object file: No such file or directory"
    so let me know what should i suppose to do here??

    Regards,
    RP
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, RP.

    Sounds like PHP is misconfigured; it's looking for the MySQL libraries in the wrong place.

    Run `which mysql` in a terminal to determine where MySQL is installed. Generally, MySQL's lib files are located in the same place as its binaries (on many systems, it will be located in /usr/local/mysql).

    Try re-configuring PHP --with-mysq=/path/to/mysql, then recompile and re-install.

    Comment

    • rpnew
      New Member
      • Aug 2007
      • 189

      #3
      Originally posted by pbmods
      Heya, RP.

      Sounds like PHP is misconfigured; it's looking for the MySQL libraries in the wrong place.

      Run `which mysql` in a terminal to determine where MySQL is installed. Generally, MySQL's lib files are located in the same place as its binaries (on many systems, it will be located in /usr/local/mysql).

      Try re-configuring PHP --with-mysq=/path/to/mysql, then recompile and re-install.
      Hi,
      Thanks for the reply.. i'll look into that...

      Regards,
      RP

      Comment

      Working...