Skip to main content

Posts

Showing posts with the label magento

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!