Cloud9 IDE: PHP, Composer.json & SVN

25 November 2013

If like me you use composer for your dependency management in PHP then there were a few things I needed to do to get things working. Cloud9 IDE will not automatically fetch your dependencies so this is something you need to do via the terminal window.

Download Composer.phar

I don't version composer.phar in my git repo; instead; I use a script to fetch the latest composer.phar from the web using curl.

If like me you need to get it then you can type the following command in the Cloud 9 terminal.

curl -sS https://getcomposer.org/installer | php
php composer.phar install

SVN Client

My next challenge: Package could not be downloaded, sh: svn: command not found

Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing slim/slim (1.6.5)
    Downloading: 100%         

  - Installing smarty/smarty (v3.1.11)
    Checking out /tags/v3.1.11/@4636



  [RuntimeException]                                           
  Package could not be downloaded, sh: svn: command not found  

My composer.json is referencing smarty that is available over svn.

An svn client needs to be installed.

nada-nix install subversion-1.7.9

Apache Log Files

Typical, my application encountered an error during runtime; so I started to dig through the log files.

cat ../lib/httpd/logs/error_log

My error was pointing to an invalid .htaccess file.

Hope you can solve yours Winking smile.