ossec / ossec-wui

OSSEC Web User Interface - Unmaintained!!
Other
163 stars 86 forks source link

Undefined function split() in os_lib_agent.php 111 Or Main/Search page broken. #23

Open ax-cap opened 6 years ago

ax-cap commented 6 years ago

hi: The main/search page of OSSEC-WUI is not showing information after upgrating PHP. Apache log is showing the next error:

PHP Fatal error: Uncaught Error: Call to undefined function split() in /var/www/html/ossec-wui/lib/os_lib_agent.php:111

Server data: Debian 9, PHP 7.x and Apahe 2.4.

It seens that split() is not supported on the new PHP. I was able to fix the error changing the line 111 of /var/www/html/ossec-wui/lib/os_lib_agent.php from:

@list($_name, $_ip) = split("-", $tmp_file, 2); to @list($_name, $_ip) = explode("-", $tmp_file, 2);

The page can now be shown. Please to advice if the change is good.

pdovhomilja commented 6 years ago

Thank you!

salllas commented 4 years ago

Thanks, Exact what i needed.

kumarpiyush18 commented 3 years ago

Thanks for the help, its working now

godwinguru commented 1 year ago

Thank you, its working