Notes on OpenSolaris: Using PHP on Sparc in 64 bit Mode on SXCE

Sun ships an integrated web stack with SXCE (Solaris Express Community Edition), unfortunately, PHP is disabled when operated in 64 bit mode. By adding the following to /etc/apache2/2.2/conf.d/php5.2.conf you can enable PHP via CGI.

<IfModule !mod_php5.c>
ScriptAlias /php /usr/php/bin
AddHandler application/x-httpd-php5 php
Action application/x-httpd-php5 /php/php-cgi

<Directory /usr/php/bin >
    Options ExecCGI FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>

DirectoryIndex index.php
DirectoryIndex index.php5
</IfModule>

Don't forget to execute the command:

/usr/sbin/svcadm refresh svc:/network/http:apache22
to read the config file

NOTE: by default OpenSolaris requires:

<?php
You need to set short_open_tag = On in the php.ini file (/etc/php/5.2/php.ini) to get it to accept
<?


Back to Notes on OpenSolaris or Maurice Castro's Home Page