Post by richardman » Sat Dec 09, 2023 8:21 am

Hello, I suspect I have a cache problem. To begin, I am very comfortable with Linux command line and Linux environment.

I am moving an OC3 based site from a CentOS 7 Virtual host to a Ubuntu 22.04 vhost. The old site uses PHP7.3. I have enabled PHP7.4 on the new host since I read that there might be incompatibility with PHP8.1 (the default)

I understand that the basic steps are
  • Copy the public_html/ and storage/ files over
  • mysqldump and restore database
  • adjust public_html/config.php and public_html/admin/config.php
  • clear the cache
On my old site, before I transfer the files, I have cleared the Extensions->Modifications cache, and also Dashboard->upper right gear->theme /SASS cache. On the new site, I also clear storage/cache public_html/vqmod/vqcache

First of all, the new site spills a bunch of errors

Code: Select all

Unknown: mysqli::real_escape_string(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/canusbshop.com/public_html/system/library/db/mysqli.php on line 45Unknown: The Twig_Autoloader class is deprecated since version 1.21 and will be removed in 2.0. Use Composer instead. in /var/www/canusbshop.com/public_html/system/library/template/Twig/Autoloader.php on line 12Unknown: Using Twig_Autoloader is deprecated since version 1.21. Use Composer instead. in /var/www/canusbshop.com/public_html/system/library/template/Twig/Autoloader.php on line 30Unknown: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /var/www/canusbshop.com/public_html/system/library/template/Twig/Lexer.php on line 176Unknown: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /var/www/canusbshop.com/public_html/system/library/template/Twig/Lexer.php on line 180Unknown: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /var/www/canusbshop.com/public_html/system/library/template/Twig/Lexer.php on line 200Unknown: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in
but I don't think that is the source of my problem. Then the text of the site shows up, but without graphics and unusable. <new site>/admin shows the same thing.

I think it's a cache problem. Can someone think of other places that I need to fix?

You can also email me at richard @imagecraft.com. Thanks

Newbie

Posts

Joined
Sat Sep 19, 2015 6:47 pm

Post by richardman » Sat Dec 09, 2023 11:44 am

OK, things have gotten better. One issue was that I did not enabled Let's Encrypt on the new site because I was still testing, but I guess internally there are a lot of references to https://<site> so it acted weird. I temporarily switched the DNS, and enabled Certbot, and now everything shows up!

Unfortunately, all the crud warning about the Twig still appears so there are two three pages of crud, then I see the page :-)

Any ideas?

Newbie

Posts

Joined
Sat Sep 19, 2015 6:47 pm

Post by richardman » Sat Dec 09, 2023 12:10 pm

Sorry for spamming the forum :-) Turning off System->Settings->Store->Server ->Display Error got rid of all but one line of errors on top

Unknown: mysqli::real_escape_string(): Passing null to parameter #1 ($string) of type string is deprecated in

/var/www/canusbshop.com/public_html/system/library/db/mysqli.php on line 45
Supposedly it's PHP8.1 problem, but I even removed PHP8.1 and it still acts the same, so I just edited the file per

https://github.com/opencart/opencart/co ... 76e934b75e

EVerything seems to work now! Thank you for reading.

Newbie

Posts

Joined
Sat Sep 19, 2015 6:47 pm

Post by ADD Creative » Sun Dec 10, 2023 6:27 am

Use phpinfo() in your OpenCart directory, this will tell you what version of PHP it's using.

www.add-creative.co.uk


Guru Member

Posts

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

Post by richardman » Sun Dec 10, 2023 7:37 am

Oh, I know it's PHP 7.4 for sure. Anyway, everything is working great now. I had to fight the mail portion, but all OK. Thanks

Newbie

Posts

Joined
Sat Sep 19, 2015 6:47 pm

Post by ADD Creative » Sun Dec 10, 2023 5:43 pm

If you were on 7.4 you wouldn't get the error you posted. That error was only introduced in PHP 8.1. It's possible your web server is using a different version of PHP than the rest of the system.

www.add-creative.co.uk


Guru Member

Posts

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

Post by richardman » Mon Dec 11, 2023 6:10 am

Thanks! You are correct. Apache2 is still using php8.1 even though I uninstall it. I changed it to php7.4, but now I'm getting the "VQMod::bootup - ERROR - YOU NEED THE PHP "DOMDocument" EXTENSION INSTALLED TO USE VQMod" error.

I'm going to just patch the OC files to be compatible with PHP8.0. I did one already. Thanks

Newbie

Posts

Joined
Sat Sep 19, 2015 6:47 pm
Who is online

Users browsing this forum: No registered users and 6 guests