Apache: Unable to load dynamic library - php

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

Related

Enable imap for PHP 7.4.14 - BIG SUR

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

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!

Impossible to load any php extensions on Apache after upgrading to Mavericks

After upgrading to Mavericks, and reinstalling both intl and apc with brew I still can't load any php extensions (and specifically those two).
I keep getting the following error without any idea how to move from there:
Wed Oct 30 18:19:15 2013] [notice] Apache/2.2.24 (Unix) PHP/5.4.17 DAV/2 mod_ssl/2.2.24 OpenSSL/0.9.8y mod_perl/2.0.7 Perl/v5.16.2 configured -- resuming normal operations
[Wed Oct 30 18:23:35 2013] [notice] caught SIGTERM, shutting down
[Wed Oct 30 18:23:36 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
httpd: Could not reliably determine the server's fully qualified domain name, using Julien.local for ServerName
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/intl.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/intl.so, 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-20090626/apc.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/apc.so, 9): image not found in Unknown on line 0
Do you have any idea where this can be coming from?
Found out that the php extension folder is now to be /usr/lib/php/extensions/no-debug-non-zts-20100525/ instead of /usr/lib/php/extensions/no-debug-non-zts-20090626. But php.ini hadn't been updated to point to the new extension folder.
after updating from php 5.3 to php 5.4 apc stopped loading than i installed apc version 3.1.9 (as they say it is last good version) manually like:
cd /usr/local/src/
wget http://pecl.php.net/get/APC-3.1.9.tgz
tar -xvf APC-3.1.9.tgz
cd APC-3.1.9
/usr/bin/phpize
./configure -enable-apc -enable-apc-mmap -with-apxs2=/usr/sbin/apxs -with-php-config=/usr/bin/php-config
make
make install
service httpd restart
and after that apc was not loading still than I looked for extension dir directive in php.ini and it was pointing to old dir than I checked php exstensions dir and found there new folder named no-debug-non-zts-20100525. so I fixed php.ini extension_dir directive for folder with new no-debug-non-zts-20100525 folder and it worked...

Categories