Enable imap for PHP 7.4.14 - BIG SUR - php

i am trying to enable my local development environment, and i have the Apache, PHP and MariaDB already installed in my Big Sur Mac. (all installed with brew)
But the imap php extension does not work and that's because the PHP is not loading the extension.
The Apache error_log throws:
PHP Warning: PHP Startup: Unable to load dynamic library 'imap'
(tried: /usr/local/lib/php/pecl/20190902/imap (dlopen(/usr/local/lib/php/pecl/20190902/imap,
9): image not found), /usr/local/lib/php/pecl/20190902/imap.so
(dlopen(/usr/local/lib/php/pecl/20190902/imap.so, 9): image not found)) in Unknown on line 0
[Sun Jan 17 09:30:08.936003 2021] [mpm_prefork:notice] [pid 2187] AH00163: Apache/2.4.46
(Unix) PHP/7.4.14 configured -- resuming normal operations
[Sun Jan 17 09:30:08.936124 2021] [core:notice] [pid 2187] AH00094: Command line:
'/usr/local/opt/httpd/bin/httpd -D FOREGROUND'
brew list command throws:
imap-uw, php#7.4, ........
Thanks in advance guys
MacOS BigSur 11.1

The extension is right here (with instructions):
shivammathur Homebrew Extensions

Related

Unable to load dynamic library php_sqlsrv on easyphp

I'm trying to install the SQL server extension for PHP, but the extension is not visible in phpinfo().
I'm on windows 10 with easyPHP,
I installed ODBC Driver 13 for SQL Server.
My error log of apache
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files (x86)\\EasyPHP-Devserver-17\\eds-binaries\\php\\php713vc14x86x170919113050\\ext\\php_sqlsrv_71_nts_x86.dll' - Le module sp\xef\xbf\xbdcifi\xef\xbf\xbd est introuvable.\r\n in Unknown on line 0
[Mon Nov 06 11:47:53.108947 2017] [mpm_winnt:notice] [pid 8260:tid 664] AH00354: Child: Starting 64 worker threads.
Thank you for your help

MongoDB driver for PHP not working

I have downloaded PHP driver for mongodb from https://pecl.php.net/package/mongodb
Then I have copied php_mongodb.dll in xampp/php/ext folder
and also added extension=php_mongodb.dll in php.ini file
But still mongodb extension in not loading, it is not showing in phpinfo().
In the PHP error log file I find this PHP Warning:
PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_mongodb.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0 [Wed Apr 19 11:09:54.445878 2017] [mpm_winnt:notice] [pid 2120:tid 268] AH00354: Child: Starting 150 worker threads.
Please help.
I am running windows 7 on 64 bit

Adding the ZeroMQ PHP extension to XAMPP on Windows 10 and PHP7

I am having issues adding the ZeroMQ PHP extension to XAMPP.
Setup: Windows 10, PHP7, XAMPP (7.0.9)
Steps I already took:
Added PHP (D:\xampp7\php) and PHP extensions (D:\xampp7\php\ext) directories to system variable (PATH)
Followed the instructions on zeromq.org. I downloaded x86ts version from the pecl repository as the listed snapshot link (http://snapshot.zero.mq/) was down.
Copied libzmq.dll into PHP directory and php_zmq.dll into the PHP extension directory
Updated php.ini (D:\xampp7\php\php.ini) by adding extension=php_zmq.dll and checked the extensions directory which is extension_dir="D:\xampp7\php\ext"
Restarted XAMPP via the control panel.
The Apache error log shows the following:
[Sat Nov 26 18:30:27.461679 2016] [ssl:warn] [pid 15280:tid 588] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 26 18:30:27.546320 2016] [core:warn] [pid 15280:tid 588] AH00098: pid file D:/xampp7/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Nov 26 18:30:27.630955 2016] [ssl:warn] [pid 15280:tid 588] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp7\\php\\ext\\php_zmq.dll' - Das angegebene Modul wurde nicht gefunden.\r\n in Unknown on line 0
[Sat Nov 26 18:30:27.662208 2016] [mpm_winnt:notice] [pid 15280:tid 588] AH00455: Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/7.0.9 configured -- resuming normal operations
[Sat Nov 26 18:30:27.662208 2016] [mpm_winnt:notice] [pid 15280:tid 588] AH00456: Apache Lounge VC14 Server built: Jul 1 2016 11:09:37
[Sat Nov 26 18:30:27.662208 2016] [core:notice] [pid 15280:tid 588] AH00094: Command line: 'd:\\xampp7\\apache\\bin\\httpd.exe -d D:/xampp7/apache'
[Sat Nov 26 18:30:27.662208 2016] [mpm_winnt:notice] [pid 15280:tid 588] AH00418: Parent: Created child process 964
[Sat Nov 26 18:30:28.363210 2016] [ssl:warn] [pid 964:tid 616] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
Update:
It looks like the module cannot be found, but if I add the x64 Version the Apache error log indicates that the module is not a not a valid Win32 application.
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp7\\php\\ext\\php_zmq.dll' - %1 ist keine zul\xef\xbf\xbdssige Win32-Anwendung.\r\n in Unknown on line 0
Solution:
Adding LoadFile "D:/xampp7/php/libzmq.dll"to httpd.conf fixed my issue.
these steps worked for me (php 7.1.7 - xampp - window 10 x64)
Step 1
download x86 dll files from this site
Step 2
copy php_zmq.dll to C:\xampp\php\ext
Step 3
copy libsodium.dll and libzmq.dll to C:\xampp\php
Step 4
add extension=php_zmq.dll to php.ini file
Step 5
restart apache
I know this is an old question although I just spent 2 days trying to get ZeroMQ to load properly. If anyone still cant get it to work after following all the basic instructions, I have 2 more steps you can look into.
Got it working with php 7.3.12, Win10 x64
1st. Make sure you edit all php.ini files.
If you use wamp server, Apache will have it's own php.ini that is opened up when you click on the wamp icon in the bottom right of windows and go to php->php.ini. Then manually add the same extension=php_zmq.dll there as well as your php.ini under D:\xampp7\php\php.ini. To be honest, I'm not 100% sure that this is necessary but including it on both cant hurt.
2nd. Run deplister.exe on libzmq.dll
This is what got it working for me. Any php download from windows.php.net should have deplister.exe (it is included in wamp php versions too). Go to your php version library on your wamp server where libzmq.dll and deplister.exe are located. Then open up cmd and run the line: deplister php_zmq.dll This will show you a list of the dependencies that php_zmq.dll requires to run. You may notice that it requires a VERY specific version of libzmq.dll so go and rename your dll file to the requested file name. Then run php -m to see if zmq is displayed on the list of modules. If so, you should be able to run commands like composer update to get the required library versions imported into your project without error!

Apache: Unable to load dynamic library

Apache 2.4.4 is not loading two modules. The modules exist in the directory where it is looking.
I'm using Windows 8.1, PHP 5.4.12, and a WAMPServer installation.
[Thu Oct 20 19:12:33.092619 2016] [mpm_winnt:notice] [pid 6888:tid 548] AH00418: Parent: Created child process 3172
PHP Warning: PHP Startup: Unable to load dynamic library 'm:/wamp/bin/php/php5.4.12/ext/php_pdo_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'm:/wamp/bin/php/php5.4.12/ext/php_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0
[Thu Oct 20 19:12:33.319122 2016] [mpm_winnt:notice] [pid 3172:tid 448] AH00354: Child: Starting 150 worker threads.
My PHP, Apache, and PostgreSQL are all 64 bit.
I added the directory (m:\PostgreSQL\9.3\lib) that includes libpq.dll to my Path and then restarted but it didn't help.
I also tried copying libpq.dll into the Apache bin directory.
Are there any other dependencies?
I fixed it by adding the PostgreSQL bin directory to the Path (Environmental Variable).
for my case PHP 7.2.26 , it was under:
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
on php.ini such that ;extension=pgsql becomes:
extension=pgsql

Call to undefined function pg_connect()

I am running the latest version of PHP (currently 5.6.22) on OSX El Capitan and Apache server.
I am trying to use PostgreSQL database and actually, yesterday already worked but after I haver overridden httpd.conf file with a default one (I guess this is the problem) I got this message:
Call to undefined function pg_connect() in ...
The thing is that I haven't changed php.ini file. If I run phpinfo(); I get etc/php.ini for a Configuration File. So I am positive that Apache choose the right php.ini file and that correct extensions are loaded:
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
What can cause this error ? Also I have installed pgAdmin 3 and I can successfully run SQL queries on created database (which I have used yesterday for this site I am working on).
EDIT:
This is what I get in error_log file when I restart Apache server and try to run that specific page (which calls pg_connect):
[Thu Jun 02 15:28:15.595496 2016] [mpm_prefork:notice] [pid 476]
AH00169: caught SIGTERM, shutting down [Thu Jun 02 15:28:16.515774
2016] [so:warn] [pid 670] AH01574: module php5_module is already
loaded, skipping PHP Warning: PHP Startup: Unable to load dynamic
library
'/usr/lib/php/extensions/no-debug-non-zts-20121212/php_curl.dll' -
dlopen(/usr/lib/php/extensions/no-debug-non-zts-20121212/php_curl.dll,
9): image not found in Unknown on line 0 PHP Warning: PHP Startup:
Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20121212/php_mbstring.dll' -
dlopen(/usr/lib/php/extensions/no-debug-non-zts-20121212/php_mbstring.dll,
9): image not found in Unknown on line 0 PHP Warning: PHP Startup:
Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20121212/php_mysqli.dll' -
dlopen(/usr/lib/php/extensions/no-debug-non-zts-20121212/php_mysqli.dll,
9): image not found in Unknown on line 0 PHP Warning: PHP Startup:
Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20121212/php_pdo_pgsql.dll'
- dlopen(/usr/lib/php/extensions/no-debug-non-zts-20121212/php_pdo_pgsql.dll,
9): image not found in Unknown on line 0 PHP Warning: PHP Startup:
Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20121212/php_pdo_sqlite.dll'
- dlopen(/usr/lib/php/extensions/no-debug-non-zts-20121212/php_pdo_sqlite.dll,
9): image not found in Unknown on line 0 PHP Warning: PHP Startup:
Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20121212/php_pgsql.dll' -
dlopen(/usr/lib/php/extensions/no-debug-non-zts-20121212/php_pgsql.dll,
9): image not found in Unknown on line 0 PHP Warning: PHP Startup:
Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20121212/php_soap.dll' -
dlopen(/usr/lib/php/extensions/no-debug-non-zts-20121212/php_soap.dll,
9): image not found in Unknown on line 0 PHP Warning: PHP Startup:
Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20121212/php_sockets.dll' -
dlopen(/usr/lib/php/extensions/no-debug-non-zts-20121212/php_sockets.dll,
9): image not found in Unknown on line 0 PHP Warning: PHP Startup:
Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20121212/php_sqlite3.dll' -
dlopen(/usr/lib/php/extensions/no-debug-non-zts-20121212/php_sqlite3.dll,
9): image not found in Unknown on line 0 [Thu Jun 02 15:28:16.615703
2016] [mpm_prefork:notice] [pid 670] AH00163: Apache/2.4.18 (Unix)
PHP/5.5.31 configured -- resuming normal operations [Thu Jun 02
15:28:16.615786 2016] [core:notice] [pid 670] AH00094: Command line:
'/usr/sbin/httpd -D FOREGROUND' [Thu Jun 02 15:28:20.869683 2016]
[:error] [pid 674] [client 127.0.0.1:49594] PHP Fatal error: Call to
undefined function pg_connect() in
/Library/WebServer/Documents/site/database.php on line 10
This happens when your pgsql extension is not installed or is not compatible with your current server build (x86/x64).
Check if you have the correct file in you ext folder: php_pgsql.so (or php_pgsql.dll if youre running on windows)
Search for the line extension=php_pdo_pgsql.dll in your php.ini. Then just add it if not found or remove the comma if its commented
Run phpinfo() and check if the extension is enabled
If you found it, its good to go

Categories