Search code examples
phpzend-framework2composer-phpphp-5.2phar

How to use PHP Composer on HostGator


I recently decided to start a project in Zend Framework 2 and was having trouble getting it to run on a HostGator shared server.

By default, HostGator's shared servers run in PHP 5.2.2 and if you upload the ZF2 Skeleton Application, it will not run out of the box.

Also, if you happen to have SSH access to your HG Shared account (You usually have to request it), you won't be able to run .PHAR files because the CLI version of PHP is also 5.2.2.

Luckily, I got it to work... see below.


Solution

  • There is an option in Hostgator CPanel. Just go to PHP Configuration and choose one of PHP versions. Now you can choose between 5.2, 5.3, 5.4 and 5.5.