MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Adam Goldstein Date:February 12 2004 6:05pm
Subject:Re: Connect to MySQL via PHP
View as plain text  
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

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,passwrd@slackhost 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                                       dread@stripped
> -- 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:
> To unsubscribe:    

Connect to MySQL via PHPEric W. Holzapfel11 Feb
  • RE: Connect to MySQL via PHPLigaya Turmelle11 Feb
    • RE: Connect to MySQL via PHPFranck ZAIRE11 Feb
  • Re: Connect to MySQL via PHPDon Read11 Feb
    • Re: Connect to MySQL via PHPAdam Goldstein12 Feb
    • Re: Connect to MySQL via PHP with success!Eric W. Holzapfel13 Feb
  • Re: Connect to MySQL via PHPCurtis Maurand11 Feb
Re: Connect to MySQL via PHPMike Miller12 Feb
  • RE: Connect to MySQL via PHPDonny Simonton12 Feb