Skip to main content

Posts

Showing posts from November, 2011

How to fix Piwik not working when https protocol is enabled

If you noticed that your Piwik has stopped working when enabling SSL or it never worked in the first place using https, you may be having issues with the protocol. Most hosts only allow SSL for one subdomain (usually www) unless you order an expensive package so if you happened to install Piwik on a subdomain (say analytics.example.com) while SSL will work, an exception will need to be made as the certificate doesn't match the exact URL.  Because of this, piwik will not load the scripts correctly.  Luckily this is simple fix. Overview : Make sure SSL is the problem Update the tracking script Step 1: To make sure that SSL is a problem you have to try to load the piwik.js file from your installation folder using both https and http.  By default, mine was trying to use https and it was showing something similar below in firebug. If it shows the piwik.js source code then this is not your issue. Alternatively you can open the file in the browser by going to: https://a

How to fix a PHP Fatal error: Allowed memory size of XXXXX bytes exhausted

If you're working with a PHP website, Magento in my case, and you get a page that is half blank when loading it's possible that you're experiencing a fatal PHP error.  This quick post will show you how to fix this in Magento 1.6.1.0. Overview Verify that you're getting a fatal PHP error related to memory size Update your .htaccess file Update your php.ini configuration Step 1:   Verify the error To verify that you are experiencing a fatal PHP error related to the memory size available you must first find your PHP error log file.  My host provides this through cPanel but if you're using your own Apache server it can usually be found in /var/logs/apache2/errors.log (see below). Open using whatever editor you like (geany in my case), when opened, I was seeing this: Apache2 error.log file showing a PHP Fatal error My log was giving this error: [23-Nov-2011 17:13:12] PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to all

How to add a static block to a specifc category in Magento 1.6.1.0

Here's a simple tutorial on how to add a static block to any category page in Magento. Overview Create a static block Configure the custom layout for the category to show the block Refresh the block cache Free shipping static block on the left side of a category page To create a static block, login to the backend and go to CMS->Static Blocks. Click Add New Block from the top right. Enter whatever content you want the block to display, I'm creating a free shipping block for the left column. <div class="block block-list block-shipping">     <div class="block-title"><strong><span>Shipping</span></strong></div>     <div class="block-content">         <h4>Free shipping on every order!</h4>         <p><img width="64" style="float:right;" src="{{skin url=images/box.png}}"> We now offer free USPS Parcel Post shipping on every order! No min

How to increase the Magento admin session timeout

By default Magento sets the admin session to expire after 3600 seconds (1 hour).  So if you're working on adding a product and get distracted and have to leave, when you come back you're session may very likely be expired and all changes lost. Luckily this is simple to fix, simply go to: System->Configuration->Admin->Security Set the Session Lifetime to a larger number (see below). Next we have to make sure the session cookie doesn't expire.  Go to System>Configuration->Web->Session Cookie Management Set the Cookie Lifetime to a larger number such as 14400. This method worked for Magento v 1.6.1.0 Thanks!

How to 'fix' flash not maximizing on the correct screen in Ubuntu 11.10

If you use two monitors or a separate TV screen in Ubuntu you may have noticed that when trying to maximise a flash video it maximises on the wrong screen.  Initially when you plug a second monitor the display manager will look something like the following. I've not found documentation on this, but it seems as if Ubuntu assumes that the screen the furthest to the left is considered the primary screen.  So all you have to do is drag the second monitor to the left of the original monitor as below. Click apply.  Now Ubuntu will use the second monitor as the primary screen (all dialogs will open there) and flash videos will maximise in this screen as well. Good Luck!

How to reload sound drivers in Ubuntu 11.10

Every now and then I happen to get my sound to stop working in Ubuntu 11.10.  Sometimes this occurs when suspending and then resuming but most recently it stopped after switching the sound output from my laptop to an HDMI port.  Here's a quick way to fix this without restarting. Open a terminal (ctrl+alt+t) and type: sudo /sbin/alsa force-reload Enter your password and it'll reload the ALSA sound drivers (see below).  Now go back into the sound settings and everything should work! More info can be found here: http://ubuntuforums.org/showthread.php?t=1861174