Array and string offset access syntax with curly braces is no longer supported in /srv/http/xataface/public-api.php on line 702

390 views
Skip to first unread message

Gary Woodruff

unread,
Feb 7, 2021, 5:32:50 PM2/7/21
to Xataface
Upgraded to PHP 8.0 and xataface site stopped loading with the following error:

Array and string offset access syntax with curly braces is no longer supported in /srv/http/xataface/public-api.php on line 702

Found a post where someone said to replace curly braces  with [ ] . Replaced each instance as it appeared in the error log, 3 instances in public-api.php and a couple in init.php.

Now getting the following error:

[Sun Feb 07 17:22:18.916109 2021] [php:error] [pid 4105] [client 192.168.0.5:46774] PHP Fatal error:  Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /srv/http/xataface/config.inc.php:58\nStack trace:\n#0 /srv/http/xataface/init.php(44): require_once()\n#1 /srv/http/xataface/public-api.php(52): init('/srv/http/BMdat...', 'http://192.168....')\n#2 /srv/http/BMdata/index.php(46): df_init('/srv/http/BMdat...', 'http://192.168....')\n#3 {main}\n  thrown in /srv/http/xataface/config.inc.php on line 58, referer: http://192.168.0.5/BMdata/

Any and all help is greatly appreciated!
Gary

Steve Hannah

unread,
Feb 7, 2021, 5:42:00 PM2/7/21
to xata...@googlegroups.com
I haven’t tried php 8 yet.  There will be a lot of those curly brace instances.  I’ll see if I can flush some out tomorrow 

--
You received this message because you are subscribed to the Google Groups "Xataface" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xataface+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xataface/1d989e32-ca82-402d-9617-82f464af71c5o%40googlegroups.com.
--
Steve Hannah
Web Lite Solutions Corp.

Gary Woodruff

unread,
Feb 10, 2021, 10:01:50 AM2/10/21
to Xataface
Hi Steve, Thanks, I have tried to strip them myself but it causes other errors. Tried downgrading to 7.1 but still getting the same errors. 

Gary Woodruff

unread,
Feb 23, 2021, 12:23:43 AM2/23/21
to Xataface
I did roll back to 7.0 and site is running again.

On Sunday, February 7, 2021 at 5:42:00 PM UTC-5 Steve Hannah wrote:

Miro Spiro

unread,
Jul 6, 2021, 4:15:53 PM7/6/21
to Xataface
Is there any chance to update xataface version for PHP 8.0 because I cant roll back PHP to older version?

Steve Hannah

unread,
Jul 6, 2021, 5:52:09 PM7/6/21
to xata...@googlegroups.com
The master branch in github should work on PHP 8.  If you are getting errors on that branch, please post the errors so I can fix them.

Steve

Miro Spiro

unread,
Jul 7, 2021, 3:47:26 PM7/7/21
to Xataface
Thanks for answer.

After PHP update, and xataface replaced with new version. This is error.

Deprecated: Required parameter $record follows optional parameter $query in /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/IO.php on line 177

Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Table.php:2644 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Table.php(2644): method_exists(NULL, 'decorateFieldsI...') #1 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Table.php(800): Dataface_Table->_loadFieldsIniFile() #2 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Table.php(502): Dataface_Table->__construct('radovi', Object(mysqli), false) #3 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Application.php(3042): Dataface_Table::loadTable('radovi') #4 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Application.php(3605): Dataface_Application->handleRequest(false) #5 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Application.php(3474): Dataface_Application->_display(false, false) #6 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/index.php(8): Dataface_Application->display() #7 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Table.php on line 2644

Steve Hannah

unread,
Jul 7, 2021, 4:21:11 PM7/7/21
to xata...@googlegroups.com
Thanks.  I thought I had one of my test servers running PHP 8, but I checked again and it's on 7.  I have fixed the issues you posted here and pushed to github, but I don't have a PHP 8 environment running right now so there could be other gremlins that need to be swatted still.

Miro Spiro

unread,
Jul 8, 2021, 4:05:24 PM7/8/21
to Xataface
New trouble

Fatal error: Uncaught Error: Undefined constant "record_id" in /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Application.php(3799) : eval()'d code:1 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Application.php(3799): eval() #1 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/ActionTool.php(352): Dataface_Application->parseString('javascript:wind...', Array) #2 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Table.php(6186): Dataface_ActionTool->getActions(Array) #3 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/ActionTool.php(82): Dataface_Table->getActions(Array) #4 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/ActionTool.php(98): Dataface_ActionTool->_loadTableActions('radovi') #5 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Application.php(3244): Dataface_ActionTool->getAction(Array) #6 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Application.php(3605): Dataface_Application->handleRequest(false) #7 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Application.php(3474): Dataface_Application->_display(false, false) #8 /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/index.php(8): Dataface_Application->display() #9 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/baza_radovi_1.0.3/xataface/Dataface/Application.php(3799) : eval()'d code on line 1

Message has been deleted

garr...@gmail.com

unread,
Jul 9, 2021, 4:55:16 PM7/9/21
to Xataface
Downloaded latest master today (6/9) and now get:

[Fri Jul 09 16:50:16.023157 2021] [php:error] [pid 765] [client 192.168.0.5:44372] PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /srv/http/xataface/public-api.php on line 759

Steve Hannah

unread,
Jul 10, 2021, 9:09:48 AM7/10/21
to xata...@googlegroups.com
I finally installed MAMP with PHP 8 for testing and I was able to flush out the errors.  I have pushed a fix to Github that patches over these errors:

If you update to the latest in Github it should work in PHP 8 now.

garr...@gmail.com

unread,
Jul 10, 2021, 1:06:38 PM7/10/21
to Xataface
Loads for me now with php 8.0! Layout looks like it's for mobile devices, the previous master from 7/9 did not. Is there some guidance on implementing the mobile and desktop layout based on access device? (Thanks again for you dedication to xataface!)

Steve Hannah

unread,
Jul 10, 2021, 2:04:26 PM7/10/21
to xata...@googlegroups.com
The stylesheet will show the mobile UI only if window width is less than 768px.  It's responsive.  I've written a little bit about the responsive UI here

Some of the screenshots are out of date already as I have made tweaks to the design.



garr...@gmail.com

unread,
Jul 10, 2021, 4:03:55 PM7/10/21
to Xataface
I am on a desktop with a screen resolution of 1920x1080. I have attached a screenshot showing the display using master git from today. I think the window is 961 wide in the screenshot (if I have inspected it correctly) and seems to be using the mobile css. The master git I downloaded on the 8th did not work with php 8 but with php 7 displayed my site with the same desktop look I am used to 
Screenshot from 2021-07-10 15-47-41.png

Steve Hannah

unread,
Jul 10, 2021, 4:05:09 PM7/10/21
to xata...@googlegroups.com
That's the desktop theme.



garr...@gmail.com

unread,
Jul 10, 2021, 4:27:47 PM7/10/21
to Xataface
That makes more sense lol, updated from 2.25 then? I will have to explore the new documentation, it has been awhile since I tweaked my site!

garr...@gmail.com

unread,
Jul 11, 2021, 2:39:08 PM7/11/21
to Xataface
I have two servers both running the same version of Arch and php (8.0). The latest master runs fine on one but not the other. I get the same error with the original version on that server as well as when I copy and try the version that works on the other server.  There must be an error in my config on the second server but I am at a loss. Here is the error:

[Sun Jul 11 13:38:26.368286 2021] [php:error] [pid 789] [client 192.168.0.5:41014] PHP Fatal error:  Uncaught Error: Undefined constant "record_id" in /srv/http/xataface/Dataface/Application.php(3799) : eval()'d code:1\nStack trace:\n#0 /srv/http/xataface/Dataface/Application.php(3799): eval()\n#1 /srv/http/xataface/Dataface/ActionTool.php(352): Dataface_Application->parseString('javascript:wind...', Array)\n#2 /srv/http/xataface/Dataface/Table.php(6186): Dataface_ActionTool->getActions(Array)\n#3 /srv/http/xataface/Dataface/ActionTool.php(82): Dataface_Table->getActions(Array)\n#4 /srv/http/xataface/Dataface/ActionTool.php(98): Dataface_ActionTool->_loadTableActions('dashboard')\n#5 /srv/http/xataface/Dataface/Application.php(3244): Dataface_ActionTool->getAction(Array)\n#6 /srv/http/xataface/Dataface/Application.php(3605): Dataface_Application->handleRequest(false)\n#7 /srv/http/xataface/Dataface/Application.php(3474): Dataface_Application->_display(false, false)\n#8 /srv/http/BMdata/index.php(46): Dataface_Application->display()\n#9 {main}\n  thrown in /srv/http/xataface/Dataface/Application.php(3799) : eval()'d code on line 1

Miro Spiro

unread,
Jul 17, 2021, 2:47:57 PM7/17/21
to Xataface
Now all works!

Thanks Steve :)

Steve Hannah

unread,
Jul 18, 2021, 9:20:04 AM7/18/21
to xata...@googlegroups.com
That error message looks like it is still using the older version of xataface - before the PHP 8 fixes.  Double check.

garr...@gmail.com

unread,
Jul 18, 2021, 11:54:51 AM7/18/21
to Xataface
I downloaded the latest from git and it worked perfectly! I had quite a few versions in there for testing and must have mislabeled. I am getting used to the new layout and love the dark theme (something I had done myself but not nearly as elegantly as your css). 
Thanks much!

Reply all
Reply to author
Forward
0 new messages