Post by dragonfly-ie » Thu Nov 02, 2023 5:18 am

Using oc v2.2.0.0. with php 7.2 for couple of years now without a bother. Default template. Nothing fancy.

Tried to search for a solution here and ended up down in 500+ rabbit holes ...

Can log into admin, but front page is blank: <head> and <body> empty.

In a nutshell:
1. Got unusual large number of customer's registrations with no details in DB.
2. Did a bit fiddling with >Modules >cookie notice by [...] - enabled/disabled
3. Changed >Customers >Custom Fields from tick to radio (to stop spam).

After this me website [...] went blank.

Got an old back up from May 23, but trying to avoid overwriting all files and losing changes, if possible?
And honestly not sure, if this is good decision?

Any insights or advice from community would be greatly appreciated? - Cheers

edit :: problem solved/ removed identifiable data
Last edited by dragonfly-ie on Sun Nov 05, 2023 11:32 pm, edited 4 times in total.

Dum spiro spero.


User avatar
New member

Posts

Joined
Sat Nov 09, 2013 2:31 am


Post by halfhope » Thu Nov 02, 2023 5:37 am

Hi!

Temporary add this lines into your .htaccess code to display startup errors:

Code: Select all

php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on 

My FREE extensions in marketplace. [ security | flexibility | speedup ]


User avatar
Active Member

Posts

Joined
Tue Dec 10, 2013 9:44 pm
Location - San Diego

Post by JNeuhoff » Thu Nov 02, 2023 6:02 am

Or just ask the webhost for the server's error log, for the time the 500 error occured.

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 khnaz35 » Thu Nov 02, 2023 2:48 pm

Are you useing VPS or dedicated server? Or its a shared hosting ?

HTTP 500 Internal Server Error is a generic error message indicating a server-side problem, and the cause can be various issues such as:
Server misconfigurations: Issues in your server configuration files.
Resource limitations: Insufficient memory or other resource limitations.
Faulty PHP code: Errors in the PHP scripts of your application.
File permissions: Incorrect permissions on PHP scripts or other required files.
PHP extensions: Missing or incompatible PHP extensions.
.htaccess issues: Incorrect or misconfigured .htaccess files.

And so on. Instead of simply reverting the changes, I recommend investigating the underlying issue that is causing the error. You can do this on your own or feel free to reach out to me via email or forum message for assistance.

Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by dragonfly-ie » Thu Nov 02, 2023 4:02 pm

Serves side seems to be ok, cause I have other URLs running perfectly.

IMO it's an php issue ...

My Error Log doesn't give much away, all I have is the following which occurred 3 days after error:500

2023-10-29 16:22:37 - PHP Unknown: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in ../system/storage/modification/catalog/model/catalog/product.php on line 56

Dum spiro spero.


User avatar
New member

Posts

Joined
Sat Nov 09, 2013 2:31 am


Post by khnaz35 » Thu Nov 02, 2023 4:05 pm

dragonfly-ie wrote:
Thu Nov 02, 2023 4:02 pm
2023-10-29 16:22:37 - PHP Unknown: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in ../system/storage/modification/catalog/model/catalog/product.php on line 56
Open the file from /system/storage/modification/catalog/model/catalog/product.php on line 56 and share here the block of code arround that line to understand why there is error.

Also what the php version and OC version you were using?

Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by JNeuhoff » Thu Nov 02, 2023 6:20 pm

It looks like your webhost has upgraded your PHP version to 8.0 or later, without letting you know, judging by the error message!

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 dragonfly-ie » Thu Nov 02, 2023 7:09 pm

JNeuhoff wrote:
Thu Nov 02, 2023 6:20 pm
It looks like your webhost has upgraded your PHP version to 8.0 or later, without letting you know, judging by the error message!
Wouldn't it be nice, if it were this easy ... lol. - No, I pay extra for v7.2 support.

But thanks, maybe it's time to upgrade my OC version.

Dum spiro spero.


User avatar
New member

Posts

Joined
Sat Nov 09, 2013 2:31 am


Post by dragonfly-ie » Thu Nov 02, 2023 7:19 pm

khnaz35 wrote:
Thu Nov 02, 2023 4:05 pm
Open the file from /system/storage/modification/catalog/model/catalog/product.php on line 56 and share here the block of code arround that line to understand why there is error.
Here's the line 56
'rating' => round($query->row['rating']),

but like I mentioned before this error happened long AFTER site crash...

Dum spiro spero.


User avatar
New member

Posts

Joined
Sat Nov 09, 2013 2:31 am


Post by paulfeakins » Thu Nov 02, 2023 7:39 pm

dragonfly-ie wrote:
Thu Nov 02, 2023 7:19 pm

Code: Select all

'rating'           => round($query->row['rating']),
For some reason $query->row['rating'] is null so perhaps your database isn't returning a row for rating?

You might need a developer to take a look really.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by dragonfly-ie » Thu Nov 02, 2023 7:50 pm

halfhope wrote:
Thu Nov 02, 2023 5:37 am
Hi!
Temporary add this lines into your .htaccess code to display startup errors:

Code: Select all

php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on 
Thanks, mate. This is what I get:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Dum spiro spero.


User avatar
New member

Posts

Joined
Sat Nov 09, 2013 2:31 am


Post by ADD Creative » Thu Nov 02, 2023 8:08 pm

As already been suggested, you would be best to ask your host for the server error log, if you don't see anything in the PHP or OpenCart error logs.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JNeuhoff » Thu Nov 02, 2023 8:51 pm

dragonfly-ie wrote:
Thu Nov 02, 2023 7:09 pm
JNeuhoff wrote:
Thu Nov 02, 2023 6:20 pm
It looks like your webhost has upgraded your PHP version to 8.0 or later, without letting you know, judging by the error message!
Wouldn't it be nice, if it were this easy ... lol. - No, I pay extra for v7.2 support.

But thanks, maybe it's time to upgrade my OC version.
You should check it. Just upload via FTP a little phpinfo.php script containing this:

Code: Select all

<?php phpinfo(); ?>
And then call it from your web browser, it will tell you all the PHP details, including the PHP version used.

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 paulfeakins » Fri Nov 03, 2023 8:10 pm

dragonfly-ie wrote:
Thu Nov 02, 2023 7:50 pm
halfhope wrote:
Thu Nov 02, 2023 5:37 am
Hi!
Temporary add this lines into your .htaccess code to display startup errors:

Code: Select all

php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on 
Thanks, mate. This is what I get:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
That obviously hasn't worked as intended because that's a generic server error, not the actual error.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by dragonfly-ie » Sun Nov 05, 2023 6:18 pm

My OC 2.2.x running on php7.2.36 was hacked through Custom Fields despite enabled Captcha.

I would advise anybody to avoid this feature >Customers >Custom Fields

HTH.

Dum spiro spero.


User avatar
New member

Posts

Joined
Sat Nov 09, 2013 2:31 am


Post by ADD Creative » Sun Nov 05, 2023 8:36 pm

dragonfly-ie wrote:
Sun Nov 05, 2023 6:18 pm
My OC 2.2.x running on php7.2.36 was hacked through Custom Fields despite enabled Captcha.

I would advise anybody to avoid this feature >Customers >Custom Fields

HTH.
How was your site attacked? Was it just a bot creating customer accounts or something else?

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by dragonfly-ie » Sun Nov 05, 2023 10:31 pm

Seems like they were humans. >:D

Hard to say. Just an uneducated guess, because I disabled Custom Fields a couple of weeks ago, and still kept getting sign-ups with Custom Fields showing in registration, which was very strange , to say the least.

Dum spiro spero.


User avatar
New member

Posts

Joined
Sat Nov 09, 2013 2:31 am

Who is online

Users browsing this forum: Google [Bot] and 139 guests