Results 1 to 4 of 4

Thread: php+mysql "undefined function mysql_connect()"

  1. #1
    Join Date
    Mar 2007
    Location
    Margate, FL
    Beans
    3

    php+mysql "undefined function mysql_connect()"

    Hi everyone, I'm a new user to this Furum.

    I have that error message:

    "Fatal error: Call to undefined function mysql_connect() in /var/www/cjbTest/myConnect.php on line 16"

    line 16: mysql_connect('host', 'uName', 'pw') or die(mysql_error());
    line 17: mysql_select_db(dbName) or die(mysql_error());

    I did check the php.ini file and uncomment:
    extension=mysql.so

    But I do not know the location of mysql.so. And if I don't have the file (mysql.so), where can I download it?

    I NEED HELP!!!

  2. #2
    Join Date
    Feb 2007
    Beans
    19

    Re: php+mysql "undefined function mysql_connect()"

    You need to install the package mysql-server

  3. #3
    Join Date
    Jan 2006
    Beans
    961

    Re: php+mysql "undefined function mysql_connect()"

    this is probably possible to do using the package manager directly, but i'm too lazy to bother figuring that out now .. so

    * http://packages.ubuntu.com/
    * http://packages.ubuntu.com/cgi-bin/s...edgy&arch=i386
    ..leading too..
    * http://packages.ubuntu.com/edgy/web/php5-mysql

    ..as the most likely candidate i think.. so then you do:

    Code:
    sudo aptitude install php5-mysql
    never ever(#1) "download" stuff when working in Linux; use the package manager of the distro you are using!


    #1: there are some exceptions to this, but you better be damn sure you have a rationale for doing something like that.

  4. #4
    Join Date
    Mar 2007
    Location
    Margate, FL
    Beans
    3

    Re: php+mysql "undefined function mysql_connect()"

    I would like to thank you both Monk-e and Inostdal. Now, everything works very well. BIG Thank you again for helping me; you are the best!!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •