PHP 8.2 and later

Post

Posted
Rating:
#7616 (In Topic #1920)
With fresh install of v11, using PHP 8.2 or later, we get a ton of:

Example

Deprecated: Creation of dynamic property Tempcode::$is_all_static is deprecated in /home/witches/public_html/sources/tempcode.php on line 1707
Deprecated: Creation of dynamic property Tempcode::$is_all_static is deprecated in /home/witches/public_html/sources/tempcode.php on line 1707
Deprecated: Creation of dynamic property Tempcode::$pure_lang is deprecated in /home/witches/public_html/sources/tempcode.php on line 314
Deprecated: Creation of dynamic property Tempcode::$is_all_static is deprecated in /home/witches/public_html/sources/tempcode.php on line 1707
Deprecated: Creation of dynamic property Tempcode::$is_all_static is deprecated in /home/witches/public_html/sources/tempcode.php on line 1707


And this leads to: Dynamic Properties are deprecated - PHP 8.2 • PHP.Watch

There may be a PHP.ini setting to defeat this, but as of PHP 9+, these will be fatal errors.



 

Post

Posted
Rating:
#7622
Noted. However, v11 does not support PHP 9 as PHP 9 has not yet been released. I don't think it will (or if it does, it'll probably be a later minor version like 11.1).

You can disable those errors under Setup → Configuration → Site options → Error handling

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by Adam Edington)
#7710

Malatesa said

With fresh install of v11, using PHP 8.2 or later, we get a ton of:

Example

Deprecated: Creation of dynamic property Tempcode::$is_all_static is deprecated in /home/witches/public_html/sources/tempcode.php on line 1707
Deprecated: Creation of dynamic property Tempcode::$is_all_static is deprecated in /home/witches/public_html/sources/tempcode.php on line 1707
Deprecated: Creation of dynamic property Tempcode::$pure_lang is deprecated in /home/witches/public_html/sources/tempcode.php on line 314
Deprecated: Creation of dynamic property Tempcode::$is_all_static is deprecated in /home/witches/public_html/sources/tempcode.php on line 1707
Deprecated: Creation of dynamic property Tempcode::$is_all_static is deprecated in /home/witches/public_html/sources/tempcode.php on line 1707


And this leads to: Dynamic Properties are deprecated - PHP 8.2 • PHP.Watch

There may be a PHP.ini setting to defeat this, but as of PHP 9+, these will be fatal errors.



 

I solved this very easy.

In .htaccess file (root file) you need to add following lines:

<FilesMatch "\.(inc|php5|php4|php3|php2|php|phtml)$">
SetHandler application/x-lsphp74
</FilesMatch>

I have several webpages, and now I am strugling with Joomla…. And latest version runs only on php 8.x, so I have tons of "Deprecated…." messages, very anoying for working in admin panel.

Since change in .htaccess works like a charm. Composr and Joomla.

Post

Posted
Rating:
#7711
Awesome to hear. I do know Composr is not compatible with PHP 8.2 yet. It's only good up to 8.0 and partially 8.1 I believe.
0 guests and 0 members have recently viewed this.