Hi...I have the 2nd edition of your excellent book, and have tried to install everything, but PHP does not appear to be working. It's on a Debian/Sarge system. Here is what I've done:
- Installed MySQL 4.1 from tarball. That was successful, can log in at command prompt and do basic DB manipulation.
- Installed Apache2 via apt-get. Also installed apache2-dev as instructed in book.
- Compiled PHP 5 from source following book instructions. In order to make this work I had to install flex, xml2, xml2-dev, gcc and make, all of which I did via apt-get.
Then, still following instructions, I moved php.ini-dist and php.ini-recommended to /usr/local/php/lib and copied php.ini-dist to just plain php.ini
I added in values for doc_root and extension_dir as follows:
doc_root = /var/www
(I also tried /var/www/apache2-default, but still no luck)
extension_dir = "/usr/local/php"
And in the apache2-config file, I changed the DirectoryIndex line to include index.php index.php3 and index.phtml
And added the following two lines to the end:
AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps
That's all, then I made the sample web page from the book (today.php), and tried to load it from another machine on my network...but it wanted to download the PHP file, which I suppose means the server never tried to render it but just passed it through.
The URL for the PHP file is:
Any suggestions?? I feel like I'm almost there...at least, I hope so!! Can't wait to get cracking on the exercises in the book!