Post by Boodschappenonline » Mon Sep 21, 2020 3:51 pm

When building our webshop, i discovered that the search function doesn't work anymore.

After entering a product description in the searchbar, Opencart shows a page with an error log in Dutch. Translation:

This page doesn't work
bestel.boodschappenonline.nl cannot process this request.
HTTP ERROR 500

I've copied the folder Admin from a clean installation file, but that didn't help, even disabling all the vqmods didn't solve the problem.

Changing the theme from Journal 2 to default also didn't fix the problem.

Opencart versie: 2.3.0.2
Theme: Journal 2
URL: https://bestel.boodschappenonline.nl/

New member

Posts

Joined
Fri Mar 31, 2017 7:07 pm

Post by xxvirusxx » Mon Sep 21, 2020 4:04 pm

Make sure you have https:// in both config files (all instances).

Also check .htaccess for mistakes

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Boodschappenonline » Mon Sep 21, 2020 4:43 pm

xxvirusxx wrote:
Mon Sep 21, 2020 4:04 pm
Make sure you have https:// in both config files (all instances).

Also check .htaccess for mistakes
Thanks xxvirusxx for helping me out.

I've checked the following files:

In the folder public_html
- config.php
- .htaccess

In the folder admin
- config.php

.htacces is standard, i've changed nothing i can remember.

It put the lines in all the config.php files:

// HTTP
define('HTTP_SERVER', 'http://supermarktonline.nl/');
define('HTTP_SERVER', 'http://bestel.boodschappenonline.nl/');

// HTTPS
define('HTTPS_SERVER', 'https://supermarktonline.nl/');
define('HTTPS_SERVER', 'https://bestel.boodschappenonline.nl/');

New member

Posts

Joined
Fri Mar 31, 2017 7:07 pm

Post by JNeuhoff » Mon Sep 21, 2020 6:27 pm

Use this:

Code: Select all

// HTTP
define('HTTP_SERVER', 'https://supermarktonline.nl/');
define('HTTP_SERVER', 'https://bestel.boodschappenonline.nl/');

// HTTPS
define('HTTPS_SERVER', 'https://supermarktonline.nl/');
define('HTTPS_SERVER', 'https://bestel.boodschappenonline.nl/');
And in your '.htaccess' make sure to use the correct RewriteBase.

Also, check your server's error.log (ask your webhost for the log entries, for the exact time you had these Internal Error 500 results.

Also, please be aware that you are using one of the worst possible OpenCart theme/extension (Journal2), consider replacing it with a proper Opencart-compliant web theme.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Boodschappenonline » Mon Sep 21, 2020 10:03 pm

JNeuhoff wrote:
Mon Sep 21, 2020 6:27 pm
Use this:

Code: Select all

// HTTP
define('HTTP_SERVER', 'https://supermarktonline.nl/');
define('HTTP_SERVER', 'https://bestel.boodschappenonline.nl/');

// HTTPS
define('HTTPS_SERVER', 'https://supermarktonline.nl/');
define('HTTPS_SERVER', 'https://bestel.boodschappenonline.nl/');
And in your '.htaccess' make sure to use the correct RewriteBase.

Also, check your server's error.log (ask your webhost for the log entries, for the exact time you had these Internal Error 500 results.

Also, please be aware that you are using one of the worst possible OpenCart theme/extension (Journal2), consider replacing it with a proper Opencart-compliant web theme.
Thanks JNeuhoff for helping me out.

I've changed the config.php in the root, do i also have to these these lines in the config.php in the folder admin?

I've added the lines to my .htaccess:
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^(.*) https://supermarktonline.nl%{REQUEST_URI} [R=301,L,NE]

I thought that Journal 2 was a very often used theme, unfortunately i've designed my new site in Journal which cost me al lot of time.

New member

Posts

Joined
Fri Mar 31, 2017 7:07 pm

Post by JNeuhoff » Mon Sep 21, 2020 11:11 pm

I've changed the config.php in the root, do i also have to these these lines in the config.php in the folder admin?
Yes.

As I said, get the server's error.log entries from your webhost, these will have more details about your Internal Error 500.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by xxvirusxx » Tue Sep 22, 2020 4:13 pm

Why you have 2 websites on config.php?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Boodschappenonline » Tue Sep 22, 2020 4:42 pm

JNeuhoff wrote:
Mon Sep 21, 2020 11:11 pm
I've changed the config.php in the root, do i also have to these these lines in the config.php in the folder admin?
Yes.

As I said, get the server's error.log entries from your webhost, these will have more details about your Internal Error 500.
I've aksed for the error.log and this is what i've got:

[Tue Sep 22 10:05:22.538907 2020] [proxy_fcgi:error] [pid 29416:tid 140434560808704] [client 46.44.165.153:53015] AH01071: Got error 'PHP message: PHP Notice: Constant HTTP_SERVER already defined in /home/trilogics/domains/supermarktonline.nl/public_html/config.php on line 9\nPHP message: PHP Notice: Constant HTTPS_SERVER already defined in /home/trilogics/domains/supermarktonline.nl/public_html/config.php on line 12\n', referer: https://supermarktonline.nl/

New member

Posts

Joined
Fri Mar 31, 2017 7:07 pm

Post by Boodschappenonline » Tue Sep 22, 2020 4:43 pm

xxvirusxx wrote:
Tue Sep 22, 2020 4:13 pm
Why you have 2 websites on config.php?
I thought that, that was necessary for a multistore

New member

Posts

Joined
Fri Mar 31, 2017 7:07 pm

Post by JNeuhoff » Tue Sep 22, 2020 8:47 pm

xxvirusxx wrote:
Tue Sep 22, 2020 4:13 pm
Why you have 2 websites on config.php?
Well spotted! The config.php files should only have 1 each for HTTP_SERVER and HTTPS_SERVER, for the main site. The details for the additional sites are stored in the database.

As regards the error.log entries:

A notice is an advisory message meaning "You probably shouldn't be doing what you're doing, but I'll let you do it anyway"

A warning is a message saying "You are doing something wrong and it is very likely to cause errors in the future, so please fix it."

None of these explains the Internal Error 500 triggered by the search, there have to be more entries on these in the error.log, without them nobody will be able to help here solve this problem.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Boodschappenonline » Wed Sep 23, 2020 4:51 pm

JNeuhoff wrote:
Tue Sep 22, 2020 8:47 pm
xxvirusxx wrote:
Tue Sep 22, 2020 4:13 pm
Why you have 2 websites on config.php?
Well spotted! The config.php files should only have 1 each for HTTP_SERVER and HTTPS_SERVER, for the main site. The details for the additional sites are stored in the database.

As regards the error.log entries:

A notice is an advisory message meaning "You probably shouldn't be doing what you're doing, but I'll let you do it anyway"

A warning is a message saying "You are doing something wrong and it is very likely to cause errors in the future, so please fix it."

None of these explains the Internal Error 500 triggered by the search, there have to be more entries on these in the error.log, without them nobody will be able to help here solve this problem.
Goodmorning JNeuhoff,

This is the only thing i get from the logs that correspond with the problem:

178.170.148.56 - - [23/Sep/2020:10:30:58 +0200] "GET /index.php?route=product/search&search=appel&description=true HTTP/2.0" 500 226 "https://bestel.boodschappenonline.nl/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"

New member

Posts

Joined
Fri Mar 31, 2017 7:07 pm

Post by JNeuhoff » Wed Sep 23, 2020 8:31 pm

This is your access.log, you need the error.log entries.

Also, as a test, switch to the default theme, and then try the search again to see whether it's theme related or not. Also, in a process of elimination, disable other 3rd party extensions, one at a time, to see whether the error goes away or not. The Journal2 theme will clash with many other 3rd party extension because of its poor engineering. After each change don't forget to do usual OCmod refresh. It's also worth looking into the OCmod log to see whether it reports any conflicts.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 9 guests