PHP Packages Since 2.5
Starting with version 2.5, PHP is assembled into separate H-Sphere packages:
This package contains default php compilation: libphp.so, php, pear, phpize, etc. and default extenions: bcmath, bz2, curl, domxml, fileinfo, ftp, gd, gettext, gmp, iconv, imap, mcal, mcrypt, mhash, mnogosearch, mysql, odbc, pgsql, sockets, sqlite, swf, zip, zlib.
This one contains some additional extensions: calendar, dba, dbase, dbx, exif, filepro, mime_magic, ncurses, overload, pcntl, pcre, pdf, posix, pspell, session, shmop, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlrpc, xslt, yp.
Toggling PHP Versions
Both PHP 4 and 5 packages work as DSO Apache module and CLI utility. You can configure Apache to support whether PHP 4 or PHP 5, or both. The initial version is launched through DSO mechanism at Apache start. The other one can be started through cgi-exec mechanizm.
PHP versions can be toggled via the interface (by default, PHP 4 is enabled). Use E.Manager -> P. Servers menu, find the needed web-server and click the button near it:
Then choose the other version and click Submit:
This launches the script /hsphere/shared/apache/bin/usephp <version> which is included in the hsphere-apache package, where <version> is the targeted php version. If launched without specifying the version, the script activates the default php version. To see parameters of the script, run:
- makes changes in ~http/conf/httpd.conf with regard to running the needed libphpX.so module
- changes the <IfModule mod_phpX.c> directive in the ~httpd/conf/sites/*.conf
- changes ~httpd/conf/php.ini to link to the needed .ini file
Ldap support has been included to php-core, which is one of the reasons why horde may start to slow down when sending mail. It happens because horde is trying to connect to available ldap servers that are very slow by themserlves.
Another important peculiarity of the new PHP packages is support of pear. To view which packages from pear repository have been installed, run:
As for the PECL repository, 2 packages from it (Fileinfo and SQLite) have been included to PHP4 and one (Fileinfo) to PHP5. In PHP5, SQLite is supported from php-core.
Objects in PHP 5
PHP5 has undergone some principal changes in the way it works with objects. That is why some programs that work fine with PHP4 may not work with PHP5. To ensure PHP5 support, all third-party products included to H-Sphere have been updated to the latest available version.
PHP Test Page
New PHP packages have been assembled to perfectly fit mail web-interfaces, and horde in particular. This means that PHP test page can be obtained from http:/box_IP/horde/test.php. Here, pay attention to memory_limit value. We recommend that it is either -1 (disabled) or 8 MB.
Customizing php.ini configuration file
If you want to customize PHP config files for PHP 4 and PHP 5, please refer to Customizing Server Configuration Files By Means Of Templates.