-->

Problem Solving: Images Not Showing In Virtuemart

I found many peoples has similar problem with images displaying in Virtuemart. Usualy if you clicking view image you will found like this:
http://yourdomain/components/com_virtuemart/show_image_in_imgtag.php?filename=resized%2Fnameofyourimagejpg&newxsize=90&newysize=90&fileout=
or even some internal error occur:
Internal Server Error 500
Some of them found these problem after upgrade, and the others found these problem suddenly without changing anythings. So in this articles i want to share several problem solving for your virtuemart images.

JUST CHMOD IT

When you found your Virtuemart images didnt show, you should check your file and folder permissions. Here are the folder and images you should check:
/components
/components/com_virtuemart/show_image_in_imgtag.php
/components/com_virtuemart/shop_image/product/resized
administrator/components/com_virtuemart/virtuemart.cfg.php

Case 1
See if the files and directories above is set to 777, so you must change it into 755 (usually the internal server error 500 will occur if you not change)
visa versa
Case 2
See if the directory is set to 755, so you must change it into 777 (usually http://yourdomain/components/com_virtuemart/show_image_in_imgtag.php?filename=resized%2F will shown when you didnt change the permission)

Remember, tested one by one all files and directories above.

CHECK YOUR PATH

This is often happen when we moving Virtuemart from local computer into our host. But this is may occur in fresh installation in your host.

Open: administrator/components/com_virtuemart/virtuemart.cfg.php
and find this on line 34:

// these path and url definitions here are based on the Joomla! Configuration
define( ‘URL’, $mosConfig_live_site.$app );
define( ‘SECUREURL’, ‘http://localhost/’ );

Just check if your url path there is correct, if not, change with your joomla url.

CHANGE READFILE FUNCTION

In some host, the readfile[] function will disabled for security reasons (usually happen in free host) you can check your error log, and find error like this to ensure that you have readfile[] function problem:

PHP Warning: readfile() has been disabled for security reasons in /home/user/public_html/components/com_virtuemart/show_image_in_imgtag.php on line 125

if you found that problem, thats mean your host was disabled readfile[] function. Readfile is needed for showing your images in Virtuemart, if disabled, so we can changing with other function, like file_get_contents
Lets change..
Open file: /components/com_virtuemart/show_image_in_imgtag.php
and find this on line 149:

case ".gif":
header ("Content-type: image/gif");
readfile($fileout);
break;
case ".jpg":
header ("Content-type: image/jpeg");
readfile($fileout);
break;
case ".png":
header ("Content-type: image/png");
readfile($fileout);
break;

Change into file_get_contents function so it will be:

case ".gif":
header ("Content-type: image/gif");
echo file_get_contents($fileout);
break;
case ".jpg":
header ("Content-type: image/jpeg");
echo file_get_contents($fileout);
break;
case ".png":
header ("Content-type: image/png");
echo file_get_contents($fileout);
break;

Close and save the file, and then your images will showing again.

ads:



Related posts:

  1. How To Remove Virtuemart Logo In Empty Cart Module
  2. How To Manage Virtuemart Admin From Joomla Frontend
  3. PHP Include Function Error, How To Fixed That?
  4. How To Showing All Content Items On Joomla 1.0.xx RSS / Syndication
  5. PHP Simple Logout Script


Share To Facebook | Tweet! This | Watch The Video


 
4 Comments. Leave Comment Or Trackback.
  1. #1 • Date 11 February 2010, Chimezie said:
     

    I have followed all these steps, and my images would not show. It would not even show also on the virtuemart scroller. Please help

    ReplyReply
  2. #2 • Date 20 February 2010, El Nino said:
     

    Dont do it all together, choose one of them (or check it one by one):

    • Just CHMOD This
    • Check Your Path
    • Change Readfile Function
    ReplyReply
  3. #3 • Date 1 April 2010, chicago limousine service said:
     

    This was also my problem before with my past client. The tips you have stated are the thing I’ve also do. These are really effective.

    ReplyReply
  4. #4 • Date 16 June 2010, Osman said:
     

    tried all the steps above but the images are still not showing.

    ReplyReply

 

Comment With Facebook?

Comment:

 
 
-->