All posts tagged php

PHP fatal error when installing or updating dependencies with Composer

When installing or updating dependencies with Composer it may be possible that you see a PHP fatal error like:

This problem has been documented in Composer on issue This is common when the memory limit setting of PHP is not enough for Composer needs, something that can happen . . . Read more

How do I install / upgrade PHP using YUM and RPM packages?

ServerGrove provides a Yum repository with the latest PHP versions packages in RPM. This makes dead simple to install and upgrade PHP. Follow these steps to setup the repository in your server and install / upgrade PHP: Setup ServerGrove repository If you have not installed the repository, download the RPM . . . Read more

How do I fix downgraded / broken PHP after installing RPM packages?

PHP should not be installed via yum/rpm in CentOS as the version distributed is very old. To fix it follow these steps:

Replace 5.2.11 with the version in your system. These steps will re-install the custom PHP installation in your VPS. If you have any doubts, feel free to . . . Read more

How to change PHP configuration settings for a VPS

You can overwrite PHP settings in your PHP installation by creating a custom configuration file that is read by PHP, named zzz_custom.ini. This guarantees that your changes will not be removed by upgrades to the PHP installation and ensures that your changes will overwrite other values loaded by default. Inside . . . Read more

How do I install a PHP extension?

The most commonly used extensions are available in our Centos and Ubuntu repositories. To install an extension in Centos, follow these steps: $ yum install php53-soap In Ubuntu: $ apt-get install php53-soap Replace php53 with php54 for PHP 5.4 Other extensions may be installed with PECL. pecl download memcache tar . . . Read more

How to use PHP Swift mail library

We have added this library to all our servers, so now you can use it without having to upload it to the server. Here are the steps to use it: The library is located in /usr/local/php/Swift and it will kept up to date with new releases. require_once "Swift/lib/Swift.php"; require_once "Swift/lib/Swift/Connection/NativeMail.php"; . . . Read more

How do I set the timezone for my PHP application?

In order to make your PHP application (including Symfony and Zend Framework) aware of your time zone, set the date.timezone php configuration variable in a .htaccess file, like this: Inside an .htaccess file:

From Plesk, you can create and edit this file from the File Manager located inside your . . . Read more