Gexport - Error 500 >> problem with "curly braces".

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
zboj
Posts: 7
Joined: Thu Apr 02, 2009 8:50 am

Gexport - Error 500 >> problem with "curly braces".

Post by zboj »

Hello,

Fresh install of cacti 1.2.24 and Gexport 2.0 on Debian12 and PHP8.2.8.

No problem with an install but when I try to open Graph Export in Tools menu for settings I get:

Sorry, we could not process your last action.
Error: 500 Internal Server Error
Reason: The response to the last action was unexpected.

In logs:

Got error 'PHP message: PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /usr/share/cacti/site/plugins/gexport/gexport.php on line 251', referer: ...
Got error 'PHP message: PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /usr/share/cacti/site/plugins/gexport/gexport.php on line 243', referer: ....

Cacti works ok on PHP 8.2. What about Gexport? If not - are there any alternatives for graph export?
User avatar
zboj
Posts: 7
Joined: Thu Apr 02, 2009 8:50 am

Re: Gexport - Error 500 >> problem with "curly braces".

Post by zboj »

Looks like a change in: plugins/gexport/gexport.php line 251 solves problem:


/* html_start_box($export_actions{get_nfilter_request_var('drp_action')}, '60%', '', '3', 'center', ''); */
html_start_box($export_actions[get_nfilter_request_var('drp_action')], '60%', '', '3', 'center', '');

I suppose plugin may benefit with this patch. I will try to test it now.
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Gexport - Error 500 >> problem with "curly braces".

Post by Osiris »

I thinks this was fixed on GitHub a while ago.
Before history, there was a paradise, now dust.
User avatar
zboj
Posts: 7
Joined: Thu Apr 02, 2009 8:50 am

Re: Gexport - Error 500 >> problem with "curly braces".

Post by zboj »

Possible. But not in a tar.gz package.

BTW - fix works also on PHP 8.2.8.
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Gexport - Error 500 >> problem with "curly braces".

Post by Osiris »

Download it from develop. The fix may not have been tagged.
Before history, there was a paradise, now dust.
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Gexport - Error 500 >> problem with "curly braces".

Post by Osiris »

Just confirmed, it's fixed in the develop branch v
Before history, there was a paradise, now dust.
User avatar
zboj
Posts: 7
Joined: Thu Apr 02, 2009 8:50 am

Re: Gexport - Error 500 >> problem with "curly braces".

Post by zboj »

OK - nice it is fixed.

BTW. For future development. It is still a problem with exporting just a few graphs and especially aggregates. The work around I use is by the creation of virtual device I attach some aggregates to it, because Gexport does not export graphs not connectred to any device. However I found today with one of graphs that when I attach graph to this virtual device - source graphs stop updating. I looks like below:
cacti.png
cacti.png (11.45 KiB) Viewed 912 times
It is strange as in management / graphs all interfaces are still listed under phisical device. Only aggregated graph is moved to a virtual device. RRD files work and get updated. But graphs not. Gexport makes sth strange then. I have no idea what.
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Gexport - Error 500 >> problem with "curly braces".

Post by Osiris »

Yea, I saw that on the issue board. Likely a simple fix. Pull requests are always welcomed I imagine.
Before history, there was a paradise, now dust.
User avatar
zboj
Posts: 7
Joined: Thu Apr 02, 2009 8:50 am

Re: Gexport - Error 500 >> problem with "curly braces".

Post by zboj »

Gexport is location oriented now. An option to export specified graphs may need bigger rebuild. Best would be a possibility to mark exact graphs on a list which we want to export. But I do not know if present plugin concept will allow such a deep integration.

Testing options today I found that when I move aggregated graph back to a phisical device, interface graphs get updated again. But as they have a gap in drawing it suggest problem is with RRD files. Strange. But I have no time to play with it any longer. TIme to leave it and check tomorrow if all I build works stable. It is however far from trustable solution.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest