在Windows 7中调用未定义的函数msg_get_queue()

I am using Windows 7, xampp version 1.8.1 and php version 5.4.7

Here is the problematic code

 $queue = msg_get_queue(100379);

I am getting this error:

Call to undefined function msg_get_queue()

Can anyone help me with this?

You need to install Semaphore extension before accessing the functions

Reference http://www.php.net/manual/en/sem.installation.php

Installation

Support for this functions are not enabled by default. To enable System V semaphore support compile PHP with the option --enable-sysvsem . To enable the System V shared memory support compile PHP with the option --enable-sysvshm . To enable the System V messages support compile PHP with the option --enable-sysvmsg .