Page 1 of 1

[SOLVED] opencart 3.0.3.6 and php 7.4

Posted: Tue Oct 06, 2020 4:15 pm
by scratch21
Hello
I did an installation of Opencart 3.0.3.6 and i tried to use Php 7.4.10 but i get a message that is not compatible and i have to use Php 7.3 .
Any idea when this is going to be fixed?
Thank you in advanced

Re: opencart 3.0.3.6 and php 7.4

Posted: Tue Oct 06, 2020 4:27 pm
by JNeuhoff
Without further details nobody will be able to help you. OpenCart 3.0.3.6 works just fine for PHP 7.4

Re: opencart 3.0.3.6 and php 7.4

Posted: Tue Oct 06, 2020 5:19 pm
by scratch21
Hello
Here are the details
Clean installation Opencart 3.0.3.6 , try to use Php 7.4.10 and get the following message
Unsupported PHP Version
Opencart 3.0.3.6 does not fully support PHP 7.4.10 version!

Consult with your hosting provider for more information regarding how to downgrade PHP to 7.3 (or lower).
If I return to Php 7.3.22 everything works ok
Thank you in advanced

Re: opencart 3.0.3.6 and php 7.4

Posted: Tue Oct 06, 2020 5:46 pm
by JNeuhoff
This is something for your webhost to sort out. Your error message 'Unsupported PHP Version' does not come from OpenCart. All OpenCart does is this in the system/startup.php:

Code: Select all

// Check Version
if (version_compare(phpversion(), '7.3.0', '<') == true) {
	exit('PH7.3+ Required');
}
And OpenCart 3.0.3.6 works just fine with a properly installed PHP 7.4.x release.

Re: opencart 3.0.3.6 and php 7.4

Posted: Tue Oct 06, 2020 5:52 pm
by OSWorX
scratch21 wrote:
Tue Oct 06, 2020 5:19 pm
Unsupported PHP Version
Opencart 3.0.3.6 does not fully support PHP 7.4.10 version!
Such a message does not exist in a standard and original OpenCart Installation.
Installed that version for a client 1 hour ago, php 7.4.x - and worked as it should.

From where do you have the OpenCart Files?

Re: opencart 3.0.3.6 and php 7.4

Posted: Tue Oct 06, 2020 5:53 pm
by OSWorX
JNeuhoff wrote:
Tue Oct 06, 2020 5:46 pm
This is something for your webhost to sort out. Your error message 'Unsupported PHP Version' does not come from OpenCart. All OpenCart does is this in the system/startup.php:

Code: Select all

// Check Version
if (version_compare(phpversion(), '7.3.0', '<') == true) {
	exit('PH7.3+ Required');
}
And OpenCart 3.0.3.6 works just fine with a properly installed PHP 7.4.x release.
It ha a second validation inside the step_2.php:

Code: Select all

private function validate() {
		if (phpversion() < '7.3') {
			$this->error['warning'] = $this->language->get('error_version');
		}

Re: opencart 3.0.3.6 and php 7.4

Posted: Tue Oct 06, 2020 6:16 pm
by scratch21
Hello
The issue was created from Journal theme when I return to the default theme it worked fine with php 7.4.10 , i contact Journal support and informed them for the error.
Thank you very much for the answers

Re: opencart 3.0.3.6 and php 7.4

Posted: Tue Oct 06, 2020 6:19 pm
by xxvirusxx
If you have used forum search :)

viewtopic.php?f=10&t=220290#p801146

Re: opencart 3.0.3.6 and php 7.4

Posted: Tue Oct 06, 2020 6:43 pm
by scratch21
xxvirusxx wrote:
Tue Oct 06, 2020 6:19 pm
If you have used forum search :)

viewtopic.php?f=10&t=220290#p801146
Thank you very much for the help

Re: opencart 3.0.3.6 and php 7.4

Posted: Tue Oct 06, 2020 6:55 pm
by JNeuhoff
Clean installation Opencart 3.0.3.6
Well, that was anything but a clean installation :)

Journal3 is one of the worst OpenCart extensions, it's not a proper standard-compliant theme!

Re: opencart 3.0.3.6 and php 7.4 (Journal)

Posted: Tue Oct 06, 2020 7:27 pm
by OSWorX
scratch21 wrote:
Tue Oct 06, 2020 6:16 pm
Hello
The issue was created from Journal theme when I return to the default theme it worked fine with php 7.4.10 ..
One MORE reason to state in your 1st post what all you are using!
And this Theme is NOT supported here.

Re: [SOLVED] opencart 3.0.3.6 and php 7.4 (Journal)

Posted: Sat Nov 21, 2020 12:04 am
by akbartahir
simply open Cpanel given by your host and change PHP version from 7.4 to 7.3 .. simple

Re: [SOLVED] opencart 3.0.3.6 and php 7.4 (Journal)

Posted: Sat Nov 21, 2020 12:42 am
by OSWorX
akbartahir wrote:
Sat Nov 21, 2020 12:04 am
simply open Cpanel given by your host and change PHP version from 7.4 to 7.3 .. simple
Simple is what YOU mean it's simple!
But it is NOT, what for do you think php 7.4.x was published - and 8.x will be published soon.

Re: opencart 3.0.3.6 and php 7.4

Posted: Sun Jan 17, 2021 7:57 pm
by SVN
scratch21 wrote:
Tue Oct 06, 2020 6:16 pm
Hello
The issue was created from Journal theme when I return to the default theme it worked fine with php 7.4.10 , i contact Journal support and informed them for the error.
Thank you very much for the answers
Did you get an answer ?
What was the solution, I have the same problem.
If I put it back to 7.3 I get an error.

Warning: mysqli::__construct(): (HY000/1045): Access denied for user '***'@'localhost-mysql' (using password: YES) in /home/users/***/system/library/db/mysqli.php on line 7
Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/users/***/system/library/db/mysqli.php on line 10
Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/users/***/system/library/db/mysqli.php on line 10
Fatal error: Uncaught Exception: Error: <br />Error No: in /home/users/***/system/library/db/mysqli.php:10 Stack trace: #0 /home/users/***/storage/modification/system/library/db.php(35): DB\MySQLi->__construct('mysqlhost.jouwd...', '***', '***', '***', '3306') #1 /home/users/***/system/framework.php(80): DB->__construct('mysqli', '***', '***', '***', 'D3196030', '3306') #2 /home/users/***/system/startup.php(104): require_once('/home/users/A00...') #3 /home/users/***/index.php(19): start('catalog') #4 {main} thrown in /home/users/***/system/library/db/mysqli.php on line 10

Re: [SOLVED] opencart 3.0.3.6 and php 7.4

Posted: Sun Jan 17, 2021 8:26 pm
by JNeuhoff
@SVN: You issue is with the DB connection, nothing to do with the problem discussed in this thread. Don't hijack this threat, open a new topic for this.

Re: [SOLVED] opencart 3.0.3.6 and php 7.4

Posted: Sun Jan 17, 2021 8:47 pm
by SVN
JNeuhoff wrote:
Sun Jan 17, 2021 8:26 pm
@SVN: You issue is with the DB connection, nothing to do with the problem discussed in this thread. Don't hijack this threat, open a new topic for this.
I think this is related because I got the PHP error after updating Journal Theme. I think normaly Journal does not affect core files of OC.
I put PHP back to 7.3 and than the error was visible.

Re: [SOLVED] opencart 3.0.3.6 and php 7.4

Posted: Sun Jan 17, 2021 9:05 pm
by JNeuhoff
Well your DB connection issue is a separate one. And with regards to Journal3: The latter modifies OC core engine files that's one of the reasons why it's such a poor-quality theme, there is no need for a web theme to use its own framework.

With regards to the PHP version issue, follow the advice given on this form thread, or get in touch with the Journal-support, or use a standard-compliant web theme.