Categories
PHP

Symfony – does not have a registered handler / out of free disk space

Last night I started getting down time alerts from New Relic on our Symfony based Application. Our production server went down and while investigating PuTTY started giving me “Out of disk space” error

Out of disk space

An error similar to:-

PHP Warning: file_put_contents() : Only 0 of 36492 bytes written, possibly out of free disk space in /usr/lib/php/framework/symfony/lib/autoload/sfSimpleAutoload.class.php on line 165

Looking into message a little closer I found that the server had ran out of disk space so after making some space and using “symfony cc” to clear the cache i thought that this would have resolved the problem, however i continued to get below message “does not have a registered handler” being presented.

Fatal error: Uncaught exception ‘sfConfigurationException’ with message ‘Configuration file “/usr/lib/php/framework/symfony/config/config/settings.yml, /home/portal/www/site/apps/frontend/config/settings.yml” does not have a registered handler.”

After investigating closely I found the cache was not cleared properly even after running ‘symfony cc’.

Clear the Cache

At the end, i had to clear the cache manually with below command :-

rm -fr cache/*

For some reason this seemed to work fine where as the “symfony cc” command didn’t work therefore the only conclusion that I could come up with is that when the server ran out of disk space it corrupted something in the symfony cache which either is not normally cleared with a “symfony cc” and as a result i needed to remove it completely so symfony could re-build it automatically.

'Coz sharing is caring
Categories
Google

Import Web Data into Google Docs

I’ve been using Google Docs since long to create documents and spreadsheets but recently discovered that Google’s cloud-based Office suite provide us lot of other flexibilities.

A useful Google formula “ImportHTML” helps us to fetch tables and lists from an external web page into a Google Drive’s spreadsheet.

Create a spreadsheet inside Google Drive/Docs. Edit any of its cell to enter the formula/function as below.

=ImportHTML("http://en.wikipedia.org/wiki/List_of_Bollywood_films_of_2012", "table", 2)

Now come out of the cell and Google Docs will import the second table from the mentioned Wiki page into your sheet.

The 1st parameter of the function ImportHTML is nothing but the Target URL, 2nd parameter allows us to select which format of data we wish to import. This can be table (for tabular format), list (for ordered list) etc. The 3rd parameter says which index/number/position of the desired format data on the page that needs to be imported. If we put 4 instead of 2 in the third parameter of the above formula, then Docs API will import the forth table from the web page.

importHTMLThe beauty of these magical functions may help us in tracking web page changes. This may be utilized for tracking price fluctuations for a product on any eCommerce portal.

Google Docs is inbuilt with such amazing wonderful functions e.g.  ImportFeed, ImportHTML and ImportXML.

'Coz sharing is caring