im having problems getting php to talk to mysql, indeed a mysql_connect() is an undefined function.

i installed them when i installed the OS...

You probably need to ask me some more questions in order to work out what is wrong, as i dont really know what to tell you about the system...

php and mysql are working ok on their own, its just the link between the two which i need. Uncommenting the line mysql.so in the extensions part of php.ini, also the extensions directory looks to be going to the correct place.

this is my error...

Fatal error: Call to undefined function: mysql_connect() in /var/www/html/index.php on line 4

    Since you installed them as part of the OS, you could try this

      Cheers mate... All Sorted now...

      Used this info for it, from that thread you linked to...

      In addition, I found that RedHat's RPM system was somewhat confused (as it often is). I did not have mysql.so in my extensions dir. And yet when I tried to install php-mysql, which is the RPM that includes mysql.so, it said it was already installed. By RPM'ing it in with --force and --nodeps the mysql.so module was properly installed. I was then able to use the extensions technique, restart httpd, and get mysql_connect() to work properly.

      [edit]
      I thought it might be useful for searchers and for the archives if i said what i did...

      The file mysql.so couldnt be found on my system...

      downloaded the php-mysql rpm, cd'ed to the directory where i saved it... then did this to install it...

      "# rpm -i php-mysql-4.2.2-17.i386.rpm --force -- nodeps"

      I then made sure that in the php.ini file the line "enable_dl=On" was present and the line "extension = mysql.so " was uncommented.

      It now works OK...
      [/edit]

        Write a Reply...