Jump to content

ISE 500 when using Search function


RossF1984

Recommended Posts

Hi,

After managing to recover my site Delightful Hair & Beauty to a functional state I have now discovered that when using the Search function I sometimes encounter an ISE 500 error. This seems to be caused by certain words.

If you search for 'OSMO' the website functions as expected.

However if you search for 'Wella' the ISE can be seen.

This happens with other word/letter combinations too. It also happens using the 'Search Product' function in the Admin of the store.

Any ideas? I am about to pull my hair out, of which I don't have much left! 

Link to comment
Share on other sites

A 500 ISE is very likely caused by the web server disagreeing about something regarding the request.

In this case, we can likely blame a security application that is screening for character strings that match known attacks.

Your hosting provider will need to examine the security application's logs to see if it triggered the 500 ISE.

 

Link to comment
Share on other sites

Thanks @bsmither

I have contacted my hosting provider and they say have a look at your '.htaccess file'. I don't however have a clue what I am looking at. I haven't, to my knowledge, made any changes to this file. Although I guess something could of happened when I upgraded, rolled back and then reinstalled 6.4.3?

The code in my file is as follows:
 

##### START CubeCart .htaccess #####

### GZIP Compression ###
<ifmodule mod_deflate.c>
	AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>

### Files Expiration ###
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/html "access 0 seconds"
    ExpiresDefault "access 7 days"
</IfModule>

### File Security ###
<FilesMatch "\.(htaccess)$">
  Order Allow,Deny
  Deny from all
</FilesMatch>

### Apache directory listing rules ###
DirectoryIndex index.php index.htm index.html
IndexIgnore *

<ifModule mod_headers.c>
  Header always append X-Frame-Options SAMEORIGIN
</ifModule>

### Rewrite rules for SEO functionality ###
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  ##### START v4 SEO URL BACKWARD COMPATIBILITY #####
  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule cat_([0-9]+)(\.[a-z]{3,4})?(.*)$ index.php?_a=category&cat_id=$1&%1 [NC]

  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule prod_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC]

  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule info_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=document&doc_id=$1&%1 [NC]

  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule tell_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC]

  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule _saleItems(\.[a-z]+)?(\?.*)?$ index.php?_a=saleitems&%1 [NC,L]
  ##### END v4 SEO URL BACKWARD COMPATIBILITY #####

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)?$ index.php?seo_path=$1 [L,QSA]
</IfModule>

### Default store 404 page ###
ErrorDocument 404 /index.php

## Override default 404 error document for missing page resources ##
<FilesMatch "\.(gif|jpe?g|png|ico|css|js|svg)$">
  ErrorDocument 404 "<html></html>
</FilesMatch>
##### END CubeCart .htaccess #####

Could anyone advise if this looks correct? Permission is also set to 644.

The thing I find weird is that it works ok for some words but not others.

Link to comment
Share on other sites

The .htaccess file looks fine - as far as what CubeCart put in it (not including anything above the rewrite rules).

PHP is very capable of reporting when it cannot grab any more memory.

If memory is the cause, and only certain words are triggering it, could those words be related to an identifiable product?

That is, "Wella" and any of the other words that cause a 500ISE, can they all point to a specific product?

If so, let's verify that the original source image(s) associated with that product are below 350KiB. (Images that uncompress to ridiculous sizes in memory will cause PHP to not be able to ask for more than it has been allotted, thus, a crash.)

 

Link to comment
Share on other sites

@RossF1984 What makes you say that it appears to be a memory issue ?  While I cant claim that CubeCart uses memory in the most efficient way, it is far from the worst application out there and unless you have specific error messages indicating this, I dont understand where that statement is coming from?  It is possible of course, that your hosting environment is limited to a very small amount of per process memory but that would clearly show in the PHP error log files (and would have nothing to do with the .htaccess file !). It also depends on when this issue is happening - as @bsmither says, issues with memory around images can cause issues

 

Link to comment
Share on other sites

@havenswift-hosting TBH I am only guessing at memory simply because I added to the php.ini file the following:

memory_limit = 512M

I did this having scoured Google as IONOS (Where the site is currently hosted) were extremely poor when it came to offering any form of support or solution!! They even managed to somehow disconnect my domain from my webspace and then denied all knowledge! 😡

Since making this change to the php.ini file I have had no problems whatsoever so I assume that IONOS servers do limit the memory as default? I have no formal training in any of this and generally have to fumble my way around with the help of people on here. (THANKS!! 👏) My Wife, whos business the store is for, is now seriously weighing up paying out for 12 months of Cubecart support.

As @bsmither suggested I am going to look into the image sizes. Although as far as I am aware the images are only ever uploaded using the Cubecart admin interface which surely captures images over the allowed size.

All these issue I have seen over the last week have never shown themselves until I moved to 6.4.3 and the store has been live for ~2 years now and up until this last week has functioned faultlessly.

Link to comment
Share on other sites

4 minutes ago, RossF1984 said:

I did this having scoured Google as IONOS (Where the site is currently hosted) were extremely poor when it came to offering any form of support or solution!! They even managed to somehow disconnect my domain from my webspace and then denied all knowledge

They arent known for providing good support and know nothing (and care even less) about your CubeCart store - to be fair, not really any different from most of the other large generic hosting providers out there where you are simply a number - however they are relatively cheap and you get what you pay for with hosting !

CubeCart can often run out of process memory when processing large images but this would have been clearly recorded in the PHP error_log file as would any errors like this.  Images would no have been the cause if you were getting this error when doing a search on the front end of the store though.  I have not heard of any memory related issues when doing searches though.  If they allow you to increase to 512MB then great, but do go into the PHP Info option in admin and check that the "Master" value also says 512 MB - if it is less than 512 MB, then that is what you will actually be allowed to use regardless of what you set it to

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...