What is PHP

PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
source: www.php.net

Download

Pre-compiled PHP for Mac OS X

visit: http://www.entropy.ch/software/macosx/php/

Installation on Mac OS X Client

The following instructions will help you install a PHP module for the Apache web server included in MacOS X. This version includes support for the MySQL and PostgreSQL databases. These instructions are graciously provided by Marc Liyanage.
  1. Open a terminal window.
  2. Type wget http://www.diax.ch/users/liyanage/software/macosx/libphp4.so.gz, wait for the download to finish.
  3. Type gunzip libphp4.so.gz.
  4. Type sudo apxs -i -a -n php4 libphp4.so
  5. Now type sudo open -a TextEdit /etc/httpd/httpd.conf.
    TextEdit will open with the web server configuration file. Locate these two lines towards the end of the file: (Use the Find command)
    Remove the two hash marks (#), then save the file and quit TextEdit.
#AddType application/x-httpd-php .php #AddType application/x-httpd-php-source .phps
  1. Finally, type sudo apachectl graceful to restart the web server.

Compiling for OS X Server

  1. Get the latest distributions of Apache and PHP.
  2. Untar them, and run the configure program on Apache like so.
./configure --exec-prefix=/usr \ --localstatedir=/var \ --mandir=/usr/share/man \ --libexecdir=/System/Library/Apache/Modules \ --iconsdir=/System/Library/Apache/Icons \ --includedir=/System/Library/Frameworks/Apache.framework/Versions/1.3/Headers \ --enable-shared=max \ --enable-module=most \ --target=apache
  1. If you want the compiler to do some optimization, you may also want to add this line:
setenv OPTIM=-O2
  1. Next, go to the PHP 4 source directory and configure it.
./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/share/man \ --with-xml \ --with-apache=/src/apache_1.3.12
  1. Type make and make install. This will add a directory to your Apache source directory under src/modules/php4.
  2. Now, reconfigure Apache to build in PHP 4.
./configure --exec-prefix=/usr \ --localstatedir=/var \ --mandir=/usr/share/man \ --libexecdir=/System/Library/Apache/Modules \ --iconsdir=/System/Library/Apache/Icons \ --includedir=/System/Library/Frameworks/Apache.framework/Versions/1.3/Headers \ --enable-shared=max \ --enable-module=most \ --target=apache \ --activate-module=src/modules/php4/libphp4.a
  1. Copy and rename the php.ini-dist file to your bin directory from your PHP 4 source directory: cp php.ini-dist /usr/local/bin/php.ini or (if your don't have a local directory) cp php.ini-dist /usr/bin/php.ini.

reDesigned by cEngLip

Sign my Guestbook from Bravenet.com Get your Free Guestbook from Bravenet.com
Hosted by www.Geocities.ws

1