Php

If you're already familiar with NetBSD, this information may not be particulary new or useful to you. It's not particularly Atari-specific. I do however use this for my own reference when I install NetBSD/atari.

&lt;html&gt; &lt;head&gt; &lt;title&gt;Test&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;?php phpinfo; ?&gt; &lt;/body&gt; &lt;/html&gt;
 * 1) Make sure to run through the pkgsrc configuration described in the packages section.
 * 2) Make sure to have previously installed apache.
 * 3) The latest major version of PHP available via pkgsrc at the time of this writing is 5.3. But ap-php won't install this one by default. To fix that, in /etc/mk.conf, add:
 * 4) PHP_VERSION_DEFAULT=53
 * 5) PHP 5.3 currently fails to compile on the version of gcc included with NetBSD 5.x and even 6. To fix this, add the following to ~/pkgsrc/lang/php53/Makefile:
 * 6) CONFIGURE_ARGS+= --disable-fileinfo
 * 7) cd /usr/pkgsrc/www/ap-php
 * 8) sudo make install
 * 9) make test
 * 10) su to root.
 * 11) vi /usr/pkg/etc/httpd/httpd.conf
 * 12) At the end of the LoadModule list, add the following:
 * 13) LoadModule php5_module lib/httpd/mod_php5.so
 * 14) AddHandler application/x-httpd-php .php
 * 15) Save and exit vi.
 * 16) vi /usr/pkg/share/httpd/htdocs/test.php
 * 17) Add the following HTML:
 * 1) Save and exit vi.
 * 2) shutdown -r now, or stop/start apache as described below.
 * 3) Once apache is running, from a separate machine on the network, browse to /test.php http://[Atari]/test.php]. It should show a test page from php.

Notes:
 * To start or stop apache without rebooting, use:
 * sh /etc/rc.d/apache start
 * sh /etc/rc.d/apache stop