This page is a guide to creating and deploying scripts and applications developed in the PHP programming language on Shared Accelerators.
If you’re new to PHP, or want a general introduction to developing and deploying PHP scripts and applications, start off by reading the PHP Overview in the All Accelerators Knowledge Base.
We provide PHP 5.2.x by default. The command line version is at /usr/local/bin/php. The FastCGI version that is used to provide PHP for your virtual servers is at /usr/local/bin/php5-cgi.
PHP 5.2.6 (cli) (built: Jun 16 2008 12:18:20)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies
PHP 4.4.x is also available, but without a command line version. The CGI/FastCGI binary is at /usr/local/bin/php4-cgi.
PHP 4.4.7 (cgi-fcgi) (built: Aug 4 2007 14:54:13) Copyright (c) 1997-2007 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
The most popular PHP extensions are loaded with each version by default. You can enable/disable any of these by editing the php.ini file that is present in the etc/php5 or etc/php4 directories on each of your virtual servers.
| Default | Optional | |
|---|---|---|
| PHP5 | ctype, date, filter, gd, hash, iconv, libxml, mbstring, mcrypt, mysql, mysqli, openssl, pcre, Reflection, session, SimpleXML, SPL, standard, tokenizer, xml, xmlreader, xmlwriter, Zend Optimizer | apc, bcmath, bz2, calendar, curl, dba, dbase, dbx, dom, dtrace, eaccelerator, exif, fileinfo, ftp, gettext, gmp, http, imap, json, ldap, mhash, mssql, pcntl, pdf, pdo, pdo_dblib, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, posix, pspell, radius, shmop, snmp, soap, sockets, sqlite, suhosin, sysvsem, sysvshm, tidy, wddx, xmlrpc, xsl, zip, zlib |
| PHP4 | ctype, gd, iconv, mbstring, mcrypt, mysql, openssl, overload, pcre, session, standard, tokenizer, xml | apc, bcmath, bz2, calendar, curl, dba, dbase, dbx, eaccelerator, exif, filepro, ftp, gettext, gmp, ldap, mhash, mssql, pcntl, pdf, pgsql, posix, shmop, sockets, sysvsem, sysvshm, wddx, xmlrpc, zip, zlib |
What it boils down to, is that if you want to use advanced caching features for PHP (e.g. memcache, APC, eAccelerator etc.) that involve any kind of shared memory at all, you’re looking for dedicated hosting (e.g. a standard Accelerator). All caching helpers were typically designed with mod_php in mind (which we don’t provide on shared hosting for several good reasons), and while some of them claim to work fine with FastCGI (like eAccelerator), you only get part of the fun, and not the shared memory. Either you ‘share’ the server with others, or you get a dedicated host and then can ‘share’ the memory amongst your processes and applications.
This is a simple overview of turning an extension on or off. For more on modifying your configuration, see PHP configuration.
pkill php.