RE: PHP, MySQL and Apache
Hi, I'm a newbie too. Was faced with this the other day.. I'm using Redhat 8.0 PHP-4.2.2-8.07 and when this problem surfaced, found out that phpinfo() states that it is compiled with the --with-mysql=shared. But I did not install php-MySQL*.rpm Did a rpm -Uvh php-MySQL*.rpm and it installed the mysql.so file into the /usr/lib/php4 directory. After that, you need to stop and restart httpd /sbin/service httpd restart Try again, that should do it. Cheers, Mun Heng, Ow H/M Engineering Western Digital M'sia DID : 03-7870 5168 -Original Message- From: Becoming Digital [mailto:[EMAIL PROTECTED] Sent: Saturday, June 14, 2003 2:58 AM To: [EMAIL PROTECTED] Subject: Re: PHP, MySQL and Apache If PHP was built without MySQL support, you need to recompile it. It should be in there, though, so check the php.ini file. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Subscriptions [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, 13 June, 2003 13:49 Subject: PHP, MySQL and Apache 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: 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... . When governments fear the people there is liberty. When the people fear the government there is tyranny. -Thomas Jefferson, third US president, architect and author (1743-1826) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP, MySQL and Apache
You need to recompile PHP against the 4.0.nn headers. Curtis Subscriptions said: 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: 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... . When governments fear the people there is liberty. When the people fear the government there is tyranny. -Thomas Jefferson, third US president, architect and author (1743-1826) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP, MySQL and Apache
actually, its worse. upon re-reading you need to compile in the mysql drivers for mysql. configure --with-mysql=path to mysql include files Curtis Subscriptions said: 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: 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... . When governments fear the people there is liberty. When the people fear the government there is tyranny. -Thomas Jefferson, third US president, architect and author (1743-1826) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
PHP, MySQL and Apache
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: 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... When governments fear the people there is liberty. When the people fear the government there is tyranny. -Thomas Jefferson, third US president, architect and author (1743-1826) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP, MySQL and Apache
If PHP was built without MySQL support, you need to recompile it. It should be in there, though, so check the php.ini file. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Subscriptions [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, 13 June, 2003 13:49 Subject: PHP, MySQL and Apache 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: 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... When governments fear the people there is liberty. When the people fear the government there is tyranny. -Thomas Jefferson, third US president, architect and author (1743-1826) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP, MySQL and Apache
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... When governments fear the people there is liberty. When the people fear the government there is tyranny. -Thomas Jefferson, third US president, architect and author (1743-1826) -- From Peter Burden, [EMAIL PROTECTED] http://www.scit.wlv.ac.uk/~jphb -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP, MySQL and Apache
Peter, When you get everything working please let me know how you did it. I have been trying for days without any luck. Regards, Jay ---Original Message--- From: Peter Burden Date: vrijdag 13 juni 2003 22:46:20 To: Subscriptions Cc: [EMAIL PROTECTED] Subject: Re: PHP, MySQL and Apache 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... When governments fear the people there is liberty. When the people fear the government there is tyranny. -Thomas Jefferson, third US president, architect and author (1743-1826) -- From Peter Burden, [EMAIL PROTECTED] http://www.scit.wlv.ac.uk/~jphb -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] . IncrediMail - Email has finally evolved - Click Here
Re: PHP, MySQL and Apache
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 WindowsI'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]