Build Apache with DSO (Dynamic Shared Objects) enabled:
./configure --prefix=/where/you/want/apache --enable-module=so
Build and install Apache - before even unpacking PHP from its gzipped
tar file.
Build PHP using apxs from Apache (and Informix):
./configure --prefix=/where/you/want/php --with-informix --with-apxs=/where/you/want/apache/bin/apxs
You might decide you need to set --with-exec-bin=/where/you/want/php/bin
and/or --with-config-file-path=/where/you/want/php/lib (you specify the
directory that will contain php.ini).
Build and install PHP.
Manually copy php.ini-dist to /where/you/want/php/lib/php.ini and edit.
Reconfigure PHP to build a binary:
make clean ./configure --prefix=/where/you/want/php --with-informix --without-apache
Build and install that too.
Now you can configure Apache (edit /where/you/want/apache/conf/httpd.conf)
and go for it. If your system won't support Apache DSO, do yourself
a favour and upgrade to something that will!
--
Jonathan Leffler (jleffler@earthlink.net, jleffler@informix.com)
Guardian of DBD::Informix 1.00.PC1 -- see http://www.cpan.org/
#include <disclaimer.h>
Posted to news:computer.databases.informix by Data Goob
################################################################################ # A Really Good PHP Installation ################################################################################ # # PHP installations don't have to be painful, you just need to know what # some basic minimums are for most common installations. You can always # add more options on where things go, just add them to the final config. # This is a great guide for the impatient and short attention span people. # # This instruction set combines FreeTDS, Apache2, OpenSSL and PHP. Add # your own stuff before step 5, which is the PHP build. An explanation # of PHP config commands are at the end of this doc. You might want to # include OpenLDAP but this is not covered here. # # Locations of source for this build: # # Apache2 http://www.apache.org # OpenSSL http://www.openssl.org # FreeTDS http://www.freetds.org # unixODBC http://www.unixodbc.org # PHP http://www.php.net # # Optional but not covered here: # # OpenLDAP http://www.openldap.org # # # 1. Create a directory called 'build'. For example, /root/build # This is where you will build everything. When you are done you have a # directory of components to build PHP and Apache # # 2. Download latest FreeTDS to /root/build # cd /root/build # ./configure # make # make install # # 3. Download latest unixODBC to /root/build # cd /root/build # tar zxvf unixODBC-2.2.8.tar.gz # ./configure # make # make install # # 4. Download latest Apache2 to /root/build # cd /root/build # tar zxvf httpd-2.0.48.tar.gz # ./configure # make # make install # # 5. Download latest OpenSSL to /root/build # cd /root/build # tar zxvf openssl-0.9.6l.tar.gz # ./configure # make # make install # # 6. Download latest PHP to /root/build # cd /root/build # tar zxvf php-4.3.4.tar.gz # ./configure \ # --with-apache2=../httpd-2.0.48 \ # --with-apxs2=/usr/local/apache2/bin/apxs \ # --with-module=so \ # --with-zlib \ # --with-mysql \ # --with-openssl=/usr/local/ssl/ \ # --with-sybase=/usr/local \ # --with-bz2 \ # --with-flatfile \ # --with-zlib=/usr \ # --with-gd \ # --with-mcrypt \ # --with-informix # # 6b. You may need to add an environment variable before using configure. # For example, for SYBASE you might need to "export SYBASE=/usr/local" if you # have problems with FreeTDS being compiled in. For Informix you might need # to "export INFORMIXDIR=/opt/informix" or where-ever Informix is located so # that the configure and make steps will be able to find the appropriate # libraries. Your mileage may vary and you might need to set LD_LIBRARY_PATH # as well for some platforms. Do this on the command-line on your Linux box # BEFORE running configure, only if you need to. Use the "unset SYBASE" or # "unset INFORMIXDIR" if this causes problems. Re-run configure until you get # it right. # # 6c. Make PHP. This is done in two steps: # make # make install # # 7. Test PHP on the command-line # php -v # php -i # # 8. Edit Apache2 httpd.conf # Add the following if it isn't there already and make sure to give # your server a name. Add these lines to their appropriate sections. # # LoadModule php4_module modules/libphp4.so # DirectoryIndex index.html index.html.var index.php # AddType application/x-httpd-php .php # # 9. If you use MySQL and phpMyAdmin you might also want to add these # lines. Make sure to put the correct path to where phpMyAdmin is. # # Alias /phpMyAdmin "/srv/www/phpMyAdmin/" # Alias /phpMyAdmin/ "/srv/www/phpMyAdmin/" # ## Options Indexes +Includes FollowSymLinks ExecCGI MultiViews # AllowOverride None # Order allow,deny # Allow from all # # # 10. If you want a cgi-bin to worki uncomment: # # AddHandler cgi-script .cgi # # 11. If you want Server-Side-Includes to work uncomment these lines: # # AddType text/html .shtml # AddType text/html .html # AddOutputFilter INCLUDES .shtml # AddOutputFilter INCLUDES .html # # 12. Edit a php.ini file. Where does it go? PHP assumes a # /usr/local/lib/php.ini but you can change this. Here you can # change server-specific settings for your installation. To get # up and running quickly, copy a php.ini to /usr/local/lib and # later you can change this location. Any changes you make require # stopping and restarting Apache. # # 13. Start/Stop/Help Apache2 # # /usr/local/apache2/bin/apachectl start # /usr/local/apache2/bin/apachectl stop # /usr/local/apache2/bin/apachectl help # # ################################################################################ # # 14. Explanation of PHP configure # # ./configure \ # --with-apache2=../httpd-2.0.48 # --with-apxs2=/usr/local/apache2/bin/apxs # --with-module=so # # Assumes Apache2 build next to php build directory. You need to have # Apache compiled before you compile anything else. It does not need to # be running to build PHP with it. PHP "make install" will append to the # httpd.conf a Load directive. The INSTALL guide from PHP will tell you # what to add to httpd.conf to make PHP work. # # --with-mysql # PHP without MySQL, what are you nuts! # # --with-openssl=/usr/local/ssl/ # OpenSSL Encryption based on default install. This is practically # required for your system, and a great way to get SSH installed along # PHP. # # --with-sybase=/usr/local # FreeTDS - connect to MS-SQL-Server or Sybase. Why install it? # It makes connecting to SQL-Server quick and painless, comes with # tsql, and freebcp. Is also essential for many ODBC drivers. # # --with-bz2 # bzip2 /bunzip2 support # The highest compression utility available. Optional and won't cause # problems. # # --with-flatfile # Flatfile support. # # --with-zlib=/usr # Zlib compression, useful and may be needed for other PHP stuff, and # won't cause problems. # # --with-gd # GD Graphics Library support, essential for a lot of PHP tools. # # --with-mcrypt # Encryption support essential for Md5 and a great way to encrypt # data. Make sure your system can compile with this, if not, remove # from configure command. # ################################################################################ # # 15. Informix support # # Add --with-informix to ./configure # # make # make install # # Make changes to /usr/local/lib/php.ini for Informix # # Restart Apache # # Test Settings # ################################################################################
To discuss how Oninit ® can assist please call on +1-913-674-0360 or alternatively just send an email specifying your requirements.