Posted by Littlefire on 09/28/96 11:37
awdsites@gmail.com wrote:
> Hi,
>
> I'm a noob with a server so keep that in mind :) Been trying to connect
> with php to mysql and all I get is:
>
> "Fatal error: Call to undefined function: mysql_connect()"
==snip==
> # rpm -qa | grep php
>
> php-ldap-4.3.2-23.ent
> php-mysql-4.3.2-3mdk
> php-imap-4.3.2-23.ent
> php-4.3.2-23.ent
I haven't worked with PHP4 in quite a while, but I seem to remember that you
have to enable the mysql.so extension in your php.ini file. On PHP5 that
isn't necessary any more.
$ locate php.ini
/etc/php/apache2-php5/php.ini
^^^ This will be different for you.
--- The mysql.so extension should be listed in the file, you just uncomment
it.
$ grep mysql.so /etc/php/apache2-php5/php.ini
--- Now use a text editor to open that file and uncomment the correct
line(s)
--- Then you restart your apache
$ su
Password:
# apachectl restart
That should have you fixed up :)
Albe
[Back to original message]
|