Pagodabox, Laravel & Composer

I have been searching for cloud php hosting with good laravel support for testing purposes. The best option I found was FortRabbit that I absolutely fell in love with. However, they have this timer thingy after which app would freeze if timer was not reset. But the real issue was not freezing but unfreezing because unfreezing the app often caused the servers to change & I had to modify my git remotes, ssh & mysql hosts accordingly.

Moving on I came across OpenShift which was quite good although not as great as FortRabbit. However, I struggled fiercely with deploying my local laravel installation to it. After, couple of days of Googling & trying I decided to move on to Pagodabox free account.

Unfortunately, setting up laravel here wasn’t that easy either. Although, they offered a quick-start laravel installation (that worked like a charm), I couldn’t get my local deployment to work online that easily. However, I was able to deploy my installation after hit & trials in two days. I’ll enumerate the steps for the deployment process quickly below.

Create laravel quick start app

Start by creating the laravel quick-start app provided by pagodabox. This should get all your basics covered including database, cache & other required Pagodabox processes.

Clone repository

Clone the Pagodabox repository to your local machine. Remember to add SSH public keys to your pagoda account before you do that or you won’t be able to access the repositories.

Move local installation into new repo

After successful clone, note down the database information in database.php file inside app/config folder. Then delete all files inside repo except the .git folder and the two Boxfile & Boxfile.installer files. Then move your local laravel installation files inside the repo, of course, except the vendor folder.

Also, edit your application’s composer.json file to set minimum-stability to ‘stable’. [Suggested to prevent a possible error]

Modify Boxfile

The pagodabox doesn’t come pre-packaged with composer as does FortRabbit. The Boxfile inside Laravel quick-start app includes required code to download Composer & then run Composer Install.

However, in my app, the default Boxfile setup resulted in a few errors.

- the requested PHP extension curl is missing from your system
- Aborting - Composer would abort with No Obvious reason.
- Class 'Monolog\Logger' not found

To fix the curl issue, we need to add curl as a required extension in Boxfile file.

    - curl

The composer abort [due to timeout] results in a corrupt push that cannot be deployed on Pagodabox. The reason for this timeout is that the new version of Composer uses GitHub Api for downloading all the dependencies. And if your dependencies are large in number, the GitHub Api limit is reached & Composer times out resulting in abort.

The solution is to modify Boxfile to download an older version of composer and use –prefer-install flag.

Also, to fix the Monolog\Logger issue, we need to update the composer & do optimized dump-autoload before running composer install.

The after_build: part of Boxfile after the above suggested changes looks something like

 - "if [ ! -f composer.phar ]; then curl -s | php -- --version=1.0.0-alpha7; fi; php composer.phar self-update; php composer.phar dump-autoload -o; php composer.phar install --prefer-source; "

Commit & Push

Now commit your code & push to origin. Everything should work fine & application should be deployed to server properly.

P.S. This blog is hosted at OpenShift :)

Google & Future [TED 2014]

To quote Mr. Page from TED 2014 appearance.

“The main thing that has caused companies to fail, in my view, is that they missed the future,”

One thing is for sure, the PCs are going to relegate & become more specialized devices contrary to their previous status of general computing devices & mobile devices will become ever more ubiquitous & computationally intensive. In fact they have been sold more in number than PCs. [the post was made on feb 2011, imagine now]

I guess Google ‘has‘ seen this future & has seen itself struggling in the Post-PC era as Facebook share of Mobile Ads Revenue soars & Google’s Mobile slump continues. Although, Google still dominates the mobile revenue, however, it’s not like the PC days when AdSense had no competitor. Today, facebook, twitter & other mobile ads companies are growing faster & posing a serious threat to its Ads stream.

Apparently, Google appears to be in a frenzy. With all the moonshots & other acquisitions, Google is desperate to diversify its revenue stream. However, be it Chrome OS, Chrome Cast, Project Glass, Android [to no avail] or Android Wear, the revenue just isn’t diversifying as they would like to.

iOS 7.1 & Enterprise Distribution

With the release of iOS 7.1, we have seen all our current enterprise apps fail their installation via our custom portal with error

cannot validate certificate from ‘xyz’

As it turns out, with iOS 7.1, Apple has made mandatory the use of ‘https’ for the download url of the application. The standard URL is usually like


The fix was to use https instead of http in the above bold url.

teamwork, a perfect metaphor

Steve Jobs on Teamwork

[external link]

And I came back the next day, and we opened the can. And we took out these amazingly beautiful polished rocks. The same common stones that had gone in, through rubbing against each other like this (clapping his hands), creating a little bit of friction, creating a little bit of noise, had come out these beautiful polished rocks.

Simply amazing and exactly how we work here at Criklé. There has not been a single discussion over QuranApp that did not ‘almost’ turn into fight.

Discussion over ideas/features, apparently uncomplicated, begin smooth, but soon the difference of opinion leads to serious friction. Ideas that start seemingly simple, start to turn into long heated discussions.

The aspect and perception of ideas is very diverse amongsts us. We are poles apart at analyzing same things resulting in highly varied perspective and opinions.

And just like the stones, as Steve puts it, the ideas that go into the discussion with great deal of friction, come out refined to a form never envisioned before.

© 2014 tee noise

Theme by Anders NorenUp ↑