Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22449 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30801 invoked by uid 1010); 15 Mar 2006 07:56:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 30786 invoked from network); 15 Mar 2006 07:56:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2006 07:56:48 -0000 X-Host-Fingerprint: 83.67.88.174 i-83-67-88-174.freedom2surf.net Linux 2.5 (sometimes 2.4) (4) Received: from ([83.67.88.174:34657] helo=kirk) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id F3/01-55982-0C8C7144 for ; Wed, 15 Mar 2006 02:56:48 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) by kirk (Postfix) with ESMTP id D0C888542E2; Wed, 15 Mar 2006 07:56:47 +0000 (GMT) Message-ID: <4417C8BF.1050303@cis.strath.ac.uk> Date: Wed, 15 Mar 2006 07:56:47 +0000 User-Agent: Thunderbird 1.5 (X11/20060309) MIME-Version: 1.0 To: Sara Golemon CC: internals@lists.php.net References: <441775B1.2060406@cis.strath.ac.uk> <016e01c647d9$02bfaff0$5c8be5a9@ohr.berkeley.edu> In-Reply-To: <016e01c647d9$02bfaff0$5c8be5a9@ohr.berkeley.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: PHP Extension - newbie question From: gmclachl@cis.strath.ac.uk (George McLachlan) Sara Golemon wrote: >> I ran a simple >> ./configure --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr/local/mysql >> --with-mysqli=/usr/local/mysql/bin/mysql_config --with-zlib --with-gd >> > This'll build 'em staticly into a new mod_php5.so, but you want just the > extension so you can plug it into your existing webserver build. > > First, forget about the chroot environment, you don't need it in order to > build a loadable extension. Second, I'm assuming that when you installed > PHP originally, you did so from source and that you've still got that source > tree around somewhere. Correct me on what ever points I got wrong... > > cd /path/to/php_source/ext/mysqli > phpize > ./configure --with-mysqli=shared,/usr/local/mysql/bin/mysql_config > make > cp modules/mysqli.so /path/to/extension_dir/ > > > Edit php.ini: > Make sure your extension_dir setting exists and points to the same spot you > put your new module. > Add: extension=mysqli.so > > > Restart apache > Profit! > > -Sara > Thanks Sara, Oh dear, don't think I should admit this, but in a blinding moment of stupidity I downloaded the source and cd'd to the directory where php was already intalled not the source. Hence I couldn't find the the mysqli dir in ext/ and made the wrong assumption that it would magically appear if I compiled it.To make matters worse I then cd'd to the source without noticing my mistake. Ah well you learn by your mistakes. At least I got to build PHP from source (several times) and with chroot I can grab the latest snapshots from CVS and build them without it affecting the version I have installed. So it wasn't a complete waste of time Thanks Again George