Author: SANDO
Just a guy with strong interest in PHP and Web technologies

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: , ,

If you forget your admin password for Magento and you can’t remember the email or just want quick fix you can use one line of SQL to sort that issue out. [cc lang=”sql”]UPDATE admin_user SET password=CONCAT(MD5(‘qXpassword’), ‘:qX’) WHERE username=’admin’;[/cc] All …

Magento: How to reset admin pssword Read More »

Tagged with: , ,

If you are running your site on a shared hosting and you have multiple domain installed as subdirectories the things could go out of hand really fast. In my specific case I have multiple installs of different CMS and one …

Serve main domain from subdirectory with .htaccess 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 »

If you need to migrate a PrestaShop website from a local to a remote installation or just change the domain name, you need to follow these steps: 0. For security reasons, make a backup of all files and database 1. …

Migrate Prestashop to another server Read More »

Tagged with: , ,

In the general case the website caching happens on the server side where the PHP output or database objects are cached in static files or in the server RAM. That could work pretty good but we could improve that and …

HTTP cache control on a dynamic PHP page Read More »

Tagged with: , , ,

I had an odd white screen on one of my websites. No exceptions, no messages, it was time to check the error log. There I found the following error: [cc lang=”text”]PHP Fatal error: Call to a member function extend() on …

Magento white screen or how XML can break your site? Read More »

Tagged with: , , ,

I was trying to install GIT on a CentOS 6.2 development server and ran into very odd problem: [cc lang=”text” escaped=”true”]# yum install git Loaded plugins: fastestmirror, priorities Loading mirror speeds from cached hostfile * epel: nl.mirror.eurid.eu Setting up Install …

Installing git on CentOS and Dependencies hell Read More »

Tagged with: , , ,

MySQL is great database especially for small and mid size web applications. You can do loads of stuff with it but not everything is possible with regular SQL query. Imagine you have a database and you want to delete set …

MySQL – Delete/Drop all tables with specific prefix Read More »

Tagged with: , , ,

Here’s a quick and dirty utility method for type checking an object or an array of objects. [cc escaped=”true” lang=”php”]/** * Ensure the object (or the first item in the * array of objects) is of the specified type * …

PHP Type Checking Read More »

Tagged with: , , ,