Magento getting timeout errors, even with max_execution_time set to zero, on WAMP

March 9th, 2010 No comments

While working on importing products in Magento, I was getting timeout errors a lot like

Fatal error: Maximum execution time of 60 seconds exceeded in c:\xxxxxxx\lib\Zend\Db\Statement\Pdo.php on line 228

etc etc. This error was mostly generated when importing products, exporting products re indexing large indexes like fulltext search index etc.

One solution I found on every place was to increase the max_execution_time and memory_limit in php.ini or .htacces file. But I already had max_execution_time value set to 0 which means unlimited, and memory_limit set to 512MB which is also good enough.

After trying many things I found a solution that worked. In my php.ini value max_input_time was set to 60. This defines the maximum amount of seconds each script may spend parsing request data. By default value is -1 which means unlimited, but WAMP server 2 sets it to 60.

For many pages this value was getting exhausted. Once I changed it to 6000 (100 minutes), every thing looked fine. You can optionally set it to -1 for local machine and some good enough value for production server. This value should not be less or equal to max_execution_time other wise they will nullify each other.

Categories: Magento Tags:

Magento TAX / VAT calculation bug in grouped products

March 9th, 2010 1 comment

Grouped products is feature by Magento that allows to group products in main and sub products. This feature is similar to sub products feature in CRE Loaded PRO and B2B versions.

An issue was found with grouped products when we configure to show products price including and excluding tax. On listing pages for grouped products both prices are same and tax is not being calculated properly. See image below

On product page prices for sub products are calculated including VAT, which is correct behavior, see image below.

This shows that TAX / VAT is configured properly. This is have been reported on Magento bug tracking and its current status is “Assigned”.

I think this issue can be resolved if TAX Class option in enabled for grouped products, currently this is only available for simple products, or catering the TAX Class properly when calculating starting from price. Hope this issue will be resolved soon.

See other Magento related posts.

Categories: Magento Tags:

Magento, the platform for growth

March 7th, 2010 No comments

Magento is very promising ecommerce software. It was first released in early 2008, and since than it has grown enormously. Now it claims to be used by 30,000+ merchants, and 1.5 million downloads.

I first came across with Magento in mid of 2008. There were two things I found early about it, one it was great software and second it was slow :( . Lets keep the second part for later discussion. The features offered even in initial releases, were mature and most wanted ones.

As I had experience of working on CRE Loaded and osCommerce, and managing sites built on these, I found the features very mature. Like search is very important feature for an eCommerce site, Magento have fulltext searching, search tracking, incorrect spell mapping and destination page setting for particular keywords.

Another hidden feature that impressed me was, it allows to configure read only mySQL servers for load balancing. I don’t find this feature mentioned at many places now a days, but I think it still exists. Other good features includes mature SEO friendly url structure, grouped, bundle products, multiple stores and websites etc etc.

I was wondering how they were able to identify the most needed features and get it done in a mature way, because such features were a wish list of people managing ecommerce sites. Later I cam to know background of the company and guys behind it, and my assumption was right. The guys behind Magento had a vast experience of work on eCommerce software including osCommerce etc.

Since than, there was no looking back for Magento. They launched an Enterprise edition, added many features, worked on existing ones etc. There is a large community contributing extensions, help and doing so many things.

I have been a fan of Magento from the first day, but this is the first time i am writing about it. I have plan to keep writing more on Magento so stay tuned. By the way you can find Magento on http://www.magentocommerce.com/.

Categories: Magento Tags:

PayPal payment module and discount coupons problem in CRE Loaded

February 27th, 2010 2 comments

Recently had issue where customer complained that discount coupon amount was not being deducted during checkout. This issue was causing many customers to loss as amount on PayPal page was shown without discount.

What I found out that issue was due to a configuration which dose not cater the discount coupon amount. One configuration called “Shopping Cart Method” was set to “Itemized”. This setting shows item wise detail on PayPal checkout page. As discount coupons are applied on an order not on any particular item, so the total amount charged is without discount.

When the option was set to “Aggregate” mode the issue resolved. This does not show much detail for items purchased, on PayPal page but shows the correct amount to charge. So this works for me.

So if you want to do the same, login to your admin area and go to Modules > Payment and select the PayPal module. Now click on Edit button and find Shopping Cart Method and select “Aggregate” option. Click “update” button to save this change. The should be gone.

I have tried this on CRE Loaded pro 6.2 but it should also work for other version of CRE Loaded and OSCommerce as well.

For more updates and fix in CRE Loaded keep visiting CRE Loaded section on my blog.

Categories: CRE Loaded Tags:

Track visitor searches in OSCommerce and CRE Loaded with Google Analytics

February 21st, 2010 No comments

Search feature in OSCommerce and CRE Loaded provide an important functionality for visitors to perform custom search. Its important to know what visitors are searching on your site. Luckily Google Ananlytics (GA) provides and easy way to track these searches.

To enable this tracking your need to login to your GA account and goto Analytics Settings > Profile Settings > Edit Profile Information. Under Site Search select Do Track Site Search. Now you need to tell what parameter contains the search term. As internal search is provided on this page advanced_search_result.php?keywords=test, here we have to track keywords parameter. So put keywords in Query Parameter (required): field.

This will enable tracking for searches performed on your site. Many useful reports are provided by GA telling for example what people are searching and many other things.

Categories: CRE Loaded Tags:

Generating Google sitemap for site

February 17th, 2010 No comments

Create a Google site map for a large or medium site can require a lot of efforts. I had same problem to create a site map having more than 1000 index able pages of different types. Luckly I found a nice tool which can crawl site and generate site map automatically. The software can generate site map in Google and Yahoo! format.

There are some online site map generators but I did not find as good as this one. Few features that I found very valuable are, one ability to exclude pages by extension and second it can exclude URLs based on robots.txt. Third is it can show duplicate content and remove these pages from site map.

The software is called GSiteCrawler and can be found at gsitecrawler.com.

Categories: SEO Tags:

Convert web pages directly to PDF

February 3rd, 2010 No comments

Recently came across site which allows to convert any web page to PDF and download it. The site is http://www.pdfmyurl.com/. Did I tell that its FREE? yes its free.

Categories: Uncategorized Tags:

PHP script throwing internal server error 500

February 3rd, 2010 No comments

Few days back had a problem where my php pages were working fine but had problem with response code it was sending. The page was returning “500 Internal server error” instead of “200 OK”. I recently had updated php and apache version so initially thought there must be some problem with it.

First I tried to match new php setting with old php. After about an hour, when I changed display_errors = On the response header was fixed. The issue was because I had error_reporting = E_ALL so there must be some warnings etc being thrown. My display_errors setting was Off so it was setting response code to “500 Internal Server Error”.

So simple fix is that you turn off error_reporting or turn on the display_errors.

Categories: Uncategorized Tags:

Top 3 Guidelines for Performance

January 30th, 2010 No comments

Recently I have been working on performance optimization of a site. There are several guidelines available from Yahoo! and Google. These include techniques from optimization of CSS code to use of CDN, yes the list includes a lot.
What are the top techniques which can benefit any site the most? In this post I will list top 3 techniques and describe them briefly.

The top techniques are

  1. Reduce HTTP Requests
  2. Use browser cache properly
  3. Compress your content with gzip

Reduce HTTP Requests

Reducing the components (images, JS, CSS) on a page reduces the HTTP requests. Popular ways to reduce the components include, using image sprites, image maps, combine multiple CSS and JS files into one.

If you see this page test you will notice that only 11 HTTP requests are made to fully load home page of an eCommerce site, which is very few as compared to similar sites.

One important thing you also need to check if Keep-Alive is on. For most servers its on by default. This allows persistence connections for HTTP requests. Other wise new connection is made for each request.

Use browser cache properly

A first-time visit to a page may require several HTTP requests to load all the components. Using browser cache can avoid unnecessary HTTP requests on next page. Browser cache should be used for all components including images, js, CSS, and Flash etc. This not only reduces number of HTTP requests it also saves a lot of bandwidth for visitor and server.

See the repeat view test result which shows only one request is made rest of components are served from local browser cache.

Cache is utilized by setting proper expiry headers for components. Read my other post Using browser cache image expiry for performance which explains how to set these headers.

Compress your content with Gzip

Compressing HTML, CSS and JS etc reduces response times by reducing the size of data sent. Gzip is the most used and effective compression available. Gzip normally reduces the response size by about 70%. All major browsers support Gzip compression. This saves a lot of bandwidth on client and server end at very small CPU cost. In my post Compress your web pages I have explained gzip in bit more detail.

Categories: Web Performance Optimization Tags:

Monitor your website availablility

January 25th, 2010 No comments

To make your website successful its important that its availability is 100%. Site downtime can cause serious damage in SEO and drop in sale.
What can cause down time?
Well there can be a lot of reasons for a site being down. This includes database server issues, web server server issues and DNS issues etc.

How can you monitor it?
For database related issues you can write a piece of code which can send email whenever its unable to connect database.

For server side or DNS related issues you can use some free websites which monitor your sites and send email or SMS alters. There are many paid services available which provide advance monitoring. They can monitor site from multiple geo locations and send alters.

Few free sites providing basic monitoring are

  • http://www.freesitestatus.com/en/
  • http://www.montastic.com
  • http://www.serviceuptime.com
Categories: Web Performance Optimization Tags: