Post by sethioz » Mon Nov 08, 2021 7:44 am

Hi. I've been running OC 1.5 for a long time and today I wanted to upgrade it to latest version 2, but getting HTTP ERROR 500. I have solved this now, but I think mentioning previous issues and steps are useful in troubleshooting, so let me explain what I've done so far and where I'm at:

First I just got straight out HTTP ERROR 500 when I uploaded the /upload/ content on top of my current files
I fixed this, by changing "mysql" to "mysqli" in config.php (in root and admin root folders)
This allowed me to complete the upgrade process and I'm able to log into admin panel, however store itself is not working
site.com/shop = not working (HTTP ERROR 500)
site.com/shop/admin = working
Then I realized that dashboard in admin area is just blank, I fixed this by noticing that during upgrade, I lost my admin group permissions, so I had to re-enable them.. UGH... WHY?

So now the situation is that admin panel seem to be working perfectly fine, I can access and change everything, but main store page still gives HTTP ERROR 500. I'm quite sure it's something simple that I missed, like some permission issue or another "i" missing somewhere (because apperently it's so hard for upgrade script to just check and edit it).
Any ideas what to check / try? Please don't recommend new install, I'm already angry about losing all my theme changes as it is .. I've put years of work into fine-tuning theme to my liking and this upgrade just flushed it all down the toilet. I must be able to keep all my listed products. I hope someone has experienced such issue before and can point out what's gone wrong.
Any ideas are welcome, Thanks.


I also have Issue #2 (not very important, but would like to get it fixed aswell):
I have another installation which is OC 2.0.1.1 and I was able to get it from old server to a new one and it loads fine (both, shop and admin panel)
It had some minor issues with cached files, but I deleted those and it loads fine now, however there's very odd issue .. I'm unable to log into admin panel. I have never encountered such issue before.
Once I type in my username and pass and press enter, it just clears out the username and pass and nothing else happens, no errors, nothing at all.
Probably another permission issue? (yes, I'm 100% sure my user and pass are correct as it works fine in my old server).

Newbie

Posts

Joined
Thu Dec 11, 2014 2:18 am

Post by Cue4cheap » Mon Nov 08, 2021 10:53 am

sethioz wrote:
Mon Nov 08, 2021 7:44 am

HTTP ERROR 500.
First thing is to check the error log on the server (not OC admin). 500 should be logged and it'll tell what it is choking on.

Mike

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by sethioz » Mon Nov 08, 2021 11:58 pm

Cue4cheap wrote:
Mon Nov 08, 2021 10:53 am
sethioz wrote:
Mon Nov 08, 2021 7:44 am

HTTP ERROR 500.
First thing is to check the error log on the server (not OC admin). 500 should be logged and it'll tell what it is choking on.

Mike
could you plz be more specific, which error log are you referring to? I'm running CentOS 7 with ISPconfig panel, but I assume you're talking about apache/httpd error log?

Newbie

Posts

Joined
Thu Dec 11, 2014 2:18 am

Post by xxvirusxx » Tue Nov 09, 2021 12:36 am

Website URL?
Here or PM.

My Converted Modules | Opencart Upgrade Service | Free Dashboard Maps | Buy me a beer


User avatar
Expert Member

Posts

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

Post by sethioz » Tue Nov 09, 2021 12:47 am

xxvirusxx wrote:
Tue Nov 09, 2021 12:36 am
Website URL?
Here or PM.
I PMed you the URL, I rather not have it out in public. I also noticed that when I try to install (re-enable) vqmod, then it says some files are not writeable, but there's no indication to which ones, I don't think file permissions can cause error 500 tho, but thought it's worth mentioning.

Newbie

Posts

Joined
Thu Dec 11, 2014 2:18 am

Post by xxvirusxx » Tue Nov 09, 2021 1:10 am

You have disabled VQMOD extensions?
.htaccess file is still there?

My Converted Modules | Opencart Upgrade Service | Free Dashboard Maps | Buy me a beer


User avatar
Expert Member

Posts

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

Post by by mona » Tue Nov 09, 2021 1:20 am

How can website operators fix the 500 Internal Server Error?

Are your website visitors only seeing the 500 server error? As an operator, you should tackle the problem quickly because not only will this scare off your visitors, but it could also mean that Google will lower your ranking. Before you take action, first check whether your server is still running. If not, contact your hosting provider as soon as possible.

If there is an internal error, the first step is to view the log files. For Linux servers, the collection of error messages should be found at /var/log/httpd/error_log. It makes sense to reload the website to reproduce the HTTP error 500 code and observe how the log file is being created. This will help you find the source of the error quite quickly. Also consider which changes were made shortly before. In many cases, incorrectly programmed or incompatible plugins are the cause of error messages.

Errors can also occur if you have not set permissions correctly for important files. In general, there are three types of rights:

Read (r)
Write (w)
Execute (x)
These permissions can be assigned for three different user types:

Owner of the file
Group of users
All others
The rights are specified either in the abbreviations r, w, and x, or in corresponding numerical values: 4 for read, 2 for write, and 1 for execute. They are added for each user type and specified one after the other: rwxr-xr-x (rwx for the owner, r-x for the group, and r-x for all others) or 755. This configuration (755) should be the default setting. If the permission assignment is set differently, an error may occur. You can change this with a command:

chmod 755 filename
If this change does not solve the problem, you can also release all rights for each group for test purposes:

chmod 777 filename
But only use this setting to locate the problem. Any user is allowed to rewrite the file, which is understandably a security risk.

Next, check (if distributing the rights didn’t produce the error message) if your scripts are running correctly. Sometimes errors occur because the script files have been moved, renamed, or deleted. Also check the .htaccess file: even a syntax error – no matter how small – can cause an internal server error. An equally common error is incorrectly formatting the .htaccess file. This must be created in ASCII or ANSI format, not in Unicode. Therefore, write the file in a text editor such as Notepad, Notepad++, or Sublime Text, and not in a word processing program such as Microsoft Word. To test whether the file is responsible for the error, you can temporarily rename it and reload the website. The server now won’t access .htaccess when loading the website. If you no longer receive the error message, you can repair the file or create a new one.

A timeout can also lead to an error message. In this case, it isn’t a web server error, but rather an interrupted connection to an external source. Are PHP scripts on your website set to access resources from other servers? Perhaps the resource is no longer available or server communication is down for some other reason. One way to eliminate this source of error is of course to not make your site dependent on external resources. If this is not possible, you can increase the time limit of your script. It also makes sense to implement efficient error handling so that errors in the PHP script can be detected more accurately.

Could it be that the memory is overloaded? The memory limit determines how much memory a process may use. If more RAM is needed than is available, this could result in an internal server error. You can increase the limit as a temporary solution. To do this, add a command like this to php.ini:

memory_limit = 512M
In this example, you would set the memory provided to 512MB. Note, however, that your hosting provider will only allow you a certain PHP script limit within the package that you’ve booked. If you enter a higher value, the web server will ignore it. Raising the limit is only a temporary solution: once your site is up and running again, you should look for the reason for the high RAM usage. There is a high probability that the error can be found in the code of your website.

If none of these methods offer you a solution, it is a good idea to contact your hosting provider or a professional developer.
courtesy of ionos

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Active Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by sethioz » Tue Nov 09, 2021 2:50 am

sry but this is useless, I AM a professional developer and there's no hosting provider, I have VPS and I have full control over entire server. There's nothing wrong with it, I have already explained that admin panel works, therefore issue is specifically with OC. And I also mentioned that I have another OC, which is 2.0.1.1 and it loads fine (apart from being able to log into admin panel). So clearly nothing to do with server features or config. I have also worked with OC since like 2010 or so, I've merged, migrated, installed, modified ..etc lot of OC websites.

xxvirusxx wrote:
Tue Nov 09, 2021 1:10 am
You have disabled VQMOD extensions?
.htaccess file is still there?
yes/no, it became inactive after upgrade. in root folder it's .htaccess.txt and in /vqmod/ root it's .htaccess, but I just tried renaming them and still same.
Ok question to you:
If I'd delete everything and put new latest OC 2 /upload/ content in the folder and then put my old config.php files there, would that be all that I need to make the upgrade and not lose my products, sales ..etc? Ok actually now that I wrote it "out loud" it sounds kind of stupid, because my store has lot of custom images and downloads which are essential, but I don't see how any of them could cause error 500.
I also know that OC 1.5 uses different upload folders, could that be the issue?
Obviously it must be something left from my OC 1.5 that is causing the issue, but there are over 20000 files and going thru them one by one is not reasonable solution.
I still think it's something quite simple, just something in some file that is not compatible with PHP7

Do you think it would be worth trying to upgrade it on my old server? my old server runs OC 1.5 on PHP5. I also have OC 2.0.1.1 running on my old server and it works fine. So maybe it's just something that the upgrade process can't handle? I could try, but I rather see if someone has a solution here before I go wasting time on testing various upgrade options.

OR is there a way to get OC 1.5 working on PHP7? I saw someone mention something about encryption.php mod, but I didn't find anything specific. there was vqmod for it, but it didn't work. I would also need PayPal IPN to work (it doesn't work on my current one, so i have to manually confirm pending orders). Thanks.

Newbie

Posts

Joined
Thu Dec 11, 2014 2:18 am

Post by by mona » Tue Nov 09, 2021 3:10 am

Pity you did not bother to read it ..
If there is an internal error, the first step is to view the log files. For Linux servers, the collection of error messages should be found at /var/log/httpd/error_log. It makes sense to reload the website to reproduce the HTTP error 500 code and observe how the log file is being created. This will help you find the source of the error quite quickly. Also consider which changes were made shortly before. In many cases, incorrectly programmed or incompatible plugins are the cause of error messages.
Obviously it must be something left from my OC 1.5 that is causing the issue, but there are over 20000 files and going thru them one by one is not reasonable solution. I still think it's something quite simple, just something in some file that is not compatible with PHP7
PHP7 with OC1.5.6.4
viewtopic.php?t=210782
courtesy of google and IP_CAM

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Active Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by xxvirusxx » Tue Nov 09, 2021 3:40 am

sethioz wrote:
Tue Nov 09, 2021 2:50 am
I AM a professional developer
Hmm, then you should be able to fix it very fast :)

My Converted Modules | Opencart Upgrade Service | Free Dashboard Maps | Buy me a beer


User avatar
Expert Member

Posts

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

Post by sethioz » Tue Nov 09, 2021 4:24 am

by mona wrote:
Tue Nov 09, 2021 3:10 am
Pity you did not bother to read it ..
If there is an internal error, the first step is to view the log files. For Linux servers, the collection of error messages should be found at /var/log/httpd/error_log. It makes sense to reload the website to reproduce the HTTP error 500 code and observe how the log file is being created. This will help you find the source of the error quite quickly. Also consider which changes were made shortly before. In many cases, incorrectly programmed or incompatible plugins are the cause of error messages.
Obviously it must be something left from my OC 1.5 that is causing the issue, but there are over 20000 files and going thru them one by one is not reasonable solution. I still think it's something quite simple, just something in some file that is not compatible with PHP7
PHP7 with OC1.5.6.4
viewtopic.php?t=210782
courtesy of google and IP_CAM
I did read it, I forgot to mention that nothing shows up in the error log, there's some other warnings about other things that happened during installation of things, but I cleared the log and tried several things with OC and nothing shows up.
But yes I already know extensions can cause this, but how am I suppose to fix them if I don't know which file is causing the issue? I had some extensions/plugins, but nothing I can think of that could cause error 500. That means something is conflicting between server and website.


xxvirusxx wrote:
Tue Nov 09, 2021 3:40 am
sethioz wrote:
Tue Nov 09, 2021 2:50 am
I AM a professional developer
Hmm, then you should be able to fix it very fast :)
if you don't want to help, then just shut up. no need to show the kind of jerk you are. are you that stupid that you think every developer knows every cause from head? how stupid are you? I'm very insulted by your childish and jerkish comment, will report it.
I already explained only reason I ask here, is because I hope someone knows the exact reason and saves me lots of stress and time! but instead you're being a jerk!

Newbie

Posts

Joined
Thu Dec 11, 2014 2:18 am

Post by xxvirusxx » Tue Nov 09, 2021 4:46 am

sethioz wrote:
Tue Nov 09, 2021 4:24 am
you think every developer knows every cause from head?
No. But should be able to use google or to debug something...

https://isenselabs.com/posts/500-intern ... r-opencart

And if you can't fix yourself you have option to post on Commercial section and pay a developer to fix for you
viewforum.php?f=88

My Converted Modules | Opencart Upgrade Service | Free Dashboard Maps | Buy me a beer


User avatar
Expert Member

Posts

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

Post by OSWorX » Tue Nov 09, 2021 3:08 pm

sethioz wrote:
Tue Nov 09, 2021 4:24 am
xxvirusxx wrote:
Tue Nov 09, 2021 3:40 am
sethioz wrote:
Tue Nov 09, 2021 2:50 am
I AM a professional developer
Hmm, then you should be able to fix it very fast :)
if you don't want to help, then just shut up.
Calm down - quickly!

As it looks, you try to be the good "boy", while all others here the bad ones.
After a few posts of you, it is clear that you don't know anything.
The simplest task a "server admin" should know, how to read the server logs.
And server log is another story than the log of OpenCart.

Next, an error 500 means in 99% of all cases an php-error.
So, simply enable full error reporting and you will see what's causing the error.

Finally, if you are not able to fix such an easy task, hire a professional.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by sethioz » Wed Nov 10, 2021 12:58 am

OSWorX wrote:
Tue Nov 09, 2021 3:08 pm
sethioz wrote:
Tue Nov 09, 2021 4:24 am
xxvirusxx wrote:
Tue Nov 09, 2021 3:40 am


Hmm, then you should be able to fix it very fast :)
if you don't want to help, then just shut up.
Calm down - quickly!

As it looks, you try to be the good "boy", while all others here the bad ones.
After a few posts of you, it is clear that you don't know anything.
The simplest task a "server admin" should know, how to read the server logs.
And server log is another story than the log of OpenCart.

Next, an error 500 means in 99% of all cases an php-error.
So, simply enable full error reporting and you will see what's causing the error.

Finally, if you are not able to fix such an easy task, hire a professional.
I'm just going to ignore you from now on, clearly you have nothing smart to say and you're only here to talk down on those who are trying to figure something out. If you don't have solution to topic, then don't ruin it with your trash. thank you for not understanding.


As to those who are actually trying to help, I'm trying the encryption.php method mentioned above, but I'm having some other issue that isn't mentioned in that other topic. I edited encryption.php and changed "mysql" to "mysqli" in config.php files, but now it says "Error: Could not load database file mysqli!"
I suspect there's some other file where it needs to be changed, any ideas?

Newbie

Posts

Joined
Thu Dec 11, 2014 2:18 am

User avatar
Expert Member

Posts

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

Post by alexmorco » Sat Nov 27, 2021 7:55 pm

Have you checked the error log on the server? I've never experienced such an error myself, but I'd recommend getting in touch with your hosting provider (if you're using one). I am hosted with Cloudways, and these guys are fairly intuitive when stamping out such errors. However, again, I'd reiterate that I haven't encountered such technical details.

Newbie

Posts

Joined
Wed Jan 31, 2018 6:43 pm

Post by by mona » Sat Nov 27, 2021 10:49 pm

Hi Alexmorco

Not the best promotion for your organisation.

Your posts serve only to repeat the answers that have already been provided and a plug for your organisation. They offer nothing in that way of assistance nor show any knowledge of Opencart or that you, as a host, are able to assist any of the issues posted.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Active Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: No registered users and 5 guests