Find the answer to your Linux question:
Results 1 to 6 of 6
Hi everyone Having a few problems configuring php with mysql on apache. All on RH8. Have got this running perfectly on home PC from same installation CDs but for some ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Jan 2003
    Location
    Cardiff, Wales
    Posts
    478

    mysql-php-apache error


    Hi everyone

    Having a few problems configuring php with mysql on apache. All on RH8.

    Have got this running perfectly on home PC from same installation CDs but for some reason does not work in the office.

    When running a php script which connects to a database I get the error
    Code:
    Fatal error: Call to undefined function: mysql_connect() in /var/www/html/starads/content/conndb.php on line 3
    My httpd.conf file can be seen at http://www.iscavision.com/errors/httpd.htm
    my php.ini can be seen at http://www.iscavision.com/errors/php.htm
    the results of php_info() can be seen at http://www.iscavision.com/errors/info.htm

    All help appreciated coz I don't know what is wrong.

    Cheers

    Kris
    No trees were harmed during the creation of this message. Its made from a blend of elephant tusk and dolphin meat.

  2. #2
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    Non of those links work for the php stuff. Make sure you have php-mysql installed.

  3. #3
    Linux User
    Join Date
    Jan 2003
    Location
    Cardiff, Wales
    Posts
    478

    links work now and possibly solved

    Sorry posted this and then ftped the files up.

    I think I have found the problem anyway.

    I am at home so I can't test it.

    In the php.ini file the line
    Code:
    extension=mysql.so
    is commented out. I think uncommenting this should solve it. What do you think?
    No trees were harmed during the creation of this message. Its made from a blend of elephant tusk and dolphin meat.

  4. #4
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    Yes that should fix it.

  5. #5
    Linux User
    Join Date
    Jan 2003
    Location
    Cardiff, Wales
    Posts
    478

    fixed it another way

    that didn't actually fix it.
    the library was missing but the RH package manager said it was installed ( well php, apache and mysql) were. The exact file for php mysql wasn't listed implicitly. So I copied the php.ini and two library files off my home PC and copied them over the top. That worked. Cheeky !
    No trees were harmed during the creation of this message. Its made from a blend of elephant tusk and dolphin meat.

  6. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    There is an RPM called php-mysql or something like that that incorporates that library. It's basically just an interface package between PHP and MySQL.

Posting Permissions

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