PHP Version: 8.0.0 upgraded to PHP Version: 8.0.25 - Front end down work
Good day,
I have upgraded the PHP version on my shared server from 8.0.0 to 8.0.25.
I am still able to log into the backend (http://ccfsecuritysystems.co.za/zcadmin) but the front-end is broken (https://ccfsecuritysystems.co.za/). I just get a blank page.
Zen Cart 1.5.7c
Database Patch Level: 1.5.7c
Server OS: Linux 4.18.0-372.32.1.lve.el8.x86_64
HTTP Server: LiteSpeed
PHP Version: 8.0.25 (Zend: 4.0.25)
Database Engine: MySQL 10.4.27-MariaDB-cll-lve
Is there anything I need to change on my Zencart installation or should I revert back to PHP version: 8.0.0?
Re: PHP Version: 8.0.0 upgraded to PHP Version: 8.0.25 - Front end down work
Quote:
Originally Posted by
ChrisFourie
Good day,
I have upgraded the PHP version on my shared server from 8.0.0 to 8.0.25.
I am still able to log into the backend (
http://ccfsecuritysystems.co.za/zcadmin) but the front-end is broken (
https://ccfsecuritysystems.co.za/). I just get a blank page.
Zen Cart 1.5.7c
Database Patch Level: 1.5.7c
Server OS: Linux 4.18.0-372.32.1.lve.el8.x86_64
HTTP Server: LiteSpeed
PHP Version: 8.0.25 (Zend: 4.0.25)
Database Engine: MySQL 10.4.27-MariaDB-cll-lve
Is there anything I need to change on my Zencart installation or should I revert back to PHP version: 8.0.0?
When you get that blank screen, it's an indication of a PHP error. Check your /logs directory (or via the Display Logs plugin in the admin) to see what's been reported.
Post the contents of one of the logs here, using the "CODE" tags (the big # in the menu-bar when you write your response).
Re: PHP Version: 8.0.0 upgraded to PHP Version: 8.0.25 - Front end down work
Thanks for the response. Herewith the PHP Fatal Error in the logs:
Code:
[15-Feb-2023 19:40:20 Africa/Johannesburg] Request URI: /, IP address: 102.165.201.1
--> PHP Fatal error: Uncaught TypeError: floor(): Argument #1 ($num) must be of type int|float, string given in /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/plugins/riCjLoader/RiCjLoaderPlugin.php:455
Stack trace:
#0 /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/plugins/riCjLoader/RiCjLoaderPlugin.php(455): floor()
#1 /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/includes/templates/yourstore/common/html_header.php(98): RiCjLoaderPlugin->loadCssJsFiles()
#2 /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/index.php(42): require('/home/ccfsecur/...')
#3 {main}
thrown in /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/plugins/riCjLoader/RiCjLoaderPlugin.php on line 455.
Line 455:
$browser_version = floor($browser->getVersion());
Re: PHP Version: 8.0.0 upgraded to PHP Version: 8.0.25 - Front end down work
#0 /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/plugins/riCjLoader/RiCjLoaderPlugin.php(455): floor()
Code:
$browser_version = floor($browser->getVersion());
#1 /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/includes/templates/yourstore/common/html_header.php(98): RiCjLoaderPlugin->loadCssJsFiles()
Code:
$RI_CJLoader->loadCssJsFiles();
#2 /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/index.php(42): require('/home/ccfsecur/...')
Code:
require($template->get_template_dir('html_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/html_header.php');
Re: PHP Version: 8.0.0 upgraded to PHP Version: 8.0.25 - Front end down work
Quote:
Originally Posted by
ChrisFourie
Thanks for the response. Herewith the PHP Fatal Error in the logs:
Code:
[15-Feb-2023 19:40:20 Africa/Johannesburg] Request URI: /, IP address: 102.165.201.1
--> PHP Fatal error: Uncaught TypeError: floor(): Argument #1 ($num) must be of type int|float, string given in /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/plugins/riCjLoader/RiCjLoaderPlugin.php:455
Stack trace:
#0 /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/plugins/riCjLoader/RiCjLoaderPlugin.php(455): floor()
#1 /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/includes/templates/yourstore/common/html_header.php(98): RiCjLoaderPlugin->loadCssJsFiles()
#2 /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/index.php(42): require('/home/ccfsecur/...')
#3 {main}
thrown in /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/plugins/riCjLoader/RiCjLoaderPlugin.php on line 455.
Line 455:
$browser_version = floor($browser->getVersion());
When I had this issue I replaced line 455 with,
Code:
$browser_version = floor((int)$browser->getVersion());
This was based on little knowledge of PHP so may not be wholly correct but it seems to work for me.
Re: PHP Version: 8.0.0 upgraded to PHP Version: 8.0.25 - Front end down work
Thank you Simon,
It worked but I still had another small issue.
[15-Feb-2023 21:04:05 Africa/Johannesburg] Request URI: /, IP address: 102.165.201.1
--> PHP Fatal error: Uncaught Error: Undefined constant "SSL" in /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/includes/languages/english/html_includes/yourstore/define_footer_v2.php:8
Stack trace:
#0 /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/includes/templates/yourstore/common/tpl_footer.php(37): include()
#1 /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/includes/templates/yourstore/common/tpl_main_page.php(346): require('/home/ccfsecur/...')
#2 /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/index.php(94): require('/home/ccfsecur/...')
#3 {main}
thrown in /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/includes/languages/english/html_includes/yourstore/define_footer_v2.php on line 8.
Code:
<div class="footer-logo hidden-xs">
<!-- Logo -->
<a class="logo" href="<?php echo zen_href_link(FILENAME_DEFAULT, '', 'SSL'); ?>"> <img alt="<?php if($logo_image!=NULL){ echo "logo"; } ?>" src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE, $current_page_base,'images').'/uploads/'.$logo_image;?>" /> </a>
<!-- /Logo -->
</div>
I just placed the SSL between single ' ' and then it worked.
Re: PHP Version: 8.0.0 upgraded to PHP Version: 8.0.25 - Front end down work
Quote:
Originally Posted by
ChrisFourie
I have upgraded the PHP version on my shared server from 8.0.0 to 8.0.25.
Quote:
Originally Posted by
ChrisFourie
Code:
[15-Feb-2023 19:40:20 Africa/Johannesburg] Request URI: /, IP address: 102.165.201.1
--> PHP Fatal error: Uncaught TypeError: floor(): Argument #1 ($num) must be of type int|float, string given in /home/ccfsecur/domains/ccfsecuritysystems.co.za/public_html/plugins/riCjLoader/RiCjLoaderPlugin.php:455
Line 455:
$browser_version = floor($browser->getVersion());
the function floor has not changed from php 8.0.0 to 8.0.25. so reverting it back should not resolve your problem.
the RiCjLoader has not been updated in quite some time. or at least i have not seen an update. nor have i ever seen any browser specific css or js files; which is what the var $bowser_version is doing.
simon1066's solution certainly will work. i just removed the floor from my clients site who make use of it. ie:
Code:
$browser_version = $browser->getVersion();
hope that helps.