Mosquitto-PHP
Mosquitto-PHP copied to clipboard
Examples/event.php will pop a warning after certain time
I am testing the Mosquitto-PHP with the event.php example,. Unfortunately, I found that the script will pop up an PHP Waring after running awhile (a minute or two), no matter it have received a message or not, and will be stopped to received message after the warning. The warning is:
PHP Warning: EventBase::dispatch(): An error occurred while invoking the callback in /path/to/mosquitto/examples/event.php on line 27"
I have checked the Apache error.log and confirmed that there is no error there. But I don't known which log file stored errors for PHP CLI mode.
I am not familiar with libevent or PHP Event extension. As the callback is quite sample, I wonder why it will become hang for running awhile.
That was a bit of an example thrown together in a few minutes to see if it would work - I've not run it myself for any great length of time myself. When it happens does the script crash?