Re: mysql works, but php won't connect
| From: | Neil Curri | Date: | Thu, 04 Jan 2001 15:28:00 +0000 |
| Subject: | Re: mysql works, but php won't connect | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-1443@lists.php.net to get a copy of this message | ||
Andrew Gould wrote:
>
> Was PHP compiled for use with MySQL?
Yup. I configured php4 with mysql, the quick and easy way. Here are my steps:
1. Use redhat 7's default install of apache as-is
2. Install mysql server and client from the rpm's
3. Install apache-devel rpm
4. install php from source:
./configure --with-mysql --with-apxs
make
make install
5. Edit httpd.conf to point to the libphp4.so module/library
6. Restart apache
This worked fine on a clean install of Redhat 7. However, the machine
I'm trying to get this to work on now was upgraded to Redhat 7 from
Redhat 6.2, and it had a previously-installed version of Apache from
source, already configured with php3 and mysql. I'm now using Redhat's
RPM of Apache and trying to get that to work. Thanks for your help.
-Neil
> --- Neil Curri <ncurri@fastcompany.com> wrote:
> > Hi there, I've successfully installed php using the
> > quick installation
> > method (I have Redhat's apache and apache-devel rpms
> > installed, then just
> > used the default configure options for php). PHP
> > definitely works,
> > however,
> > I can't seem to connect to mysql. Here's my error
> > message on a php page
> > that tries to access a runnning database:
> >
> > "Warning: MySQL Connection Failed: Can't connect to
> > local MySQL server
> > through socket '/var/lib/mysql/mysql.sock' (111) in
> > /var/www/html/rt.php
> > on line 10"
> >
> > The mysql client works just fine, the mysql.sock
> > file is right there in
> > /var/lib/mysql/mysql.sock, which is where php is
> > looking for it... why
> > can't PHP find it, yet I have no trouble connecting
> > to mysqld using the
> > mysql client?
> >
> > thanks!
> > -Neil
> >
> > --
> >
> ---------------------------------------------------------------------
> > Please check
> > "http://www.mysql.com/documentation/manual.php"
> > before
> > posting. To request this thread, e-mail
> > mysql-thread60577@lists.mysql.com
> >
> > To unsubscribe, send a message to:
> >
> >
> <mysql-unsubscribe-andrewgould=yahoo.com@lists.mysql.com>
> >
> > If you have a broken mail client that cannot send a
> > message to
> > the above address (Microsoft Outlook), you can use:
> > http://lists.mysql.com/php/unsubscribe.php
> >
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/