Post: Warning: msg_get_queue (): failedforkey0x610005bd: Fileexistsin

Source: Internet
Author: User
Post: Warning: msg_get_queue (): failedforkey0x610005bd: Fileexistsin I wrote the following php file in my environment:
$ Msg_key = ftok (_ FILE __, 'A ');
$ Seg = msg_get_queue ($ msg_key, 0666 );
?>
The command line cannot output errors.

However, when executing a webpage, the following error occurs:
Warning: msg_get_queue (): failed for key 0x610005bd: File exists in/var/www/html/test/sysvmsg. php on line 4

I am troubled by this afternoon. please kindly advise me.
My Environment: linux + apache + php 5.3.3


Reply to discussion (solution)

Look at the php documentation to say http://php.net/msg_get_queue

Echo 100>/proc/sys/fs/mqueue/msg_max

Ftok returns an integer.
Msg_get_queue sends a message

The hexadecimal 0x610005bd is 1627391421 in decimal format.

Do you get and send this number?

If you are getting this message on your * NIX box:

Warning: msg_get_queue () [function. msg-get-queue]: failed for key 0x12345678: No space left on device in/path/to/script. php on line 1

You may use the command "ipcrm" as root to clear the message queue. Use "man ipcrm" to get more info on it.
The default setting for maximum messages in the queue is stored in/proc/sys/fs/mqueue/msg_max. To increase it to a maximum of 100 messages, just run:
Echo 100>/proc/sys/fs/mqueue/msg_max

Please ensure to follow a good programming style and close/free all your message queues before your script exits to avoid those warning messages.
This is in the manual. it is consistent with your situation!

You can use the command ipcrm as the root to clear the message queue, and then use man ipcrm to get more information.
The maximum number of messages in the queue is stored in/proc/sys/fs/mqueue/msg_max by default. to add up to 100 messages, run
Echo 100>/proc/sys/fs/mqueue/msg_max

Http://www.baidu.com/baidu? Wd = Warning % 3A + msg_get_queue % 28% 29% 3A + failed + for + key + 0x610005bd % 3A + File + exists + in + % 2 Fvar % 2 Fwww % 2 Fhtml % 2 Ftest % 2Fsysvmsg. php + on + line + 4 & tn = monline_dg

The reason is that SELinux is not closed.

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.