Category: PHP

This is a quick code example on how to extend the Symfony security extension in your bundle so you could have rules on the controller’s class as annotation and also inherit those and merge with the action method annotations. It's …

Symfony security annotation on controller class and inherited action method Read More »

Tagged with: , , ,

I was playing with PHP the other day and was trying to fetch and rename 1000s of files I have stored locally on my machine. Seemingly PHP isn’t the best language to that operation Python or even BASH could do …

Get All Files in Directory and All Child Directories Read More »

Tagged with: , , , , ,

When I build apps or add new functionality to Symfony2 I build it into a separate bundle, thus trying to keep the structure modular which is generally a good practice as everyone knows. Keeping all parts of the bundle together …

Load configurations from custom bundle in Symfony2 Read More »

Tagged with: , , ,

Laravel is great framework and I quite enjoy how it’s structured and how it works. In version 4 it was migrated from bundles to using Composer for dependency injection which is great and fits well in my daily routine on …

Running out of memory on Laravel 4 update Read More »

Tagged with: , , , , ,

Magento export Every now and then I am asked by different clients if I can export specific customer data, most often people need emails of their customers to use for newsletters or other types of marketing campaigns. There are two …

Magento :: Export all customers and emails from orders Read More »

Tagged with: , , , ,

I build API service for a mobile application and I faced a problem with the error reporting with Laravel. Laravel is awesome framework and is great for RESTful application or building API that’s why it’s my first choice. But I …

Custom error handler for Laravel 4 Read More »

Tagged with: , , , ,

It’s really interesting how small changes in core PHP functionality could break whole website and take hours to find the cause of the bug. I am building website which takes some use of dates, stored in MySQL database as Date …

Consistent dates in PHP? Read More »

Tagged with: , , ,

In this quick tip I’ll show you how to install the PHP extensionmcrypt. This is needed for Magento to run properly otherwise you’ll get an error like: [cc type=”text” escaped=”true”]Fatal error: Call to undefined function mcrypt_create_iv() in lib/Varien/Crypt/Mcrypt.php on line 64[/cc] …

Install PHP mcrypt on UNIX server Read More »

Tagged with: ,

Magento is one of the fastest growing eCommerce platforms on the internet and with its recent acquisition by eBay it promises to stay on the lead and keep growing with even faster pace than before.  It’s been choice for a …

How to Move Magento to a New Server or Domain Read More »

Tagged with: , ,

In console environment PHP could be very useful especially running long tasks or for CRON jobs. You can execute your script like: [cc lang=”text”]php scriptName.php[/cc] You can also pass some parameters like: [cc lang=”text”]php scriptName.php param1 param2[/cc] Those can be …

How to read STDIN with PHP script from terminal Read More »