The _only_ real benefit of Apache2 over Apache1 is it's thread-based model. So why leave a stable, tried-and-true, robust Apache1 platform for no additional benefits at all? Why break compatibility? Why use the Apache2 branch if you don't need it?
PHP itself works quite fine in a threaded mode. However, PHP uses an enormous number of libraries (GD, database libs, and many others) which may-or-may-not-be thread-safe. So these libraries can cause some serious problems... and when you're in a threaded model, programs doing funny things is not only difficult to track down, but also can cause serious issues with all of the other threads (due to shared process context on the system and shared memory).
Lesson- just avoid it for the time being. Save a headache and additional security patches.
-M
From: Adam Goldstein <[EMAIL PROTECTED]> To: mysql <[EMAIL PROTECTED]> CC: Don Read <[EMAIL PROTECTED]>,Eric W.Holzapfel <[EMAIL PROTECTED]> Subject: Re: Connect to MySQL via PHP Date: Thu, 12 Feb 2004 13:05:00 -0500
Apache2 and php is a buggy combination? Not that I have seen.
Or are you referring to trying to use the Apache Worker (mutlithreaded) MPM with php... I believe that is still a bit buggy, though, no rpms or packages seem to install it that way anyways. I'm hoping to get workerMPM working for me, too, as I have been having to use thttpd for serving images recently.
I'm not sure how horked up RHES3 is, but, std. RH7-9, Mandrake 7.2-9.2, Debian 3+ (among others) seem to have no problem what so ever connecting php->mysql out of the box, provided you have a user account on mysql to connect to and supply it in your my.cnf, php.ini or mysql_connect statements.
keep in mind rh and mdk broke up the portions of php into separate packages... such as php-imap, php-mysql, php-cli, php-ldap, etc. You will need to install the php-mysql package if mysql_connect is not being recognized. Also note, mdk has further separated the php.ini file to use separate php include files, similar to how they broke up apache's module configs... the structure is /etc/php.ini and /etc/php/#_phpmodulename.ini..they load in order of their number... This is good to keep in mind, as the mysql settings are no longer included in the primary php.ini file but in 34_mysql.ini.
-- Adam Goldstein White Wolf Networks http://whitewlf.net
On Feb 10, 2004, at 10:34 PM, Don Read wrote:
On 11-Feb-2004 Eric W. Holzapfel wrote:Hello Listers,
I have a problem with my PHP/redhat setup, and possible problem with my Mysql setup. I have Apache (2.0) and PHP (4.3.2) installed on a Red Hat 3.0 ES system.
Apache 2.0 + PHP is a known buggy combination.
I have MySql installed on a Slackware linux box.
Server on a remote host? Gotcha.
I want to be able to use Apache/PHP to connect to the mysql database on the slackware box. I "think" that PHP is set up ok, which may be a lie, because PHP says it does not recognize the commands like - mysql_pconnect and mysql_connect.
No, wait, lemme guess. Like 'function not defined' ? (eat your heart out, Miss Cleo)
Also if I try to connect to the database using something like this: mysql://user,[EMAIL PROTECTED] demodb this fails and the "or die getMessage()" returns DB: no such database. (I am trying to use the Pear DB here)
Do I need to have mysql installed on the red hat machine?
You'll need to compile in the client libs at least.
I can connect to the slackware linux box from a Windows machine using ODBC.
So your server is working and accepting remote connections. This is a good thing!
Any ideas on what I have not done, or what I have done wrong?
You haven't configured the Redhat PHP install to build in the MySQL client libraries.
To verify this --try this script: --- <?php phpinfo(); ?> ---
Look for '--with-mysql' in the Configure Command section. Also look for a MySQL Support section.
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.
--
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]
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]