Sun Web Server and php
I don't know why am I even documenting this. Like most of the sun software, Sun Web Server is rubbish. Much of this is from a chinese site - http://www.leftworld.net/wenzhang/show/628.htmlDownload and install
Download http://www.sun.com/download/products.xml?id=3f4f998d and then run setupInstall mysql
To build php with mysql support, one needs to first install mysql. Check whether your sun web server is 32bit. Why does Sun distributes 32-bit software on 64-bit sparc? Because it's rubbish.> file /opt/SUNWwbsvr/bin/https/bin/webservd /opt/SUNWwbsvr/bin/https/bin/webservd: ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped, no debugging information available
In order to build php with mysql support, install 32bit mysql from www.mysql.com. I use the pkdadd version, which installs the software under /opt/mysql
Build php
Very similar to linux, one downloads php from php.net, extract it, configure and make. The config options I used are:./configure --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d \ --with-nsapi=/opt/SUNWwbsvr --with-mysql=/usr/local/mysql \ --prefix=/usr/local --enable-mbstring make make install cp php.ini-dist /etc/php.ini
Install php module
From the php source directory:cp ./libs/libphp5.so /opt/SUNWwbsvr/bin/
Now go to your site and then edit the following files:
Edit obj.conf
Under <Object name="default">, addService fn="php5_execute" type="magnus-internal/x-httpd-php"
At the end, add
<Object name="x-httpd-php"> ObjectType fn="force-type" type="magnus-internal/x-httpd-php" Service fn="php5_execute" </Object>
Edit magnus.conf
At the end, addInit fn="load-modules" funcs="php4_init,php4_execute,php4_auth_trans" shlib="/opt/SUNWwbsvr/bin/libphp4.so" Init fn="php4_init" errorString="Failed to initialize PHP!"
Edit mime.types
Addtype=magnus-internal/x-httpd-php exts=php,php5
Restart web server
cd /opt/SUNwbsvr/https-mysite./restart