PHP8 Fatal error

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
MantaPro
Forum Members
Forum Members
Posts: 97
Joined: Sun Feb 03, 2008 8:14 pm

PHP8 Fatal error

Post by MantaPro »

PHP8.0
CMSMS 2.2.16

config.php debug = TRUE
php.ini display_errors=on
php.ini error_reporting = E_ALL

causes CMSMS to crash with error
Fatal error: Uncaught TypeError: error_reporting(): Argument #1 ($error_level) must be of type ?int, string given in /homepages/38/d242029264/htdocs/acuk_cmsms2/lib/smarty/sysplugins/smarty_internal_templatebase.php:185 Stack trace: #0 /homepages/38/d242029264/htdocs/acuk_cmsms2/lib/smarty/sysplugins/smarty_internal_templatebase.php(185): error_reporting('E_ALL') #1 /homepages/38/d242029264/htdocs/acuk_cmsms2/lib/smarty/sysplugins/smarty_internal_templatebase.php(107): Smarty_Internal_TemplateBase->_execute(Object(CMS_Smarty_Template), 'p9', NULL, NULL, 0) #2 /homepages/38/d242029264/htdocs/acuk_cmsms2/lib/classes/internal/class.CMS_Smarty_Template.php(20): Smarty_Internal_TemplateBase->fetch(NULL, 'p9', NULL, NULL) #3 /homepages/38/d242029264/htdocs/acuk_cmsms2/index.php(151): CMS_Smarty_Template->fetch() #4 {main} thrown in /homepages/38/d242029264/htdocs/acuk_cmsms2/lib/smarty/sysplugins/smarty_internal_templatebase.php on line 185




----------------------------------------------

Cms Version: 2.2.16

Installed Modules:

AdminSearch: 1.0.6
CMSContentManager: 1.1.9
CMSMSExt: 1.1.0.1
CmsJobManager: 0.1.3
DesignManager: 1.1.9
ECB2: 1.99.4
FileManager: 1.6.12
FilePicker: 1.0.5
JMFilePicker: 1.0.1
LISE: 1.4.2
LISECHReviews: 1.4.2
LISEHomes: 1.4.2
LISEWelcomeBanner: 1.4.2
MenuManager: 1.50.3
MicroTiny: 2.2.5
ModuleManager: 2.1.8
Navigator: 1.0.9
News: 2.51.11
Search: 1.53
SitemapMgr: 1.7.1
SmartyExt: 1.0
UserGuide2: 1.4.1


Config Information:

php_memory_limit:
max_upload_size: 10000000
url_rewriting: none
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Europe/London
permissive_smarty: true


Php Information:

phpversion: 8.0.23
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 22519
E_STRICT: 0
E_DEPRECATED: 0
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 32M
max_execution_time: 60
register_globals: Off (False)
output_buffering: 1
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 10M
upload_max_filesize: 10M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On


Performance Information:

allow_browser_cache: Off (False)
browser_cache_expiry: 60
php_opcache: Off (False)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
auto_clear_cache_age: On (True)

Server Information:

Server Software: Apache
Server Api: cgi-fcgi
Server Os: Linux 4.4.302-icpu-088 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 5.7.38
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable


Permission Information:

tmp: /homepages/38/d242029264/htdocs/acuk_cmsms2/tmp (0705)
tmp_cache: /homepages/38/d242029264/htdocs/acuk_cmsms2/tmp/cache (0705)
templates_c: /homepages/38/d242029264/htdocs/acuk_cmsms2/tmp/templates_c (0705)
modules: /homepages/38/d242029264/htdocs/acuk_cmsms2/modules (0705)
uploads: /homepages/38/d242029264/htdocs/acuk_cmsms2/uploads (0705)
File Creation Mask (umask): /homepages/38/d242029264/htdocs/acuk_cmsms2/tmp/cache (0705)
config_file: 0644

----------------------------------------------
jce76350
Beta Tester
Beta Tester
Posts: 2023
Joined: Mon May 29, 2006 1:20 pm
Location: Rouen

Re: PHP8 Fatal error

Post by jce76350 »

What is your Smarty version ?
If it is 3.1.4, so this is a very OLD version with many Security alerts ;) max PHP 7.x
- https://github.com/smarty-php/smarty/tree/support/3.1
- https://github.com/smarty-php/smarty/bl ... ANGELOG.md
For PHP 7.1 to PHP 8.1. use Smarty 4
https://github.com/smarty-php/smarty/tags
Jean-Claude Etiemble
MantaPro
Forum Members
Forum Members
Posts: 97
Joined: Sun Feb 03, 2008 8:14 pm

Re: PHP8 Fatal error

Post by MantaPro »

Hi Jean-Claude Etiemble

Thanks for your suggestion - it is stock CMSMS2.2.16 + a few modules.

CMSMS2.216 includes Smarty 3.1.31, not Smarty4.0 - I thought that CMSMS2.216 was supposed to be PHP8.0 ready ????. PHP7.4 is only 1 month away from end of life ( https://www.php.net/supported-versions.php ) and various Hosting Company's cease to provide PHP7.4 at the end of this year. So CMSMS2.2.16 will soon be unusable ?

We should all upgrade Smarty4 within CMSMS2.2.16 - shouldn't the Dev Team do the next release of CMSMS to include a PHP8 capable version of Smarty ?

Regards
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: PHP8 Fatal error

Post by DIGI3 »

This specific issue is caused by debug mode and needs to be fixed, of course it isn't the user's responsibility to replace the Smarty version. We are working on new releases (2.2.17 and beyond) as best as we can.

For specific, reproducible issues like this it's best to file a bug report. I have done so at http://dev.cmsmadesimple.org/bug/view/12565
Not getting the answer you need? CMSMS support options
MantaPro
Forum Members
Forum Members
Posts: 97
Joined: Sun Feb 03, 2008 8:14 pm

Re: PHP8 Fatal error

Post by MantaPro »

Thanks DIGI3

I did in fact look for a link to the bug reporting for the core (I know how to navigate to bug reporting for modules) but I failed to find a link to bug reporting for the core - so thanks for that.

And thanks to all of the Dev team, testers and translators for your excellent efforts

And yes, other than debug, all my testing on PHP8 has worked fine.

Regards
MantaPro
Forum Members
Forum Members
Posts: 97
Joined: Sun Feb 03, 2008 8:14 pm

Re: PHP8 Fatal error

Post by MantaPro »

question for the Dev Team

I see that the bug has been fixed in the forge - is the fix (which I assume will be bundled in to 2.2.17) going to be released before the end of 2022 because PHP7.x ceases to be supported end of 2022 and this bug means that 2.2.16 can not be run in debug mode at all from Jan 1, 2023 ?

thanks for all your efforts
Post Reply

Return to “CMSMS Core”