georgringer / t3monitoring_client

Monitoring client
GNU General Public License v2.0
28 stars 26 forks source link

disk_free_space() disabled -> Fatal error #62

Closed maslme closed 8 months ago

maslme commented 3 years ago

When disk_free_space() disabled on Client Server the client ran into an Fatal Error - so it's not possible to get the status from the client.

Client: TYPO3 10.4.14 t3monitoring_client 9.2.0 php 7.2

maslme commented 8 months ago

Still the same problem with TYPO3 11.5.31 t3monitoring_client (latest github version) php 8.1.23

maslme commented 8 months ago

A possible solution is to change Line 32 in Classes/Provicer/ServerInformationProvider.php to

$data['core']['diskFreeSpace'] = function_exists('disk_free_space') ? disk_free_space(Environment::getProjectPath()) : false;

liayn commented 8 months ago

Check my #82 suggestion please.

liayn commented 8 months ago

function_exists('disk_free_space')

Won't work, see documentation for https://www.php.net/manual/en/function.function-exists.php

A function name may exist even if the function itself is unusable due to configuration or compiling options

maslme commented 8 months ago

In my environment, both solutions are working. Thanks for the hint.