インストール手順

この関数はデフォルトでは有効になってはいません。System V セマフォの サポートを有効にするには、オプション --enable-sysvsem を指定して PHP を コンパイルする必要があります。System V 共有メモリのサポートを有効にするには、 オプション --enable-sysvshm を 指定して PHP をコンパイルする必要があります。System V メッセージを有効に するには、オプション --enable-sysvmsg を指定して PHP をコンパイル します。

add a note

User Contributed Notes 1 note

up
-17
sparcbr at gmail dot com
3 years ago
It should be mentioned that depending on the system, an module can be available.

On CentOS I just ran:
sudo yum install php73-php-sysvsem

then reload:
sudo service php-fpm reload (or apache, depending on your case)

and semaphore functions are now available.
To Top