Category: PHP

  • Resolving Slow WordPress Websites

    Resolving Slow WordPress Websites

    Slow WordPress websites can be difficult to improve especially if we don’t have a plan on how to resolve the problem. I have a list of five recommendations that I always look at doing when trying to resolve speed issues.

  • Setting Up Caching on Apache

    Setting Up Caching on Apache

    For the majority of websites, a great amount of the content doesn’t change from day to day or even month to month. When a site gets a lot of repeat traffic we can dramatically reduce the load and costs by caching.

  • Recreating PHP’s time() function in JavaScript

    Recreating PHP’s time() function in JavaScript

    PHP’s time() function returns the current unix timestamp. JavaScript doesn’t exactly have the same functionality, but it’s pretty close. Put a different and more understandable way, it returns the current time measured in seconds since the Unix Epoch (00:00:00 UTC on 1 January 1970). JavaScript has a similar way of getting the time but it’s in milliseconds since the Unix Epoch.

  • Book Review: Magento Site Performance Optimization

    Magento Site Performance Optimization by Mathieu Nayrolles is a handy little primer on the basics of optimizing a server for magento. This little gem covers the basics, doesn’t spend a lot of time on fluff, and moves quickly into optimizing MySQL and covers the basics of using two mysql instances (through replication) one for writing […]

  • Reducing WordPress Comment Spam

    Self-hosted WordPress sites often attract a lot of comment spam which requires your valuable time or resources to reduce to more manageable levels. We recommend automatically turning off commenting on older posts, because these are the posts that often rank very well in Google which attracts the spammers in the first place. Most blogs choose […]

  • Akismet (Anti-Spam)

    Akismet has worked extremely well for me over the last two years, it’s only inaccurately identified two comments as spam out of almost 20,000 comments. Akismet is pretty much the only plugin used on every WordPress blog, and works for almost everyone although it is no longer free for business use. There’s been reports over […]

  • Zen Coding

    When I first heard of Zen Coding on Sitepoint, I figured it was some other gimmick that might save me about 0.01% of my time each year after I spend five or six hours learning the syntax. Zen Coding works by expanding some abbreviations into properly closed html. The syntax is very simple, and can […]

  • Why I Recommend PayPal

    I spend a significant amount of my timing deal with ecommerce and different shopping systems. One of my all time favourite solutions is using PayPal and Magento together because they have been designed from the ground up to interact well together. International Acceptance PayPal is accepted in many countries and is capable of doing automatic […]

  • WAMP Server Not Accessible on Port 80

    WAMP Server generally runs fine without any problems, although sometimes we have to make some configuration changes because of other software monitoring ports. Skype, for example, is commonly using port 80 to communicate and stopping apache from responding. If you’re using WAMP and apache at the same time, you need to left click the WAMP […]

  • WAMP Server On Windows 7 64bit

    Getting WAMP to run properly on Windows 7 isn’t very difficult as long as the permissions are properly set. Also, keep in mind that you may need to modify your windows firewall settings, and bit defender if you have it running. WAMP needs full administrator privileges which as you may be aware needs to be […]

  • Magento CheckOut Page Blank

    I had a very strange issue with a client’s installation of magento a few nights ago. The checkout page was completely blank and the apache error logs were completely empty. I tried all the usual fixes of looking at file permissions, updating the magento installation, checking for new modules, etc but none of these solutions […]

  • PEAR Mail – Checking If Mail Sent

    PEAR Mail & mail_mime is absolutely fantastic for sending multi-part mime emails and requires absolutely no effort. Probably, the best part of PEAR Mail & mail_mime is not having to deal with mime boundaries. I often see incorrect code for handling whether the message successfully sent or not. To check if the message is sent […]

  • Installing PEAR on BlueHost

    PEAR as I’m sure you’re aware stands for “PHP Extension and Application Repository” and is one of the leading frameworks for reusable components. Installing BlueHost can be easily be accomplished using the Fantastico located inside your Cpanel access. The configuration of PEAR can be quite a challenge though! The PEAR installation as I’m sure you’ve […]

  • Add A Facebook Like Button

    A while ago, Facebook created the Facebook Like Button that works by using an iframe of FBML. The Like button allows you to easily get some free social media coverage with consumers. Many websites and blogs are making use of the Facebook Like button and any other ways possible of sharing on social media networks […]

  • How to Tell What Version of Magento

    The easiest way of telling what version of Magento you are running is by viewing file app/Mage.php and looking for a function called getVersionInfo(). The function should look something like the following and be fairly self explanatory to most developers. public static function getVersionInfo() { return array( ‘major’ => ‘1’, ‘minor’ => ‘5’, ‘revision’ => […]

  • Magento An Introduction

    What is Magento? Magento is an open source eCommerce platform with two versions: Magento Community Editon, and Magento Enterprise Edition. Magento is developed by Magento Inc and is built upon PHP, and the Zend Framework. The Magento Community Edition uses the Open Software License (OSL) v3.0 which is sufficient for most online stores. Why use […]

  • How to Add CSS & JavaScript to a Magento CMS Page

    Magento is an insanely flexible system that has a lot of potential, but of course with this flexibility comes a lot of learning. Adding a JavaScript file and a CSS file to a specific CMS page isn’t very difficult. We should always consider adding the JavaScript file or CSS file to the theme if we’re […]

  • Displaying The Newsletter On a CMS Page/Block

    I really like magento, and a lot of the built in features although it can be difficult sometimes to figure out how to use things. Displaying the newsletter in a CMS Page / Block is pretty easy. Just simply paste the following code into the design block, and away you go! {{block type=”newsletter/subscribe” template=”newsletter/subscribe.phtml”}} Hope […]

  • Professional PHP Design Patterns

    Professional PHP Design Patterns written by Aaron Saray, coming in at around 250 pages is a very short and concise book. Unfortunately, the book doesn’t cover all of common design patterns but does do an adequate job of covering about 17 different patterns. Each of the 17 patterns covered include fairly easy to understand examples, […]

  • Magento Add/Edit Footer Links

    Editing the footer links in magento is actually pretty easy. By default, there should be a static block called footer_links. The static block starts off with at least these two links: About Us, Customer Service. Editing is as simple as signing into the admin, and Clicking CMS->Static Blocks->footer_links and making your changes. Good luck!