Gearman caused by PHP Fatal error____php

Source: Internet
Author: User
Tags stack trace

Gearman extension installed, wrote a test code test_gearman.php

<?php
$worker = new Gearmanworker ();
$worker->addserver ();
$worker->addfunction ("reverse", "my_reverse_function");
while ($worker->work ());

function My_reverse_function ($job)
{return
  strrev ($job->workload ());
>


$ PHP test_gearman.php

PHP Fatal error:uncaught exception ' gearmanexception ' with message ' Failed to set exception option ' IN/USERS/WORLDZHY/D Ocuments/inceptionpad/test_gearman.php:3

Stack Trace:

#0/users/worldzhy/documents/inceptionpad/test_gearman.php (3): Gearmanworker->addserver ()

#1 {main}

Thrown in/users/worldzhy/documents/inceptionpad/test_gearman.php on line 3


This error occurs because the Gearman server is not started, and the gearmand-d is executed.

$/usr/local/cellar/gearman/1.1.12/sbin/gearmand-d

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.