Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

oscThumb - cannot generate system identifiers for w, f, h and q - adding amp; clears HTML errors but produces Invalid Hash Error Box in Product


GINAG

Recommended Posts

Posted

Hi,

 

Am having problems with html validation of product pages owing to oscthump.php. Am getting the following errors:-

 

cannot generate system identifier for general entity "w"

cannot generate system identifier for general entity "h"

cannot generate system identifier for general entity "q"

cannot generate system identifier for general entity "f"

 

relating to the following:-

 

< a href="oscthumb.php?src=/images/product.jpg&w=520&h=700&f=jpg&q=100&hash=deleted" title="Product" rel="lightbox[1]"><img src="product_thumb.php?img=images/product.jpg&w=260&h=350" width="260" height="350" hspace="5" vspace="5" border="0" alt="Product" title="Product"><br><img src="includes/languages/english/images/buttons/image_enlarge.gif" width="260" height="18" border="0" alt="Click images to enlarge" title="Click images to enlarge"><br></a>

 

I have already eliminated these errors in products_thumb.php by including "amp;" (ie &w) in with each of the identifiers in includes\functions\html_output.php. Have tried the same with oscthumb.php and it generates an error, knocking out my lightbox function. The error box produced gives the following info:

 

phpThumb() v1.7.7-200612252156

ERROR: invalid hash.

 

I am not a qualified developer, and have now spent hours trying to solve this problem, but just haven't haven't been able to find the relevant solution from google or the oscommerce site - although am not saying there isn't anything there - just haven't found it. Please please please don't tell me to go and search google - I have seen this often on here - I really am trying to learn and am turning to the community as a total last resort - trust me - I hate defeat so this stings. I'm pretty sure that the error is being generated by the hash security highlighted above (value obviously removed for security), so tried adding the amp; to the $hash value - which admittedly clears a number of the html errors - but still produces the invalid hash error box when adding "amp;" to the other identifiers. I did also find information advising that the $PHPTHUMB_CONFIG['high_security_enabled'] should be set to false to eliminate the problem - but has no joy with this.

 

Many thanks for reading, and I really appreciate any help the community can give me.

 

Gina

Posted

@@GINAG

 

this doesn't address your inquiry directly but after trying to fix the errors as you noted from oscThumb I switched over the KissIT Image Thumbnailer. Something to consider.

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Posted

@@GINAG

 

this doesn't address your inquiry directly but after trying to fix the errors as you noted from oscThumb I switched over the KissIT Image Thumbnailer. Something to consider.

Thanks again Steve - although the install of this looks fairly easy - I am not an experienced developer - and think I would struggle with removal of the old code as its all pretty new to me - also think it may impact the way the images, extra images and lightbox are currently set up - don't want to break it. Do you have any other ideas at all ?
Posted

Thanks again Steve - although the install of this looks fairly easy - I am not an experienced developer - and think I would struggle with removal of the old code as its all pretty new to me - also think it may impact the way the images, extra images and lightbox are currently set up - don't want to break it. Do you have any other ideas at all ?

 

My install / uninstall skills are "moderate", but uninstalling oscThumb for me was a matter of referencing the oscthumb install instructions and undoing them. Taking a quick look in my files here, I see it's about a four step process, with some multiple tasks per step. As well a database modification. The cleanest way and best way would be that route, uninstall. Otherwise it may come back to haunt you later.

 

If you think it's too much to tackle, consider having one of the professionals help with uninstall. I don't think it would cost all that much as they should be able to get through that quickly I'd think.

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Posted

Did you ever try fixing hash=deleted"? That's an obvious error (should be hash="deleted") that the system is reporting to you ("hash error"). I don't know where this URI is created, but it's omitting the opening ".

Posted

Did you ever try fixing hash=deleted"? That's an obvious error (should be hash="deleted") that the system is reporting to you ("hash error"). I don't know where this URI is created, but it's omitting the opening ".

Thanks for your reply - assumed the opening " was at the beginning:-

 

< a href="oscthumb.php?src=/images/product.jpg&w=520&h=700&f=jpg&q=100&hash=deleted"

 

Wouldn't removal of the said " mean that there was no closing " ?

Posted

My install / uninstall skills are "moderate", but uninstalling oscThumb for me was a matter of referencing the oscthumb install instructions and undoing them. Taking a quick look in my files here, I see it's about a four step process, with some multiple tasks per step. As well a database modification. The cleanest way and best way would be that route, uninstall. Otherwise it may come back to haunt you later.

 

If you think it's too much to tackle, consider having one of the professionals help with uninstall. I don't think it would cost all that much as they should be able to get through that quickly I'd think.

Thanks Steve, would be able to remove it no problem - just worried about the impact it would have on the other functions - and whether I would be able to fix them. Will have another look at it. Thanks again.
Posted

OK, you seem to have a mixture of & and & for item separators in the URL query strings. Whichever you need to use, you want to see & in the actual link when you hover over it with the mouse. You may need to use & or you may need to use &. If it's complaining about w, h, q, and f, I think it's trying to interpret them as HTML entities (&w; etc,.) so go ahead and try & in the first line:

<a href="oscthumb.php?src=/images/product.jpg&w=520&h=700&f=jpg&q=100&hash=deleted" title="Product" rel="lightbox[1]">
<img src="product_thumb.php?img=images/product.jpg&w=260&h=350" width="260" height="350" hspace="5" vspace="5" border="0" alt="Product" title="Product"><br>
<img src="includes/languages/english/images/buttons/image_enlarge.gif" width="260" height="18" border="0" alt="Click images to enlarge" title="Click images to enlarge"><br></a>

 

Is this something you tried already? Including the hash one? I would think that if you have to change & to & in the <img> tag, that you'd also have to do it in the <a> tag. I'm guessing that the error message about "invalid hash" is referring to that element (hash=deleted) and not some internally generated hash variable. There's also a slight chance that your host has "mod security" turned on, and it's doing something weird to the "hash" entry. Turning off that facility might help, if nothing else does. Usually it can be done in .htaccess. Make sure you don't have a space between < and a on the first line.

 

If this is only to make a validator happy, and your code works fine in a browser, consider ignoring the validator. They aren't always right, and I've seen them get crossed up on legitimate HTML code.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...