If you want to upgrade PHP or install a new extension in your VPS, follow these steps:
- Go to /usr/src/
- If the source of PHP is already here go into the directory (ie. php-5.3.9), otherwise download the tarball and uncompress it here
- grab the current configure command by executing php -i | grep configure
- run the configure command. If you need to add a new extension, add the new extension to the end of the configure line with the existing extensions:Â
'./configure'Â '--with-apxs2=/usr/sbin/apxs' '--with-gd' '--with-pdo-mysql' '--with-curl' '--with-mysql' '--with-freetype-dir=/usr' '--with-jpeg-dir=/usr' '--with-mcrypt' '--with-zlib' '--enable-mbstring' '--enable-ftp' '--with-openssl' - run make
- run make install
- restart apache by running service httpd restart