Bizhosting providing website hosting , domain name registration , web development , web design , email setup , tech support

How do I install a newer version of php? (or any other interpreter)

You will have to compile your own php and change the script wrappers to use it instead

For this you will need SSH access enabled on your account, just Contact Us and we will enable it for you (there may be a charge or change of plan needed)

You can either follow the steps listed here,

  1. SSH in as your site admin user
  2. Download and untar php with something like GET http://au2.php.net/get/php-5.2.6.tar.gz/from/us2.php.net/mirror > php-5.2.6.tar.gz
  3. You can simply Use php-configure to configure php and then skip to the last step, or run ./configure with all the options you require ./configure --with-options ...
  4. Then run make make make test # optional, but reassuring make install
  5. Now that we have a bundle of compiled php binaries, we just need to set up the webserver to use them, Ensim provides a set of wrappers so we can easily change interpreters.

    We just need to edit php-script in /var/www/interpreters/ to have it use your new php binary instead of the site wide one just replace /usr/bin/php with the path to the php-cgi you have just built (by default /home/you/php-cgi/bin/php-cgi)

You should be able to see via phpinfo() that your php scripts are now being run with your new php binary

How do I use php-configure to configure php?

If you're not sure which options to use, you can start from this php-configure script, which you download into the unpacked php directory (in the same location as configure) and run with sh php-configure it will configure and compile a php for you.

if you want to install somewhere else simply replace INSTALL_TO=`echo ~/php5-cgi/` , with INSTALL_TO=/some/other/path

Please note that it may not have some of the options your application needs, you can add them to the list by editing the script...