Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento frontend not rendered until the end

I have a very interesting issue, which is driving me crazy. :)

I'm setting up Magento 1.5 on a CentOS 6.3 system. Magento backend is working, i have products, users, everything set up. When i open my frontend, it seems to be broken. CSS is applied, the first part (header, menu, searchbar) is render correctly, but after that, nothing... I first thought i was indexing or cache, so i reindexed everything and i also cleared the cache. It didn't help, so i continued investigating.

Firebug told me that the page is failing with 500 (Internal service error) - the weird thing is that Magento is not telling me this, the frontend HTML file is looking ok, and even worse, neither the Apache, nor the Magento log is showing anything!!! I also found out with firebug that the HTML response returned from the server is not complete, it just comes to an end here:

<div class="category-products">


                        <ul class="products-grid">
                <li class="item first"><a href="http://...:8383/wobMagento/featured-products/item.html?___SID=U" title="Smoking" class="product-image"><img src="

And that's it, after the img src=" part, the HTML is finished. It seems as Magento is throwing an exception.

I think this code piece is causing the issue:

   <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
            <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>

I have no idea what to do, i'll list what i did:

  • I cleared the cache
  • I have reindexed everything
  • I have added 777 permissions to my whole magento dir
  • I made sure apache is the owner of my whole magento dir
  • I tweaked around the .htaccess file of ${magento}/media, tried with the default, added some options, removed some options, even deleted it, neither of these actions made any change (or, the best i could achieve is to completely block all images)

I can confirm that in the backend the products are available and can be seen and this can of 500 error is not occuring. I found this exact product which is failing, i could edit it's label and the image of the product is showing up in the backend.

like image 682
Zsolt János Avatar asked Feb 17 '23 07:02

Zsolt János


1 Answers

Check your server error logs, they may contain valuable information related to your issue.

Since the line where it all breaks down outputs product images, which are resized using GD library, I assume GD library is not installed.

Make sure your installation has GD library operational.

like image 121
Oleg Ishenko Avatar answered Feb 19 '23 21:02

Oleg Ishenko