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

replace getLoad() / getDiskPercent() with PHP native functions #654

Merged
merged 1 commit into from Jan 3, 2015
Merged

replace getLoad() / getDiskPercent() with PHP native functions #654

merged 1 commit into from Jan 3, 2015

Conversation

lifeofguenter
Copy link
Contributor

instead of allowing dangerous "system-exec" calls (which additionally spawn an additional process, so not very good performance wise) we should rely on native PHP calls where we can.

Ideally future releases would communicate via TCP or similar to zmc (or other parts) instead of doing exec calls.

@connortechnology
Copy link
Member

Please note that sys_getloadaverage is only available for php > 5.1.3
I don't have a problem with that... our use of PDO probably means php5 anyways.

@connortechnology
Copy link
Member

yeah PDO is php5. So I'm happy with this PR.

@kylejohnson
Copy link
Member

This is what I'm doing in my new skin, and I haven't seen any issues.

kylejohnson added a commit that referenced this pull request Jan 3, 2015
…h_native

replace getLoad() / getDiskPercent() with PHP native functions
@kylejohnson kylejohnson merged commit db5f5a6 into ZoneMinder:master Jan 3, 2015
@lifeofguenter
Copy link
Contributor Author

Thanks @kylejohnson for the merge.

Just a note on PHP versions: PHP4 is deprecated and everything below 5.4 is not supported anymore officially and contains currently known vulnerabilities.
PHP versions <= 5.3 should not be supported anymore and it makes no sense to offer backward compatibility - especially for version 4x. PHP 5.1.4 itself has been released 2006.

Short: especially as we are dealing with sensitive data, lets try to use a "sane" PHP version as minimum and not try to support legacy versions. Let that be a job of commercial support services (perhaps?).

@connortechnology
Copy link
Member

agreed

@knight-of-ni
Copy link
Member

CentOS 6 ships with PHP 5.3 so we need to support that.

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

Successfully merging this pull request may close these issues.

None yet

4 participants