For Course Delegates - a quick reminder of the crucial commands. The numbers alongside the commands are just the history numbers!
As your regular user:
1012 tar xzf bristol/php-5.2.5.tar.gz
1013 cd php-5.2.5/
1015 vi INSTALL
1027 ./configure --with-apxs2=/usr/local/httpd_2.2.10/bin/apxs --with-mysql=/usr/local/mysql
1028 make
1030 make test
Then as root:
1001 cd /home/trainee/php-5.2.5
1002 make install
1004 cp php.ini-dist /usr/local/lib/php.ini
1006 cd /usr/local/httpd_2.2.10/conf/
1007 vi httpd.conf
1008 cd ..
1009 ./bin/apachectl stop
1010 ./bin/apachectl start
In that vi ... add to end of httpd.conf:
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
To test ... add something like
It is the year <?php print(date("Y")) ; ?> !!
to an existing web page, change it to a .php, and check that it runs
Notes
a) Apache httpd needs to be built first and with --enable-so option (big catch this one if you have installed Apache hhtpd and simply followed the Apache httpd instructions!)
b) MySQL needs to be unpacked too, to provide header files
c) Directory names and release numbers are the ones I was using yesterday - they'll vary for your own systems of course!
(written 2008-12-12 00:27:07)
Associated topics are indexed under
H114 - Sourcing, installing and configuring PHP [2646] Compile but do not run PHP - syntax check only - (2010-02-22)
[2589] Your PHP code does not work? Here is where to start looking. - (2010-01-18)
[2433] Controlling, supressing, enabling PHP error messages - (2009-10-02)
[2317] How to make a Risotto (PHP build style) - (2009-08-02)
[1768] What is built in to this httpd and PHP? - (2008-08-23)
[1731] Apache httpd, MySQL, PHP - installation procedure - (2008-08-01)
[1688] cannot restore segment prot after reloc message - PHP / httpd - (2008-06-26)
[1667] Checking server performance for PHP generated pages - (2008-06-06)
[934] Clustering, load balancing, mod_rewrite and mod_proxy - (2006-11-21)
[481] PHP upgrade - traps to watch - (2005-10-31)
[316] Development Environments - (2005-05-19)
[192] Current MySQL and PHP paths and upgrades - (2005-01-28)
Some other Articles
URL rewriting with front and back serversmod_proxy_ajp and mod_proxy_balancer examplesPredictive Load Balancing - PHP and / or JavaGetting hold of the wrong end of the stickQuick Summary - PHP installationSummary of MySQL installation on a Linux systemLidl opens in MelkshamLearning to Program in CTraining Passports - booking a training programFrosty Morning, foggy evening