Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
install_26_4 [2026/04/07 15:32] systeminstall_26_4 [2026/04/07 16:14] (current) – [Install RADIUSdesk] system
Line 427: Line 427:
 </code> </code>
  
 +=== Tweaks to work with PHP 8.5 ===
 +  * Ubuntu 26.04 comes standard with PHP version 8.5.
 +  * We need to tweak two of the CakePHPv4 files in order to work with PHP versions 8.4 and higher.
 +<code bash>
 +sudo vi /var/www/rdcore/cake4/rd_cake/vendor/cakephp/cakephp/src/Error/PhpError.php
 +</code>
 +  * Look for this section:
 +<code php>
 +private $levelMap = [
 +        E_PARSE => 'error',
 +        E_ERROR => 'error',
 +        E_CORE_ERROR => 'error',
 +        E_COMPILE_ERROR => 'error',
 +        E_USER_ERROR => 'error',
 +        E_WARNING => 'warning',
 +        E_USER_WARNING => 'warning',
 +        E_COMPILE_WARNING => 'warning',
 +        E_RECOVERABLE_ERROR => 'warning',
 +        E_NOTICE => 'notice',
 +        E_USER_NOTICE => 'notice',
 +        E_STRICT => 'strict',
 +        E_DEPRECATED => 'deprecated',
 +        E_USER_DEPRECATED => 'deprecated',
 +    ];
 +</code>
 +  * Remove **E_STRICT**.
 +<code php>
 +private $levelMap = [
 +        E_PARSE => 'error',
 +        E_ERROR => 'error',
 +        E_CORE_ERROR => 'error',
 +        E_COMPILE_ERROR => 'error',
 +        E_USER_ERROR => 'error',
 +        E_WARNING => 'warning',
 +        E_USER_WARNING => 'warning',
 +        E_COMPILE_WARNING => 'warning',
 +        E_RECOVERABLE_ERROR => 'warning',
 +        E_NOTICE => 'notice',
 +        E_USER_NOTICE => 'notice',
 +    //    E_STRICT => 'strict',
 +        E_DEPRECATED => 'deprecated',
 +        E_USER_DEPRECATED => 'deprecated',
 +    ];
 +</code>
 +  * Second file to tweak:
 +<code bash>
 +sudo vi /var/www/rdcore/cake4/rd_cake/vendor/cakephp/chronos/src/Traits/FactoryTrait.php
 +</code>
 +  * Look for this section:
 +<code php>
 +public static function createFromTimestamp(int|float $timestamp, $tz = null): ChronosInterface
 +</code>
 +  * Change it to:
 +<code php>
 +public static function createFromTimestamp(int $timestamp, $tz = null): static
 +</code>
 +  * The CakePHPv4 application should now run without any errors.
 === Important URLs ===   === Important URLs ===  
   * The following URLs are important to reach the user interface   * The following URLs are important to reach the user interface
  • install_26_4.txt
  • Last modified: 2026/04/07 16:14
  • by system