[GH-ISSUE #79] example.php does not fail if run without privileges #29

Closed
opened 2026-03-04 23:23:51 +03:00 by kerem · 4 comments
Owner

Originally created by @nkakouros on GitHub (Nov 20, 2018).
Original GitHub issue: https://github.com/yswery/PHP-DNS-SERVER/issues/79

If you try to run php examples/example.php in a fresh git clone of the project, the command returns and the exit code is 0. However, no server starts running in the background. If, however, sudo php examples/example.php is given instead, the server loop is started successfully. It would be useful to output either an error message or return with a non-zero exit code.

Originally created by @nkakouros on GitHub (Nov 20, 2018). Original GitHub issue: https://github.com/yswery/PHP-DNS-SERVER/issues/79 If you try to run `php examples/example.php` in a fresh `git clone` of the project, the command returns and the exit code is 0. However, no server starts running in the background. If, however, `sudo php examples/example.php` is given instead, the server loop is started successfully. It would be useful to output either an error message or return with a non-zero exit code.
kerem 2026-03-04 23:23:51 +03:00
Author
Owner

@samuelwilliams commented on GitHub (Jan 25, 2019):

@tterranigma - Does PR #84 solve the issue you've reported here?

<!-- gh-comment-id:457495967 --> @samuelwilliams commented on GitHub (Jan 25, 2019): @tterranigma - Does PR #84 solve the issue you've reported here?
Author
Owner

@nkakouros commented on GitHub (Jan 26, 2019):

Almost, I think. There is an error message but the exit code is 0. Shouldn't it be at at least 1?

<!-- gh-comment-id:457831308 --> @nkakouros commented on GitHub (Jan 26, 2019): Almost, I think. There is an error message but the exit code is 0. Shouldn't it be at at least 1?
Author
Owner

@raheelkhan commented on GitHub (Jan 28, 2019):

@tterranigma I have pushed the code that returns exit code 1 if there is any ServerExceptionEvent raised. Please verify. Thanks

<!-- gh-comment-id:458133175 --> @raheelkhan commented on GitHub (Jan 28, 2019): @tterranigma I have pushed the code that returns exit code 1 if there is any ServerExceptionEvent raised. Please verify. Thanks
Author
Owner

@raheelkhan commented on GitHub (Apr 8, 2019):

Can we close this against PR #84 ?

<!-- gh-comment-id:480918916 --> @raheelkhan commented on GitHub (Apr 8, 2019): Can we close this against PR #84 ?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PHP-DNS-SERVER#29
No description provided.