Forum for discussing general topics related to Couch.
24 posts Page 1 of 3
Hi all,
I've recently had to build an new machine and am slowly remembeing how the previous was setup (painful process).
Anyway, I've installed MySQL 8 which is fine and ran ok before but am now using PHP 7.4. When accessing the admin folder to install everything I get the following errors:


Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\index.php on line 26

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\header.php on line 217

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\header.php on line 241

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\header.php on line 246

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\functions.php on line 2132

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\functions.php on line 2235

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 600

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 624

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 652

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 659

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 660

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 677

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 678

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 693

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 749

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 784

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 843

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 877

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 920

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 1033

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 1048

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\parser.php on line 1049

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\parser\HTMLParser.php on line 64

Deprecated: Function get_magic_quotes_gpc() is deprecated in C:\Users\Sites\admin\header.php on line 301

Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in C:\Users\Sites\admin\includes\mysql2i\mysql2i.class.php:48 Stack trace: #0 C:\Users\Sites\admin\includes\mysql2i\mysql2i.func.php(27): mysql2i::mysql_connect('localhost', 'root', 'password') #1 C:\Users\Sites\admin\db.php(90): mysql_connect('localhost', 'root', 'password') #2 C:\Users\Sites\admin\header.php(312): KDB->connect() #3 C:\Users\Sites\admin\index.php(7): require_once('C:\\Users\\Si...') #4 {main} thrown in C:\Users\Sites\admin\includes\mysql2i\mysql2i.class.php on line 48

Not sure if it's me being thick - i.e. Misconfiguring PHP (most likely) or if there's a problem with 7.4 and I would be better using an older version of PHP.

FYI: Info file works fine and i've removed some of the path name for privacy.

Thanks
Ian
Hi Ian,

Thank you very much for the heads-up.

The list of 'errors' you mentioned consists of, except for one item, deprecation notices for features that PHP 7.4 has now deemed outdated.

I have fixed those and you can get the updated version of Couch from https://github.com/CouchCMS/CouchCMS.

The one real error in the list is - "Call to undefined function mysqli_connect() ".
This suggests that the "mysqli" extension is missing from your PHP installation (although, most distributions have this extension by default).

I think you'll need to compile your PHP to include the missing "mysqli" extension (https://www.php.net/manual/en/mysqli.installation.php).

In closing, thanks again for the report. I'd appreciate if you could take the time to download the latest commit from GitHub, test it and let me know if it rectifies the deprecation notices.
Thanks KK,

I'll try that tonight / tomorrow (GMT) when I'm back at the PC.
Will let you know the outcome.

Ian
Hi KK,

Have tried the newer code and think I now have additional deprecations, have sorted the database error though.
Was me being stupid - I backed up the previous .ini file but this time round i've decided to give the folders their version numbers i.e. PHP74 instead of just PHP. Updated that and can now setup.

The deprecated list is:

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\page.php on line 1111

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\page.php on line 1456

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\page.php on line 1605

Deprecated: The (real) cast is deprecated, use (float) instead in C:\Users\Sites\admin\includes\timthumb.php on line 102

Deprecated: The (real) cast is deprecated, use (float) instead in C:\Users\Sites\admin\includes\timthumb.php on line 114

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\field.php on line 369

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\field.php on line 650

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\field.php on line 662

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\field.php on line 1072

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\field.php on line 1449

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\folder.php on line 431

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\folder.php on line 872

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\tags.php on line 3958

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\tags.php on line 4429

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\tags.php on line 6119

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\tags.php on line 7093

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\tags.php on line 7700

Warning: Creating default object from empty value in C:\Users\Sites\admin\tags.php on line 5778

This appeared on the login page:
Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\Users\Sites\admin\login.php on line 50

Thanks
Ian
Thank you very much, Ian.

I checked more thoroughly this time and, it appears, there are many more instances that need to be fixed.
It will take a few days time to do that.

If possible, please use a previous version of PHP for now; I'll get back in just a few days and would appreciate if you could switch to 7.4 and test once again then.

Thanks.
Any progress on this issue? I'm getting the same errors on a new install with PHP 7.41
The same error on my new install.
Hello,
I'm also getting these warnings, even when error reporting in php.ini is set to hide deprecation warnings.
Should I downgrade PHP? What version do you recommend?
Thanks!
Hello @bramm
Should I downgrade PHP? What version do you recommend?

Please use PHP 7.3 for now. Thanks.
Hi guys,

I have pushed a commit to GitHub trying to fix the deprecation notices.
I request you to please try it and let me know if something escaped my notice.

Thanks
24 posts Page 1 of 3