Page 1 of 1

Migration to new server -Shop super slow

Posted: Sun Sep 02, 2018 7:42 am
by paradoxx
Hi everyone,

I migrated my shop to a better hosting offer within my Hosting provider. My problem now is that the shop is extremely slow, sometimes the customers get a Bad Gateway error or simply takes ages to load.

I contacted the support and they told me that is because the PHP that Im using (5.6.36) is not working well with the new server. They recommended me to upgrade PHP. If I set another PHP Version inside Plex, like 7.2.9, the Shop is automatically dead. White page on Frontend and backend.
After setting it again back, I selected PHP 7 and there only the backend worked, the frontend is gone.

On my old server was running pretty good without any changes, now on this server I have been optimizin several stuff to make it faster but nothing, Im losing sales.

Do you guys have any Idea on how to know what is slowing down the server? Could it really be a incompatibility with PHP that is causing this?

Here are some errors that I took out from the logs:

1. (32)Broken pipe: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function

2. mod_fcgid: stderr: PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in

For point #2 I changed the config files to run with mysqli, but when I change it for Admin, the backend is not loading, I get only a white site. I have no idea why is not working like the frontend.

If you guys have any clue, I would appreciate your help.

Re: Migration to new server -Shop super slow

Posted: Sun Sep 02, 2018 9:44 am
1. Remove / Disable all the VqMod Extensions, since one of them might hinder OC to work on PHP 7.x
2. Upload the two system/.... Files, contained in the ZIP File enclosed, to make OC v.1.5.6.x work with PHP-7.x
3. Set BOTH config.php File Lines to : define('DB_DRIVER', 'mysqli'); ONLY!
4. If you want to newly install OC, use the PHP-7.x Install Code, but FIRST change the Links in the two Files, as shown in the image enclosed.
5. Some VqMod Extensions and/or Modules might no longer function with PHP v.7.x.
STILL, under normal circumstances, there is no remarkable slow-down with v.1.5.6.x,
if it run's under PHP v.5.6.x, compared to PHP v.7.x, just to have this mentioned too.
Good Luck! ;)

Re: Migration to new server -Shop super slow

Posted: Sun Sep 02, 2018 8:21 pm
by straightlight
A bit overthought about the encryption class. This solution could also be used: viewtopic.php?f=198&t=204707&p=725370#p725077

In case the required openssl_random_pseudo_bytes() function has not been instantiated on your server: ... eudo-bytes .

AES256-CTR provides only unauthenticated encryption, which is almost never what you want. You need authenticated encryption.
Source: ... -correctly

In addition, providing bcrypt solutions can also create password leaks as I do not suggest using it with any of the AES-256 algorithm: ... ion-vector
You don't process the password. Right now, if a ciphertext gets leaked, I could just go ahead and try to brute-force the user's password, because you deployed no counter-measures to password guessing (like using bcrypt).

Re: Migration to new server -Shop super slow

Posted: Tue Sep 04, 2018 4:53 am
by paradoxx
Thank you both for your answers, I really really appreciate your help.
I'm replicating the shop in a VM so I can try your suggestions there without sweating it ;)

Ernie, now that you mentioned the DB driver, I had that once changed to mysqli and when I set both config files to mysqli, the front end works, but the backend does not, just plain white.

Re: Migration to new server -Shop super slow

Posted: Tue Sep 04, 2018 5:05 am
Well, then leave the Admin Section running under mysql, as long as it does, and start
to disable your Modules and VqMods, until you're down to a more or less default Admin.
Then, you might find out, where it blocks the Admin from further Access, if Admin starts
to function with PHP 7.
STILL, you better try a PHP 7.0.x or 7.1.x Version first, before you start to work on this.
Good Luck!

Re: Migration to new server -Shop super slow

Posted: Tue Oct 16, 2018 4:04 pm
by paradoxx
Hi, just coming back for an update.

In the end, it was not about my PHP version, opencart Version or even the mysql driver. It was about the amount of ram that the provider had on this new "improved" server. From my point of view a very rookie performance. They installed more ram on that thing and the shop is running like before.
Either way I did some of the solutions you guys gave me so I have improved :)