ID:               50378
 Updated by:       j...@php.net
 Reported By:      dimitri dot ho at gmail dot com
-Status:           Feedback
+Status:           Bogus
 Bug Type:         Semaphore related
 Operating System: Linux
 PHP Version:      5.2.11
 New Comment:

Well, it works fine. Quite likely the issue has nothing to do with
semaphores.


Previous Comments:
------------------------------------------------------------------------

[2009-12-04 08:49:28] dimitri dot ho at gmail dot com

I meant the script can reproduce the bug, and was not incomplete. It
doesn't work as I expected.

------------------------------------------------------------------------

[2009-12-04 08:20:20] j...@php.net

Exactly, it works like you want so what's the bug here?

------------------------------------------------------------------------

[2009-12-04 07:16:31] dimitri dot ho at gmail dot com

Actually, the script was complete and worked. :)

<?php

file_put_contents("/tmp/" . uniqid('moo') . '.txt', __FILE__);

$queue = msg_get_queue(123456);
msg_receive($queue, 1, $msgType, 1024, $var);

?>

------------------------------------------------------------------------

[2009-12-04 04:42:55] j...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



------------------------------------------------------------------------

[2009-12-03 23:55:45] dimitri dot ho at gmail dot com

Description:
------------
msg_receive() blocks next requests to the same URL

Reproduce code:
---------------
<?php

file_put_contents("/tmp/" . uniqid('moo') . '.txt', __FILE__);

$queue = msg_get_queue(123456);
msg_receive($queue, 1, $msgType, 1024, $var);

Expected result:
----------------
When running it twice, I expect to see 2 /tmp/moo* files.

Actual result:
--------------
Let's say my URL is http://quux.fr/receive.php.

Run http://quux.fr/receive.php once: a moo file is created.

Run it a second time: no file is created.

Run http://quux.fr/receive.php?lol: a new moo file is created.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50378&edit=1

Reply via email to