Re: Enabling MySQL for PHP on CentOS 5
- From: Dances With Crows <danceswithcrows@xxxxxxx>
- Date: 28 Mar 2008 18:46:37 GMT
matt staggered into the Black Sun and said:
On Mar 28, 8:30 am, Dances With Crows wrote:
matt staggered into the Black Sun and said:where it shows the 'configure command' the option is --without-mysql
downloaded the rpm for the latest mysql build (5.0) both the serverPut together a tiny PHP page that does <? phpinfo(); ?> . Take a
and the client. I installed both of those and the mysql server is
running correctly. However, I cannot get PHP to use mysql correctly.
look at the output from that tiny page and grep it for "mysql".
but everywhere I look says it should be configured with mysql support
enabled but I guess centos didnt do that.
That's not a good thing what are the people at CentOS smoking too many
web applications need MySQL if they don't offer a PHP with MySQL you'll
need to build it yourself or go look on the repositories for something
someone else has built. (Run-on sentences are hard to read; please
don't write like that!)
My php.ini file also has a mysql section but I still thought I had to
load the extension into the file with something like
'extension=mysql.so' or something similar.
Not AFAICT. Then again, I built my PHP with USE="mysql", so it already
had that.
I have been googling similar things to that but all that I can seem toBasically, I want php to have mysql support but I would rather notgoogle://centos php mysql configuration ? Or have you already tried
have to reconfigure everything that is already installed.
that and been unable to eyeball-grep anything useful out?
find are instructions to install each portion from scratch.
If you have the mysql-dev and apache-dev packages installed, the only
thing you need to do is compile PHP and include the --with-mysql option
to ./configure . Really, the best long-term solution is to use a distro
that doesn't do something this stupid. A PHP without MySQL support is
about as useful as a three-legged horse AFAICT.
thought about doing that but when I go to php.net and try and find
installers for linux they tell me they dont have them on their site
because all linux distributions now come with php support.
"Installers"? You want the source tarball. Like so:
(download php5-1.2.3.4.tar.bz2 from the main site)
tar xjf php5-1.2.3.4
cd php5-1.2.3.4
../configure --help
(read and understand the output; there are a lot of flags that you can
set, the main ones you want are --with-mysql and --prefix .)
../configure
(read the output, if it complains about missing libraries, get busy
installing development packages)
make
make install
....BTDT, though it was 8 years ago. There *should* be a better way,
since so many people need PHP with MySQL. Check all the repositories
for other PHP packages, and see if you can find one with MySQL support.
Maybe if I can just get a copy of a mysql.so file I can put it in the
extensions directory and have everything work?
I don't think so. "ldd `which php`" tells me that my php is linked
against libmysqlclient.so.15 , which resides in /usr/lib/ here. If you
can't find a prebuilt package, you'll have to build the thing yourself--
though I can't imagine that's the ideal/approved solution for everyone
who's using CentOS.
--
For every complex problem, there is a solution that is simple,
neat, and wrong.
My blog and resume: http://crow202.dyndns.org:8080/wordpress/
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
.
- Follow-Ups:
- Re: Enabling MySQL for PHP on CentOS 5
- From: matt
- Re: Enabling MySQL for PHP on CentOS 5
- References:
- Enabling MySQL for PHP on CentOS 5
- From: matt
- Re: Enabling MySQL for PHP on CentOS 5
- From: Dances With Crows
- Re: Enabling MySQL for PHP on CentOS 5
- From: matt
- Enabling MySQL for PHP on CentOS 5
- Prev by Date: Re: make a bash script wait till all its "background-children" are finished
- Next by Date: Re: Server farm needs help to xfer log files
- Previous by thread: Re: Enabling MySQL for PHP on CentOS 5
- Next by thread: Re: Enabling MySQL for PHP on CentOS 5
- Index(es):
Relevant Pages
|