note 95277 added to function.msg-queue-exists

From: Date: Wed, 23 Dec 2009 15:54:34 +0000
Subject: note 95277 added to function.msg-queue-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-164275@lists.php.net to get a copy of this message
my server is under debian with php 5.2.4 I tried your function. However in my case i have to make a little modification to match the $key using dechex() : function _msg_queue_exists($key) { if(function_exists("msg_queue_exists")) { return msg_queue_exists($key); } else { $hex_key = "0x".str_pad(strval(dechex($key)),8,"0",STR_PAD_LEFT); $aQueues = array(); exec("ipcs -q | grep \"^[0-9]\" | cut -d \" \" -f 1", $aQueues); if(in_array($hex_key,$aQueues)) return true; else return false; } } ---- Server IP: 89.31.146.176 Probable Submitter: 212.23.185.22 ---- Manual Page -- http://www.php.net/manual/en/function.msg-queue-exists.php Edit -- https://master.php.net/note/edit/95277 Del: integrated -- https://master.php.net/note/delete/95277/integrated Del: useless -- https://master.php.net/note/delete/95277/useless Del: bad code -- https://master.php.net/note/delete/95277/bad+code Del: spam -- https://master.php.net/note/delete/95277/spam Del: non-english -- https://master.php.net/note/delete/95277/non-english Del: in docs -- https://master.php.net/note/delete/95277/in+docs Del: other reasons-- https://master.php.net/note/delete/95277 Reject -- https://master.php.net/note/reject/95277 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#164275) next »