Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 2000051

Re: [PHP3] adding mysql to already compiled php From: Richard Lynch (richard <email protected>)
Date: 05/15/00

In article <20000513175838.4216E818E <email protected>>, david <email protected>
(David Dahl) wrote:

> is there a way to add mysql or postgresql support to an
> already-compiled php 3.0.12?

Apparently there is, but it's not for the faint of heart...

> > [me]
> > So I could have added MySQL to support to my PHP3 CGI binary without
> > recompiling the whole thing?... Oh well. It was probably too tricky for
> > me. I'm doing good when I can do ./configure/make/make install with
> > nothing going wrong.
> >

[Sascha (one of the PHP Developers)]:
> Right, it was possible, but it sucked. Now it sucks less. :)
>
> In PHP 4.0, you can configure PHP with:
>
> $ ./configure \
> --with-apxs \
> --enable-sysvsem=shared \
> --enable-sysvshm=shared \
> --with-mysql=shared
>
> This will create the sysvsem, sysvshm and mysql extension as
> shared extensions. A "make install" will put them into the right
> directory, so that they are immediately accessible (they are not
> automatically loaded).
>
> You can then use the following command in your scripts:
>
> dl("mysql.so"); # loads the MySQL extension
>
> Alternatively, you can add the following line to your php.ini.
> This will cause the extension to be accessible to each script.
>
> extension=mysql.so

If Sascha says it sucks, you'd have to really know what you were doing to
make it work...

The time to recompile PHP from scratch isn't that much (the second time --
the first time takes a long time due to inexperience)

-- 
Richard Lynch                | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA        | http://www.L-I-E.com/artists.htm
http://www.zend.com          | (this has nothing to do with Zend, duh!)

-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>