Can’t find symbol sqlite3_enable_load_extension after install PHP on macOS Monterey via brew

  apache, homebrew, macos, macos-monterey, php

install php via brew, follow the instructions like this

To enable PHP in Apache add the following to httpd.conf and restart Apache:
    LoadModule php_module /usr/local/opt/php/lib/httpd/modules/

    <FilesMatch .php$>
        SetHandler application/x-httpd-php

Finally, check DirectoryIndex includes index.php
    DirectoryIndex index.php index.html

The php.ini and php-fpm.ini file can be found in:

To restart php after an upgrade:
  brew services restart php
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/php/sbin/php-fpm --nodaemonize
==> Summary
🍺  /usr/local/Cellar/php/8.1.0: 512 files, 79.9MB
==> Running `brew cleanup php`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

to enable php and this to sign the

After this, when i run apachectl configtest, I got error like this
httpd: Syntax error on line 190 of /private/etc/apache2/httpd.conf: Cannot load /usr/local/Cellar/php/8.1.0/lib/httpd/modules/ into server: dlopen(/usr/local/Cellar/php/8.1.0/lib/httpd/modules/, 0x000A): Symbol not found: _sqlite3_enable_load_extensionn Referenced from: /usr/local/Cellar/php/8.1.0/lib/httpd/modules/libphp.son Expected in: /usr/lib/libsqlite3.dylib

what should i do?

Source: Ask PHP