0

I'm using amazon linux2 and trying to install pcntl extension for php7.4.9. There are no package for pcntl after run yum search pcntl, so I manually copied file pcntl.so to /usr/lib64/php/modules and created /etc/php.d/20-pcntl.ini, file.

But I got error PHP Warning: Module 'pcntl' already loaded in Unknown on line 0

# php -r "print_r(get_loaded_extensions());"
Array
(
    [0] => Core
    [1] => date
    [2] => libxml
    [3] => openssl
    [4] => pcre
    [5] => zlib
    [6] => filter
    [7] => hash
    [8] => pcntl
    [9] => readline
    [10] => Reflection
    [11] => SPL
    [12] => session
    [13] => standard
    [14] => bcmath
    [15] => bz2
    [16] => calendar
    [17] => ctype
    [18] => curl
    [19] => dom
    [20] => mbstring
    [21] => fileinfo
    [22] => ftp
    [23] => gd
    [24] => gettext
    [25] => iconv
    [26] => intl
    [27] => json
    [28] => exif
    [29] => mysqlnd
    [30] => PDO
    [31] => Phar
    [32] => posix
    [33] => shmop
    [34] => SimpleXML
    [35] => sockets
    [36] => sqlite3
    [37] => sysvmsg
    [38] => sysvsem
    [39] => sysvshm
    [40] => tokenizer
    [41] => xml
    [42] => xmlwriter
    [43] => xsl
    [44] => zip
    [45] => mysqli
    [46] => pdo_mysql
    [47] => pdo_sqlite
    [48] => xmlreader
)

So I can't use function pcntl_async_signals. Where was my config wrong?

2
  • It sounds like it is already installed. What is the real problem you had? – Michael Hampton Oct 13 '20 at 13:09
  • @MichaelHampton I guess that, PHP CLI and PHP FPM is different. But they are using same php.ini file – HoangNK Oct 15 '20 at 2:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.