We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Beanstalk queue unserialize error

Hey,

I am using the phalcon beanstalk classes to get JSON-encoded data (no whitespaces or anything, its valid JSON) from a local beanstalk queue and get the following error when calling peekReady

PHP Notice: Phalcon\Queue\Beanstalk::peekReady(): Error at offset 0 of 556 bytes

I tracked it down to be somewhat related to PHP's unserialize function, but thats the end of my knowledge.

Previewing the job in beanstalk_console works fine. When I try to reserve a Job the PHP-script just halts altogether until I cancel it manually.

Any idea?



98.9k

Try using base64 functions, maybe it could be related to an encoding problem.



3.3k

Yea that solves the error, but not really a satisfying solution. :(



6.9k
Accepted
answer

Yea that solves the error, but not really a satisfying solution. :(

You can always integrate your own service, or using a pre-existing open source library.

You aren't forced to use Phalcons libraries ;)



3.3k

I switched to Pheanstalk now and it works as expected.

Thanks you two for the help. :)

Yea that solves the error, but not really a satisfying solution. :(

You can always integrate your own service, or using a pre-existing open source library.

You aren't forced to use Phalcons libraries ;)