Its a bit weird i compiled the trunk version too, and i get the same result: $ telnet localhost 1111 Trying ::1... Connected to localhost. Escape character is '^]'. POST /reverse HTTP/1.1 Content-Length: 12
Hello world! HTTP/1.0 200 OK X-Gearman-Job-Handle: H:mc-air:21 X-Gearman-Command: GEARMAN_COMMAND_WORK_COMPLETE Content-Length: 0 Server: Gearman/1.1.6
!dlrow olleH
This is with the code from: "bzr branch lp:gearmand" compiled with: ./configure --disable-libdrizzle --disable-hiredis --disable-libmemcached --disable-libmysql --disable-libpq --disable-libsqlite3 --disable-option-checking --with-sqlite3=no --with-mysql=no
And the worker code is: <?php
$gmworker= new GearmanWorker(); $gmworker->addServer('localhost', 4730); $gmworker->addFunction('reverse', function($job) { return strrev($job->workload()); });
print "Waiting for job...\n"; while( $gmworker->work() ) { if ($gmworker->returnCode() != GEARMAN_SUCCESS) { echo "return_code: " . $gmworker->returnCode() . "\n"; break; } }
Its a bit weird i compiled the trunk version too, and i get the same result:
$ telnet localhost 1111
Trying ::1...
Connected to localhost.
Escape character is '^]'.
POST /reverse HTTP/1.1
Content-Length: 12
Hello world! Job-Handle: H:mc-air:21 COMMAND_ WORK_COMPLETE
HTTP/1.0 200 OK
X-Gearman-
X-Gearman-Command: GEARMAN_
Content-Length: 0
Server: Gearman/1.1.6
!dlrow olleH
This is with the code from: "bzr branch lp:gearmand" compiled with: libdrizzle --disable-hiredis --disable- libmemcached --disable-libmysql --disable-libpq --disable- libsqlite3 --disable- option- checking --with-sqlite3=no --with-mysql=no
./configure --disable-
And the worker code is:
<?php
$gmworker= new GearmanWorker(); >addServer( 'localhost' , 4730); >addFunction( 'reverse' , function($job) { $job->workload( ));
$gmworker-
$gmworker-
return strrev(
});
print "Waiting for job...\n"; >returnCode( ) != GEARMAN_SUCCESS) { >returnCode( ) . "\n";
while( $gmworker->work() ) {
if ($gmworker-
echo "return_code: " . $gmworker-
break;
}
}