Peter Burden wrote:
Subscriptions wrote:

The httpd.conf connects PHP to Apache. What connects PHP to MySQL?


I've looked through google and I can't find anything that makes since to me.
Can someone point me in a direction as to where I can find this out?


The problem I'm having is I have PHP 4.3.2, MySQL 4.0.13 and Apache 2.0.46.
I have a page that is trying to connect to MySQL via PHP. The error is:#



When you install PHP you need to ensure that MySQL support is built in. This is
fairly straightforward when building PHP from source, although you may have to
tell the PHP build where your MySQL libraries are. Remember that PHP is
implemented as an Apache module or 'plug-in', make sure that when Apache
starts up, it also knows where the MySQL libraries are.[On Solaris this means
setting LD_LIBRARY_PATH suitably.]



Fatal error: Call to undefined function: mysql_connect() in /var/www/html/ww3.polkmechanical.com/test/mysql_test.php on line 8

The code on line 8 is:

$link = mysql_connect( "localhost", "user", "password" ) or
die(mysql_error());

I can log on through mysql at a telnet prompt with the database, user and
password.

Ty...

If you're installing php from souce, use '--with-mysql' when configuring php, and if you're using RPM's, make sure you have installed the php-mysql packages. If you're using Windows....I'm not sure, but I think you have to uncomment the line in the php.ini file to load the dynamic library.



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to