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

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

Open
ax-cap opened this issue Jun 21, 2018 · 4 comments

Comments

@ax-cap
Copy link

ax-cap commented Jun 21, 2018

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
Copy link

Thank you!

@salllas
Copy link

salllas commented Oct 5, 2020

Thanks,
Exact what i needed.

@kumarpiyush18
Copy link

Thanks for the help, its working now

@godwinguru
Copy link

Thank you, its working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants