Page 1 of 1

Array and String Offset access syntax error

Posted: 04 May 2023, 09:16
by T2P&E
To install OpenCats on my laptop, I prepared my system by downloading & installing XAMPP. I launched phpMyAdmin, granted all privileges on database opencats then clicked go. It looked like it worked however once I went to install OpenCATS software and went to the localhost/opencats and clicked on the installation wizard, it gave me a fatal error.

Fatal Error: Array and string offset access syntax with curly braces is no longer supported in C:\xampp\htdocs\OpenCATS\lib\CATSUtility.php on line 108

Can you please let me know what's the best way to fix this syntax error. Thanks

Re: Array and String Offset access syntax error

Posted: 04 May 2023, 09:31
by RussH
Hi,

the current version only supports a maximum version of PHP 7.2. I assume from the error message you're using PHP 7.4 or upwards. If you choose to run XAMPP with PHP 7.2 it'll be fine.

Re: Array and String Offset access syntax error

Posted: 05 May 2023, 01:19
by T2P&E
Ok, thanks.
When I installed XAMPP I didn't see a XAMPP that had a PHP 7.2 version. I installed XAMPP V64-8.0.28.0-VS16-installer.exc

*Where would I find the PHP 7.2version??
Since I already have XAMPP on my computer can I just download a PHP 7.2 or do I have to take off the XAMPP and start over??

Re: Array and String Offset access syntax error

Posted: 22 Mar 2024, 10:01
by Liam Smith
The error message you're encountering indicates that the PHP code in the file "CATSUtility.php" is using array and string offset access syntax with curly braces, which is no longer supported in newer versions of PHPwordle.

To fix this syntax error, you'll need to update the code in the "CATSUtility.php" file to use square brackets instead of curly braces for array and string offset access.

Re: Array and String Offset access syntax error

Posted: 12 Jul 2024, 21:14
by xamp_finder
I encountered the same error. In my case, it was due to downloading the most recent version of xampp, instead of the one linked to on the windows install documentation here: https://documentation.opencats.org/inst ... on-windows

Unfortunately, the link to the xampp download is broken, but I was able to find the same version ( based on the url ) here:
https://gigenet.dl.sourceforge.net/proj ... xe?viasf=1