Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for PHP 8 #4551

Closed
densenator opened this issue Feb 12, 2022 · 18 comments
Closed

Add support for PHP 8 #4551

densenator opened this issue Feb 12, 2022 · 18 comments
Labels
bug Undesired behaviour
Milestone

Comments

@densenator
Copy link

densenator commented Feb 12, 2022

Describe the bug

I installed advanced ping and trying to edited it because my ping is more is 500. It's normal for me.
I see only dev, not see avg and other.
And i get some errors now:

12.02.2022 11:17:39 - CMDPHP PHP ERROR Backtrace: (/graphs.php[116]:graph_edit(), /graphs.php[1675]:rrdtool_function_graph(), /lib/rrd.php[1906]:str_replace(), CactiErrorHandler())

12.02.2022 11:17:39 - ERROR PHP DEPRECATED: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in file: /var/www/html/lib/rrd.php on line: 1906
12.02.2022 11:15:01 - CMDPHP WARNING: cmd.php poller has run over its polling interval and therefore is ending
12.02.2022 11:15:00 - SYSTEM WARNING: Primary Admin account notifications disabled! Unable to send administrative Email.
12.02.2022 11:15:00 - POLLER: Poller[Main Poller] PID[3620] WARNING: There are 1 processes detected as overrunning a polling cycle, please investigate
12.02.2022 11:14:59 - SYSTEM STATS: Time:298.5947 Method:cmd.php Processes:1 Threads:1 Hosts:15 HostsPerProcess:15 DataSources:90 RRDsProcessed:64
12.02.2022 11:14:59 - SYSTEM WARNING: Primary Admin account notifications disabled! Unable to send administrative Email.
12.02.2022 11:14:59 - POLLER: Poller[Main Poller] PID[3006] Maximum runtime of 298 seconds exceeded. Exiting.
12.02.2022 11:10:02 - PHPSVR Maximum runtime of 300 seconds exceeded for the Script Server. Exiting.

in server i run
root@cacti:/var/www/html/scripts# php -q ss_fping.php my-server.com 20 ICMP
min:603.6110 avg:615.5208 max:629.1850 dev:5.7867 loss:0.0000

Screenshots

image

image

image

image

Desktop (please complete the following information)

  • OS: debian 11.2

  • PHP 8.1.2

  • Apache/2.4.52

  • 10.5.12-MariaDB

  • cacti 1.2.20

  • Browser [e.g. chrome, safari]
    chrome

  • Version [e.g. 22]
    98.0.4758.82

@densenator densenator added bug Undesired behaviour unverified Some days we don't have a clue labels Feb 12, 2022
@densenator
Copy link
Author

also deprecated in import

12.02.2022 14:03:39 - CMDPHP PHP ERROR Backtrace: (/templates_import.php[43]:form_save(), /templates_import.php[97]:import_xml_data(), /lib/import.php[190]:xml_to_data_input_method(), /lib/import.php[1796]:CactiErrorHandler())

12.02.2022 14:03:39 - ERROR PHP DEPRECATED: Automatic conversion of false to array is deprecated in file: /var/www/html/lib/import.php on line: 1796
12.02.2022 14:03:39 - CMDPHP PHP ERROR Backtrace: (/templates_import.php[43]:form_save(), /templates_import.php[97]:import_xml_data(), /lib/import.php[197]:xml_to_gprint_preset(), /lib/import.php[1227]:CactiErrorHandler())
12.02.2022 14:03:39 - ERROR PHP DEPRECATED: Automatic conversion of false to array is deprecated in file: /var/www/html/lib/import.php on line: 1227
12.02.2022 14:03:39 - CMDPHP PHP ERROR Backtrace: (/templates_import.php[43]:form_save(), /templates_import.php[97]:import_xml_data(), /lib/import.php[197]:xml_to_gprint_preset(), /lib/import.php[1227]:CactiErrorHandler())
12.02.2022 14:03:39 - ERROR PHP DEPRECATED: Automatic conversion of false to array is deprecated in file: /var/www/html/lib/import.php on line: 1227
12.02.2022 14:03:39 - CMDPHP PHP ERROR Backtrace: (/templates_import.php[43]:form_save(), /templates_import.php[97]:import_xml_data(), /lib/import.php[197]:xml_to_gprint_preset(), /lib/import.php[1227]:CactiErrorHandler())
12.02.2022 14:03:39 - ERROR PHP DEPRECATED: Automatic conversion of false to array is deprecated in file: /var/www/html/lib/import.php on line: 1227
12.02.2022 14:03:39 - CMDPHP PHP ERROR Backtrace: (/templates_import.php[43]:form_save(), /templates_import.php[97]:import_xml_data(), /lib/import.php[200]:xml_to_cdef(), /lib/import.php[1519]:CactiErrorHandler())
12.02.2022 14:03:39 - ERROR PHP DEPRECATED: Automatic conversion of false to array is deprecated in file: /var/www/html/lib/import.php on line: 1519

@TheWitness
Copy link
Member

Which cacti version?

TheWitness added a commit that referenced this issue Feb 12, 2022
Thanks for this one.  See if you can find more.  Let me know that these are fixed too of course.
@densenator
Copy link
Author

1.2.20

@densenator
Copy link
Author

Nothing changed now.

13.02.2022 15:25:11 - CMDPHP PHP ERROR Backtrace: (/templates_import.php[48]:import(), /templates_import.php[127]:import_display_results(), /lib/import.php[2180]:html_escape(), /lib/html.php[1069]:str_replace(), CactiErrorHandler())

13.02.2022 15:25:11 - ERROR PHP DEPRECATED: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in file: /var/www/html/lib/html.php on line: 1069
13.02.2022 15:25:11 - CMDPHP PHP ERROR WARNING Backtrace: (/templates_import.php[48]:import(), /templates_import.php[127]:import_display_results(), /lib/import.php[2180]:CactiErrorHandler())
13.02.2022 15:25:11 - ERROR PHP WARNING: Undefined array key "title" in file: /var/www/html/lib/import.php on line: 2180
13.02.2022 15:25:11 - CMDPHP PHP ERROR WARNING Backtrace: (/templates_import.php[48]:import(), /templates_import.php[127]:import_display_results(), /lib/import.php[2174]:CactiErrorHandler())
13.02.2022 15:25:11 - ERROR PHP WARNING: Undefined array key "type" in file: /var/www/html/lib/import.php on line: 2174
13.02.2022 15:25:11 - CMDPHP PHP ERROR WARNING Backtrace: (/templates_import.php[48]:import(), /templates_import.php[127]:import_display_results(), /lib/import.php[2172]:CactiErrorHandler())
13.02.2022 15:25:11 - ERROR PHP WARNING: Undefined array key "type" in file: /var/www/html/lib/import.php on line: 2172

@TheWitness
Copy link
Member

Okay, some progress.

@TheWitness
Copy link
Member

Was it Advanced Ping 2.2 or 1.3? Also, just made another update.

@densenator
Copy link
Author

v1.3, and i'm trying to import 2.2 and cacti sayes "nothing changes"
image

@TheWitness
Copy link
Member

I'm just trying to use the Remi repos to try and squeeze php81 on my CentOS7.1 box.

@TheWitness
Copy link
Member

Just upgrade a full system to 8.1.2. It's a crisis of PHP deprecation issues.

@TheWitness
Copy link
Member

Any more import errors though?

@TheWitness
Copy link
Member

Enabling 8.1.2 made a mess out of my log. Going to be fixing things for a while. Just did thold, syslog is coming.

@densenator
Copy link
Author

After last update cacti i don't see errors in my log.
But advanced ping also don't show values more then 500 for me.
And any other errors:

13.02.2022 17:40:06 - CMDPHP PHP ERROR NOTICE Backtrace: (/cmd.php[437]:fwrite(), CactiErrorHandler())

13.02.2022 17:40:06 - ERROR PHP NOTICE: fwrite(): Write of 6 bytes failed with errno=32 Broken pipe in file: /var/www/html/cmd.php on line: 437
13.02.2022 17:40:06 - PHPSVR Maximum runtime of 300 seconds exceeded for the Script Server. Exiting.
13.02.2022 17:40:06 - CMDPHP WARNING: cmd.php poller has run over its polling interval and therefore is ending
13.02.2022 17:40:00 - SYSTEM WARNING: Primary Admin account notifications disabled! Unable to send administrative Email.
13.02.2022 17:40:00 - POLLER: Poller[Main Poller] PID[192834] WARNING: There are 1 processes detected as overrunning a polling cycle, please investigate

@TheWitness
Copy link
Member

Well, I have not used it in years, though I did import this morning and made some psr changes to ss_fping. What ping method are you using?

@TheWitness
Copy link
Member

Using cmd.php is no good by the way... It lacks some better timing control that is in spine.

@TheWitness
Copy link
Member

This last one is expected when the poller times out. So, let's let that last one stand. In spine, we will kill the script after the script timeout.

@TheWitness
Copy link
Member

We could attempt to mask the error message. Let me just try that once. Just did a minor commit. There are better "different" ways to do this, trying the shortcut first.

@TheWitness TheWitness removed the unverified Some days we don't have a clue label Feb 13, 2022
@TheWitness TheWitness added this to the v1.2.20 milestone Feb 13, 2022
@densenator
Copy link
Author

I don't see errors.
Thank you. In future i will use spine.
I used icmp ping

@TheWitness
Copy link
Member

If you get any more, just open a new ticket.

@netniV netniV changed the title PHP DEPRECATED errors in 8.1 Add support for PHP 8 Apr 3, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour
Projects
None yet
Development

No branches or pull requests

2 participants