note 90478 deleted from install.unix.apache2 by googleguy

From: Date: Tue, 22 Oct 2013 12:15:06 +0000
Subject: note 90478 deleted from install.unix.apache2 by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197098@lists.php.net to get a copy of this message
Note Submitter: peep at imtarget dot identicloak dot com ---- Configuration notes for cent5.2, April 2009. ---------------------------------------------------- Note: I'll walk you through my steps, so you can do it custom yerself. It's possible that I am an idiot and there are much easier ways to do this. But this worked for me. Also , you could just use my configure script and yum command line and probably have it work okay. Scenario ---------- I'm setting this up for a fairly typical drupal install, with a mysql backend. I set up the dev server with the php package from the cent yum repo, and the customer ran Drupal with that for a while, but now wants a more current PHP than the cent package provides. my approach for determining required modules ------------------------------------ 1. get the list of the modules $ php -m | grep -v -e Modules] -e ^$ > php-default-modules 2. create the configure script $ for i in $(cat php-default-modules); do echo -n "--with-$i ">> phpconfigure.sh ;done 3. run the configure script, and iterate through the "Configure script errors" section below until it completes properly 4. at the end of the output, look for a notice of unknown options Notice: Following unknown configure options were used: --with-date --with-gum-disease Check './configure --help' for available options 5. as suggested, execute './configure --help' and correct the options. The "for" command above indiscriminately inserts "--with-" for all modules, but bundled modules may require "--enable-" instead, so mostly you'll be changing those. For modules that are enabled by default you'll need to remove the entry. 6. Add anything else you personally want or need. I like to add "--enable-safe-mode". I configured with the following command line: php-5.2.9]$ ./configure --with-mcrypt --with-mhash --with-bz2 --enable-calendar --with-curl --enable-dbase --enable-exif --enable-ftp --with-gd --with-gettext --with-gmp --with-iconv --enable-mbstring --with-mime_magic --with-mysql --with-mysqli --with-openssl --enable-pcntl --with-pdo_mysql --with-pdo_sqlite --with-pspell --enable-shmop --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-zlib --enable-safe-mode as such, i needed a number of packages installed. Now I haven't tracked additional packages over base--there may be required packages that I happened to have installed for other things. But this is a pretty good list, i reckon: php-5.2.9]$ sudo yum install mcrypt libmcrypt mhash libmhash libxml2-devel openssl-devel bzip2-devel curl-devel libjpeg-devel libpng-devel gmp-devel mysql-devel aspell-devel zlib zlib-devel Configure script errors -------------------------------------------- In my experience, these errors have been due (with any software, PHP included) mostly to missing development packages, which contain the libraries and headers needed to compile support for that library's function into the application. This becomes a process of: -executing the ./configure script and looking at the error -installing the devel package providing the resource referenced by the error (google using the error as search term as needed) -repeat until the ./configure script makes it through without error Upshot: identify the software referenced by the error, and install it. Example ----------- Example error: configure: error: Cannot find OpenSSL's <evp.h> Example explanation configure is looking for a header (and probably a lot of other stuff) from a missing openssl package. Example solution: php-5.2.9]$sudo yum install openssl-devel Compiling (and testing and submitting) ---------------------------------------------- with ./configure working, you're ready to compile. I think it's important to test and submit the tests to the developers, you do what you want. $ make;make test Installing ------------- $sudo make install (be sure you, heh, have the system php removed before you do this step. seriously) Best of luck!

« previous php.notes (#197098) next »