Skip to main content

PHP

spawn-fcgi

Posted in

spawn-fcgi allows you to run FastCGI separate from Lighttpd.

cd /extra/src
wget http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz
tar zxf spawn-fcgi-1.6.3
cd spawn-fcgi-1.6.3

Automatic Startup
FastCGI can be supervised by daemontools.
Assuming you have already installed daemontools, create the directories to hold the lighttpd run script, logging script, and config files:

cd /var/service
mkdir -m 1755 fast-cgi
cd fast-cgi

Create the run script (/var/service/fast-cgi/run), with the following:

Xcache

Posted in

XCache is a open-source opcode cacher, which means that it accelerates the performance of PHP on servers. It optimizes performance by removing the compilation time of PHP scripts by caching the compiled state of PHP scripts into the shm (RAM) and uses the compiled version straight from the RAM. This will increase the rate of page generation time by up to 5 times as it also optimizes many other aspects of php scripts and reduce server load.

Requirements
If phpize complains about being unable to find autoconf:

yum install autoconf

Installation with Lighttpd
Download the latest release of Xcache:

cd /extra/src
wget http://xcache.lighttpd.net/pub/Releases/1.3.2/xcache-1.3.2.tar.gz
tar zxf xcache-1.3.2.tar.gz
cd xcache-1.3.2

phpize
./configure --enable-xcache
make
make install

Copy the default configuration into your php.ini:

FastCGI

Posted in

FastCGI is a language independent, scalable, open extension to CGI that provides high performance and persistence without the limitations of server specific APIs.

Installation
Install fastcgi libraries:

cd /extra/src
wget http://www.fastcgi.com/dist/fcgi-current.tar.gz
tar zxf fcgi-2.4.0.tar.gz
cd fcgi-2.4.0
./configure
make
make install

Download the mod_fastcgi source:
cd /extra/src
wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz
tar zxf mod_fastcgi-current.tar.gz
cd mod_fastcgi-2.4.6
cp Makefile.AP2 Makefile
make
make install

PHP Configuration
In addition to any other directives, PHP needs to be configured with:

--enable-fastcgi \

PHP Accelerators

Posted in

Extension designed to boost the performance of software applications written using the PHP programming language. Most PHP accelerators work by caching the compiled bytecode of PHP scripts to avoid the overhead of parsing and compiling source code on each request (some or all of which may never even be executed).

Upload Progress Bar

Posted in

A PHP extension to track progress of a file upload.

yum install autoconf

Download the latest version of uploadprogress:
cd /extra/src
wget http://pecl.php.net/get/uploadprogress-1.0.1.tgz
tar
zvf uploadprogress-1.0.1.tgz
cd uploadprogress-1.0.1

Configure, build and install it:
phpize
./configure
make
make install

The output from make install should be something similar to:
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20060613/

eAccelerator

Posted in

eAccelerator is a free open-source PHP accelerator, optimizer, and dynamic content cache. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.

Installation

  1. Download the latest version:
    cd /extra/src
    wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2
    tar jxf eaccelerator-0.9.6.tar.bz2
    cd eaccelerator-0.9.6
  2. Prepare the source code for compiling as a PHP extension using phpize:, then configure, build and install it:
    phpize
    ./configure
    make
    make install
  3. Install it as a PHP extension in /usr/local/lib/php.ini:

    extension="eaccelerator.so"
    eaccelerator.shm_size="16"

PHP5 on Panther

Posted in

Special instructions for installing PHP5 on OS X 10.3

Apache

Posted in

Installation instructions for using PHP with the Apache web server.

Compiling and Installing
Configure PHP with the options you want. In this case, we'll be adding Apache

./configure \
--enable-mbstring \
--with-gd \
--with-gettext \
--with-apxs2=/usr/local/apache2/bin/apxs \

Configuration options:

  • MySQL support
    --with-mysql=/usr/local/mysql
  • LDAP support
    --with-ldap
  • Curl support (required by Drupal's Feeds module)
    --with-curl

    Probably need to install curl-devel package first though:

    yum install curl-devel

lighttpd

Posted in

Installing PHP with the lighttpd web server.

Compiling and Installing
At a minimum, for installing the lighttpd, PHP needs to be configured with these options:

./configure \
--enable-mbstring \
--with-gd \
--with-gettext

The --with-apxs2 and --with-apxs configuration options are not required. Add any other PHP options that you need.
MySQL, add:
--with-mysql=/usr/local/mysql

If you want to include LDAP support, add:
--with-ldap

If it configures correctly, make and install the binaries:
make
make install

PHP

Posted in

PHP (PHP: Hypertext Preprocessor) is a computer scripting language, originally designed for producing dynamic web pages. It is mainly used in server-side scripting, but can be used from a command line interface or in standalone graphical applications.

http://www.afp548.com/article.php?story=20041104230209410

Prerequisites

  • Linux
    yum -y install libxml2-devel libjpeg-devel libpng-devel gd-devel

    If you are going to install LDAP support (--with-ldap), you will likely need to install OpenLDAP development tools:
    yum -y install openldap-devel
  • Mac OS X 10.3 (Panther) - Special Instructions for making this work!

Download the Source

Syndicate content