I would like to install Mongodb driver to Wamp so according the documentation I have downloaded mongo driver from this site and stored it in php/ext directory as the picture shows also in php.ini extension is included like next picture shows but php_error.log still shows me an error: [07-Nov-2018 09:33:56 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'mongodb' (tried: c:/wamp64/bin/php/php7.2.4/ext/mongodb (The specified module could not be found.), c:/wamp64/bin/php/php7.2.4/ext/php_mongodb.dll (The specified procedure could not be found.)) in Unknown on line 0
What am I doing wrong? Is there misssing something?
Make sure to restart Apache after make changes in php.ini, the architeture from .dll you have downloaded (compatible with your machine) etc, if the error persist, try this Reference, i had a similar issue, and i needed to put some .dll files (having nothing to do with mongo .dlls, yes it is strange!) from PHP installation to Apache bin directory.. Hope it helps!
Related
I am trying to install composer on my system but I am receiving an error "PHP Warning: PHP Startup: Unable to load dynamic library 'gd2'". I downloaded and placed the required gd_2.dll file in the folder. Checked php.ini for extension_dir and it has the absolute path E:\xampp\php\ext. Everything seems fine but I am still receiving this error. Please have a look at the screenshot below. In the image you can also see that I have the required .dll file highlighted which means I have the file that the installer reported as missing.
What should I do now?
I guess you have just installed PHP 8. Open your php.ini and locate the line near the bottom of the file:
[PHP_GD2]
extension=php_gd2.dll
Change the extension name from php_gd2.dll to php_gd.dll (this should match the one existing in your ext directory) and save the php.ini. Run the Composer installation again.
(PHP 8 somehow renamed php_gd2 to php_gd.)
I am getting the following error while installing composer 2.0 in the command-line PHP step. I am using xampp as a server.
The PHP exe file you specified did not run correctly:
C:\xampp\php\php.exe
The php.ini used by your command-line PHP is: C:\xampp\php\php.ini
A setting in your php.ini could be causing the problem: Either the 'extension_dir' value is incorrect or a dll does not exist.
Program Output:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_smtp.dll' - The specified module could not be found.
in Unknown on line 0
PHP Warning: Module 'openssl' already loaded in Unknown on line 0
I have checked there is no php_smtp.dll in ext folder in xampp should i add one??
Although last time I checked, composer worked on xamp just fine without any additional need, but maybe your project's composer.json file or some dependency requires that, so you may follow the instructions below.
php_smtp extension is inbuilt in latest PHP (5.3 and above) for older versions:
Download php_smtp.dll file, and please scan the downloaded php_smtp.dll file with your preferred antivirus-tool and use it at your own risk.
Move the downloaded php_smtp.dll file to your "C:\xamp\php\ext" directory.
Open C:\xamp\php\php.ini file, and go to "Dynamic Extensions" commented section, there copy-paste this line somewhere, maybe below other extensions: extension=php_smtp.dll
Last but not least, restart XAMP.
Finally, after hours of strugling, I finished installing PHP 7.02 on our IIS 7.5 Windows Server 2008. All functions properly except for one error:
[20-Jan-2016 15:19:26 UTC] PHP Warning: PHP Startup: Unable to load
dynamic library
'D:\PHP\php-7.0.2-nts-Win32-VC14-x64\ext\php_mysql.dll' - The
specified module could not be found. in Unknown on line 0
When checking the downloaded zip-file op PHP 7.02 it's clear that the folder ext doesn't contain a file called php_mysql.dll.
So my question is where can we get this file to avoid this error?
Thanks to the comment of Naruto I figured out that the dynamic loading of all the modules in the php\ext folder wasn't the culprit. Because the file php_mysql.dll wasn't in that folder, so it couldn't be loaded from there. After further analyses it seems that in the latest PHP (7.02) download for Windows 64-bit the php.ini file still contains this:
[PHP_MYSQL]
extension=php_mysql.dll
After commenting out the section the error in the log file was gone. As we obviously can't load that dll file anymore.
;[PHP_MYSQL]
;extension=php_mysql.dll
mysql extension was deprecated on v5.5 and removed on v7 please check out link below, https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7
For PHP 7.2 when using PDO for MySQL I had to un-comment the following line:
;extension=pdo_mysql
extension=pdo_mysql
It's worth noting that there are other versions of the PDO extension also commented out:
;extension=pdo_firebird
;extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
;extension=pdo_sqlite
I have to work on legacy project which runs on php_mysql. My local environment is windows/xampp with PHP version 7.
I have downloaded php_mysql.dll from somewhere and added it to my php extension path c:/xampp/php/ext and added the line extension=php_mysql.dll to php.ini file. But still extension_loaded("mysql") returns false.
I ran php on command line and I get the following error:
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_mysql.dll' - The specified module could not be found.
I have:
restarted the apache everytime I made a change
tried adding the full path to php.ini
How can I install this extension?
This is becoming a very frustrating issue. I am trying to do a clean install of apache 2.2 and PHP 5.2.11. Everything seems to be configured correctly but the php modules aren't starting...
PHP Warning: PHP Startup: Unable to load dynamic library '.;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/php_mcrypt.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '.;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '.;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/php_openssl.dll' - The specified module could not be found.\r\n in Unknown on line 0
in the php.ini
include_path = ".;C:\Program Files (x86)\Apache Software Foundation\Apache2.2\php"
extension_dir = ".;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/"
All the files are there... The .dll files such as ssleay32.dll, libmcrypt.dll, libmysql.dll, libeay32.dll are all installed at...
C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/
I also included them in the C:\Windows\System32
and even added C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ to the windows path.
I have no idea why this isn't working and it feels like a no win situation. Anyone have any ideas on how to get this all working ok?
Try this:
extension_dir = "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/"
without starting with the .;
You just uncomment the extension_dir in php.ini
Just for my future self if no-else. This is with PHP 5.2.13 running in Windows on IIS 8.
I got the following error:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_openssl.dll' - The specified module could not be found.
From phpinfo() the loaded php.ini file was C:\Program Files (x86)\PHP\php.ini.
The extension directory:
extension_dir ="C:\Program Files (x86)\PHP\ext"
These were the last two lines of the php.ini file:
[PHP_SQLSRV]
extension=php_sqlsrv_52_nts_vc6.dll
[PHP_OPENSSL]
extension=php_openssl.dll
The php_openssl.dll and php_sqlsrv_52_nts_vc6.dll files are in the ext directory. The php_openssl.dll isn't corrupt (it's the same file size as one on another machine that's working).
PHP will find the sqlsrv dll but not the openssl dll. No idea why. No amounts of IIS restarting did anything.
The solution until I know better was to install the openssl.dll extension using the Windows PHP installer. You can re-run the installer and select 'Change' and it allows you to add or remove libraries. I can't see any difference in the file or the php.ini file now, but now the file loads.
I suspect actually that my problem was similar to this comment about OpenSSL installation on Windows:
At this point, when you start Apache it will attempt to load php_openssl.dll, but if your setup is anything like mine you will see an error. I prefer to start Apache manually, and the error appears in a dialog box: "The ordinal 4114 could not be located in the dynamic link library LIBEAY32.dll". (I'm not sure whether you would get this message if you started Apache as a service). The Apache log also contains an error message saying that php_openssl.dll cannot be loaded, though that message doesn't name libeay32.dll. Welcome to DLL Hell.
Libeay32.dll enters the picture because php_openssl.dll depends on it (and also on ssleay32.dll). What I think happens is that Apache first tries to load php_openssl.dll programmatically from the path specified by the extension_dir key. But then, the loading of the so-called dependent DLLs is left to Windows' default mechanism. If Windows finds an incompatible version of a dependent DLL, you get the error.
I noticed errors about ssleay32.dll when trying to run php -i from the command line. I just assumed that it didn't have it in the environment. IIS made no mention of any ssleay32.dll errors in its logs.
Had same errors, but instead of copying files added php folder to system path and restated the server.
Windows 8.1 have a bib problem with system PATH names what cannot editable with the general editor because this line is too long......and for PHP module extension good loading must to define PHP path in the system enviroments.
ONLY one thing helped for me:
https://rix0rrr.github.io/WindowsPathEditor/