msg_set_queue

(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)

msg_set_queueSet information in the message queue data structure

Description

msg_set_queue(SysvMessageQueue $queue, array $data): bool

msg_set_queue() allows you to change the values of the msg_perm.uid, msg_perm.gid, msg_perm.mode and msg_qbytes fields of the underlying message queue data structure.

Changing the data structure will require that PHP be running as the same user that created the queue, owns the queue (as determined by the existing msg_perm.xxx fields), or be running with root privileges. root privileges are required to raise the msg_qbytes values above the system defined limit.

Parameters

queue

The message queue.

data

You specify the values you require by setting the value of the keys that you require in the data array.

Return Values

Returns true on success or false on failure.

Changelog

Version Description
8.0.0 queue expects a SysvMessageQueue instance now; previously, a resource was expected.

See Also

add a note add a note

User Contributed Notes 1 note

up
-1
webmaster at toolshed51 dot com
21 years ago
Example:
$msg_id = msg_get_queue (12341234, 0600);
msg_set_queue ($msg_id, array ('msg_perm.uid'=>'80'));

List of all possible keys at documentation for msg_stat_queue
To Top