circle.ch weblog / wiki

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

Configuration of PHP:
./configure \
--enable-force-cgi-redirect \
--prefix=/usr/local/php5-cgi \
--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/ \
--with-mysql=/usr/local/mysql/ \
--enable-debug \
--with-config-file-path=/usr/local/php5-cgi/ \
--with-config-file=/usr/local/php5-cgi/php.ini

Configurations of httd.conf for Apache2
Listen 86
<VirtualHost _default_:86>
    ServerName localhost
    
    ScriptAlias /php5 /usr/local/php5-cgi/bin/
    <Directory /usr/local/php5-cgi/bin/>
        Options +ExecCGI +FollowSymLinks
        AllowOverride None
    </Directory>
	
    DocumentRoot /Library/Webserver/Documents/project-a
    <Directory /Library/Webserver/Documents/project-a>
	DirectoryIndex index.php
        Options Includes Indexes FollowSymLinks MultiViews
        AllowOverride None Options FileInfo
        Action php5-cgi /php5/php
        AddHandler php5-cgi .php .php5
    </Directory>

    ErrorLog logs/default-error_log
    CustomLog logs/default-access_log combined
</VirtualHost>

<VirtualHost *>
    LoadModule php4_module modules/libphp4.so
    AddType application/x-httpd-php .php 
    AddType application/x-httpd-php-source .phps
    DocumentRoot /Library/Webserver/
    <Directory /Library/Webserver/>
	DirectoryIndex index.php
        Options Includes Indexes FollowSymLinks MultiViews
        AllowOverride None Options FileInfo
    </Directory>
</VirtualHost>