Usage of ServerGrove PHP Installation Print

  • 32

The ServerGrove VPSes come with a special installation of PHP that includes most common extensions. By creating this special installation we can ensure our customers that we provide the latest stable versions and that updating them is as easy as running the Centos or Ubuntu updater.

PHP is installed in /usr/local/php54, /usr/local/php53 and /usr/local/php52 for PHP 54, 5.3 and 5.2 respectively. This allow customers to have both versions installed at the same time in case they need it. Below replace php53 with the version you are using.

Paths

PHP binaries: /usr/local/php53/bin

php.ini: /usr/local/php53/lib/php.ini
PHP extensions: /usr/local/php53/lib/php/extensions/no-debug-non-zts-20090626
PHP extensios configuration files: /etc/php53/conf.d
your custom configuration file: /etc/php53/conf.d/zzz_custom.ini

We recomment that you add any custom PHP directives in a file named /etc/php53/conf.d/zzz_custom.ini. This will ensure your settings overwrite the defaults. Do not change php.ini or other conf.d files as we may overwrite these when upgrading PHP.

Upgrading PHP

To upgrade PHP, simple run the upgrade command in your server.

centos: 
yum upgrade

ubuntu:
apt-get update && apt-get upgrade

Extensions

If you need to add an extension, it is possible that it is already included in our repository. The name format will be php53-extension. To search for an extension run the following commands:

centos:
yum search php53-mongo
yum install php53-mongo

ubuntu: 
apt-cache search php53-mongo
apt-get install php53-mongo

If an extension is not in the repository, try installing it with pecl or contact us to see if we can add it to the repository. We welcome suggestions!


Was this answer helpful?

« Back