XF 2.0 Xenforo crash: Array and string offset access syntax with curly braces is deprecated

I transferred my xenforo to a new host (siteground). Initially everything was working fine. I made a new post and still worked fine then I got this message below. Any idea how to fix this? It is using: PHP 7.4.27. Thanks.

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/customer/www/sonicvisions.org/public_html/forum/src/vendor/dokuwiki/utf8/utf8.php on line 66

Fatal error
: Uncaught XF\Db\Exception: Access denied for user 'uvqsgg8yeh6k6'@'localhost' (using password: YES) in /home/customer/www/sonicvisions.org/public_html/forum/src/XF/Db/Mysqli/Adapter.php:160 Stack trace: #0 /home/customer/www/sonicvisions.org/public_html/forum/src/XF/Db/Mysqli/Adapter.php(28): XF\Db\Mysqli\Adapter->makeConnection(Array) #1 /home/customer/www/sonicvisions.org/public_html/forum/src/XF/Db/AbstractAdapter.php(60): XF\Db\Mysqli\Adapter->getConnection() #2 /home/customer/www/sonicvisions.org/public_html/forum/src/XF/Db/Mysqli/Adapter.php(113): XF\Db\AbstractAdapter->connect() #3 /home/customer/www/sonicvisions.org/public_html/forum/src/XF/Db/AbstractAdapter.php(516): XF\Db\Mysqli\Adapter->escapeString('options') #4 /home/customer/www/sonicvisions.org/public_html/forum/src/XF/Db/AbstractAdapter.php(494): XF\Db\AbstractAdapter->quote('options') #5 /home/customer/www/sonicvisions.org/public_html/forum/src/XF/DataRegistry.php(138): XF\Db\AbstractAdapter->quote(Array) #6 /home/customer/www/sonicvisions.or in /home/customer/www/sonicvisions.org/public_html/forum/src/XF/Db/Mysqli/Adapter.php on line 160
 

Chris D

XenForo developer
Staff member
XenForo 2.0 is not compatible with PHP 7.4. PHP 7.3 is the latest version that is supported.

You will either need to downgrade PHP to 7.3 or upgrade XenForo to a more recent version.
 
XenForo 2.0 is not compatible with PHP 7.4. PHP 7.3 is the latest version that is supported.

You will either need to downgrade PHP to 7.3 or upgrade XenForo to a more recent version.
I changed version of PHP to 7.3.33 and the deprecated error is gone. But I am still getting the second access denied error. Any idea? Thanks.
 
Ok so I was talking to siteground what they did was flush their server side cache and now its working.

The agent is telling me to add this code to xenforo to prevent the error:

.htaccess:
<IfModule mod_headers.c>
Header set Cache-Control
"private"
</IfModule>

I don't feel comfortable adding code to xenforo, what do you guys think? Would a xenforo update fix this ?
 

Anatoliy

Well-known member
as far as I know xenForo sets those headers. private for privates, public for public.
if you put that code img & js will not be cashed by browsers and that is not cool.

but I might be completely nuts )
 
Top