How to write text on existing image using php

The post below describes an easy and quick way to write text over an existing image using PHP. You can use this method to watermark your images and can put it to use in number of other ways.   First we would have to make the existing image editable to write text on that image. […]

How to use PDO-MySQL with PHP

PDO is a PHP extension that allows multiple PHP's database connections by creating a single cohesive interface. It allows code portability and compatibility across various platforms. It can be considered as a database access layer providing a uniform method of access to multiple databases. By using PDO you can switch between different databases and platforms […]

PHP PHAR Package

The phar extension is used to put entire PHP applications into a single file called a "phar" (PHP Archive) for easy distribution and installation. It provides the means for distributing code as a single archive, that does not have to be extracted to a folder before usage. In addition to providing this service, the phar […]

How to set timezone at application level and user login level using PHP

To set timezone in php at user level, you have to use the function date_default_timezone_set(). This function is available in version 5 and later of PHP   <?php date_default_timezone_set('America/Los_Angeles'); // To see a list of all supported time zones please go to : $script_tz = date_default_timezone_get(); if (strcmp($script_tz, ini_get('date.timezone'))){ //compares current time zone with […]

Customer Review Date Changer for Magento

The customer review date changer extension for Magento is a small, lightweight plugin that allows you to change the date for customer reviews at your Magento store. While importing your store from one CMS like WordPress to Magento, you have to go through the peril of fixing the dates for customer reviews. By default, the […]

Magento Admin Fix for CSS and JS Not Loading

After transferring the magento store to new server and database you might find that the magento admin is not loading the CSS and JS files. Because of that, the design would look out of order and the categories pages would not display the products.   To fix this, you have to run the following SQL […]

Alternate Method For Magento Incremental Update

In order to maintain all your tables and data the way it is, you often require to perform an incremental update for magento, doing it otherwise might make some of your data obsolete. Here is a simple step by step guide to perform magento incremental update:       First you have to back up […]

SALT implementation in YII

A salt is a random data string that is used as an input to hash a password. The salt and the password are concatenated and encrypted with a cryptographic hash function and the output is then stored in the database. This method can protect the passwords even when the database security has been compromised.   […]

Uploading Extension to MagentoConnect: Invalid Package Name

While uploading to magento connect, we often receive an error “Invalid Pakage Name- the Package name without ext should be ……..”. We have to take care of few things while packaging and uploading extension to magento connect. Following is the solution. 1). Create a package of your Extension:       As you see from the above […]

Multiple Attachments using PHPMailer Class

  To send an email with multiple attachments using php, we would be using a class PHPMailer. You can download that class from this link: To add more than one attachments to our email we would be using the  “addattachment()” method from the PHPMailer class. Here is what you would need to do. We […]