What to do if you have PHP already installed and you need a new extension?

From: Date: Fri, 11 Apr 2003 14:18:35 +0000
Subject: What to do if you have PHP already installed and you need a new extension?
Groups: php.install 
Request: Send a blank email to php-install+get-10580@lists.php.net to get a copy of this message
Hi, I have a quick question that probably would need a more detailed answer. Currently, I am running SuSE Linux Enterprise Server (SLES 7) with the Apache 1.3.24 and PHP 4.1.1 installed (all by RPM's I imagine). I'm trying to install the OCI8 extension to work with and instance of Oracle I have running on the same server. Someone in an Oracle group suggested compiling the PHP extension by doing the following: "Just compile the Oracle extension for PHP, see the description below. If you have an existing PHP installation and you just want to add a new extension there is no need to recompile PHP. You can build just the one extension you need. Go and grap the PHP source that matches your installed version, unpack it and copy the extension you want to compile from [your_php_src/ext/your_extension] to somewhere outside the PHP src tree. Move into the directory of the extension and run phpize: #> phpize It might be that you need to run aclocal afterwards: #> aclocal Run configure: #> ./configure \ --with-php-config=/usr/bin/php-config \ --with-ftp=shared The configure script is now running, once it has finished without errors run make: #> make Once make has finished the script tells you where to find the shared extension, usually [your_php_src/ext/your_extension/modules] To use this module you need to copy it to the extensions directory specified in [php.ini] and activate it." Needless to say this didn't work by giving me errors on everything. When I did 'phpize', I got the following error: '/usr/bin/phpize: aclocal: command not found configure.in:43: error: possibly undefined macro: AC_PROG_LIBTOOL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autoheader: `config.h.in' is unchanged You should add the contents of `/usr/share/aclocal/libtool.m4' to `aclocal.m4'. I tried the ./configure piece and got: checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking whether gcc and cc understand -c and -o together... yes checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/TSRM checking for PHP extension directory... /usr/lib/20010901-zts ./configure: line 2135: syntax error near unexpected token `PHP_ARG_WITH(oci8,' ./configure: line 2135: `PHP_ARG_WITH(oci8, for Oracle-OCI8 support,' What am I doing wrong? Any help would be greatly appreciated! :) Best Regards, Jason Novak

« previous php.install (#10580) next »