====== PHP on Accelerators ====== This page is a guide to creating and deploying scripts and applications developed in the PHP programming language on Accelerators. **PHP Overview** If you're new to PHP, or want a general introduction to developing and deploying PHP scripts and applications, start off by reading the **[[all-accelerators:kb:php|PHP Overview]]** in the [[all-accelerators:kb:start|All Accelerators Knowledge Base]]. ===== Extensions enabled ==== ==== Finding which extensions are enabled ==== Below is a list of the php extensions enabled by default on the pkgsrc template. admin$ php -m [PHP Modules] ctype curl date dom filter gd hash iconv json libxml mbstring mcrypt mysql openssl pcre Reflection session SimpleXML SPL standard tokenizer xml xmlreader xmlrpc xmlwriter xsl zlib [Zend Modules] Extensions have their .so files located under '/opt/local/lib/php/20040412'. ==== Enabling a PHP extension ==== If an extension is not enabled one can take a look at your accelerators php.ini file (pkgsrc accelerators this in /opt/local/etc/php.ini) and find the line like ';extension=apc.so' and remove the ; infront of the line to enable apc, save the file and restart apache via 'sudo svcadm restart http'. ===== Version ===== ==== Finding the PHP version ==== admin$ php -v PHP 5.2.5 (cli) (built: Apr 25 2008 08:27:42) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies