circle.ch weblog / wiki

A weblog about open source development, law, technology, politics and the like.

Older Newer
Tue, 05 Dec 2006 07:00:09 . . . . 80-219-135-190.dclient.hispeed.ch


Changes by last author:

Added:
Various:
* PHP 5 CGI per-virtual-host in parallel with PHP 4 module
** Installation/PHP5-CGI
* http://ch2.php.net/get/php-5.0.0b4.tar.gz/from/this/mirror
* http://www.faqts.com/knowledge_base/view.phtml/aid/22154/fid/1150
Tricks:
* http://www.schlitt.info/applications/blog/archives/83_How_to_run_PHP4_and_PHP_5_parallel.html
* http://rayh.co.uk/archives/13_PHP5__PHP4_side_by_side.html
*http://wiki.coggeshall.org/Main/RunningPHP4AndPHP5Concurrently
* http://seric.cowiki.org/17.html
* http://laughingmeme.org/archives/001787.html
*http://ch.php.net/manual/en/install.macosx.php
* http://developer.apple.com/internet/opensource/php.html
* http://www.icitrus.net/art:1Apache2PHP-20041106
PHP4 Installation
*http://www.onlamp.com/lpt/a/3094
PHP5 Installation - Linux
* http://shimon.phpwebhosting.com/howto/index.php/installphp5/
Compatibility:
* http://www.zend.com/lists/php-dev/200311/msg00598.html
* http://www.moztips.com/php5_install/
Made for PHP5:
* http://www.cowiki.org
* http://sourceforge.net/projects/sqlite-admin/
Works with PHP5:
* http://tavi.sf.net
* http://wordpress.org
=== PHP4 Apache module and PHP5 CGI in parallel on Windows ===
<code>
Listen 83
<Virtualhost _default_:83>
ServerName? localhost
ServerAdmin? me@localhost
DirectoryIndex? index.html index.php
ErrorLog? logs/error.log
<Location />
<Limit CONNECT>
Order allow,deny
Allow from all
</Limit>
</Location>
DocumentRoot? "C:/www/project-a/"
ScriptAlias? /cgi-bin/ "C:/php5/"
Action php5-script /cgi-bin/php-cgi.exe
AddHandler? php5-script .php .html
</Virtualhost>
</code>
=== PHP4 Apache module and PHP5 CGI in parallel on OS X ===
This section is not yet done...
<code>
#:/usr/local/php5 urs$ php5 -f go-pear.php
#:/usr/local/php5 urs$ which pear
#:/usr/local/php5 urs$ echo 'PATH=$PATH:/usr/local/php5/bin' >> ~/.bash_profile
#:/usr/local/php5 urs$ source ~/.bash_profile
#:/usr/local/php5 urs$ pear
Segmentation fault
</code>
:Well, not yet perfect... -- UrsGehrig

* http://www.macdevcenter.com/lpt/a/3133
=== Install Apache2, PHP and MySQL on OS X (10.3) ===
You will find here some notes and tips to compile PHP5 on OS X. Credits go to chregu at biflux.ch who helped me out especially with the PHP5 configure setting. -- UrsGehrig

*http://www10.brinkster.com/ssruprai/comphp.asp
*http://dan.drydog.com/apache2php.html
*http://harvey.nu/linux_macosx_hints_etc.html
*http://forums.serverlogistics.com/viewtopic.php?t=97

Binaries and Libraries:
sudo apt-get install libjpeg libpng libxml2 mysql


wget ftp://ftp.apache.de/mirrors/dev.apache.org/dist/httpd/httpd-2.0.48.tar.gz
Apache2 configure:
./configure \
--enable-module=so \
--enable-module=rewrite \
--enable-dav \
--enable-dav-fs


wget http://ch.php.net/get/php-5.0.0b4.tar.gz/from/this/mirror
PHP5 configure:
./configure \
--disable-cgi \
--disable-pdo \
--prefix=/usr/local/php5 \
--with-zlib \
--with-iconv=/sw/ \
--without-bundle-libxml \
--with-dom=/sw/ \
--with-libxml-dir=/sw/ \
--with-xsl=/sw/ \
--disable-pear \
--with-gd \
--with-freetype-dir=/sw/lib/freetype2/ \
--with-jpeg-dir=/sw/ \
--with-png-dir=/sw/ \
--enable-sockets \
--enable-pcntl \
--enable-shmop \
--enable-sysvshm \
--enable-sysvsem \
--with-mysql=/usr/local/mysql/ \
--enable-debug \
--with-apxs2=/usr/local/apache2/bin/apxs

If the above configure does not work because some libraries are missing, then apply something like the following:
rm ./config.cache before you apply another ./configure

me:/tmp/php-5.0.0b4 urs$ make
me:/tmp/php-5.0.0b4 urs$ sudo make install
Password:
Installing PHP SAPI module: apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libs/libphp5.so /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libs/libphp5.so /usr/local/apache2/modules/
cp libs/libphp5.so /usr/local/apache2/modules/libphp5.so
Warning! dlname not found in /usr/local/apache2/modules/libphp5.so.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache2/modules/libphp5.so
[activating module `php5' in /usr/local/apache2/conf/httpd.conf]
Installing PHP CLI binary: /usr/local/php5/bin/
Installing PHP CLI man page: /usr/local/php5/man/man1/
Installing build environment: /usr/local/php5/lib/php/build/
Installing header files: /usr/local/php5/include/php/
Installing helper programs: /usr/local/php5/bin/
program: phpize
program: php-config
program: phpextdist
me:/tmp/php-5.0.0b4 urs$

me:/usr/sbin urs$ sudo ln -s /usr/local/php5/bin/php php5
Password:

me:/usr/sbin urs$ php5 -v
PHP 5.0.0b4 (cli) (built: Mar 6 2004 15:48:06) (DEBUG)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.0-dev, Copyright (c) 1998-2004 Zend Technologies

=== Comments: ===
* Acutally Freetype support using --with-freetype-dir=/sw/ did not work, even though all libraries were there. -- UrsGehrig
* Found the solution for the freetype2 problem in http://www.oreillynet.com/cs/user/view/cs_msg/31315; just specify --with-freetype-dir=/sw/lib/freetype2/ for a fink installation or with Apple's X11 --with-freetype-dir=/usr/X11R6 -- UrsGehrig