Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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?



81.8k

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



1.7k

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



5.7k
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 ;)



1.7k

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 ;)