I have followed instructions down to the letter, but WAMP is not loading php_mongo.dll.
I have downloaded the latest version of WAMP and the MongoDB PHP driver, made sure I am using the correct versions and have also tried a few different versions, added lines to the php.ini file, but to no avail.
Currently I have:
Wamp Server version 2.5, just did a clean install.
MongoDB driver version 1.5.4-5.5 (thread safe) vc11 build for x86 (running 32 bit Windows).
Renamed the file 'php_mongo.dll' and put it in the standard extension directory (C:\wamp\bin\php\php5.5.12\ext).
Added the line extension=php_mongo.dll to the php.ini file and checked it stays there after saving and closing the file.
Ensured that it appears in the list of extensions and is ticked on the Wamp control panel.
But I can't get it to show by using phpinfo(), so I assume that means it cannot start. Every tutorial says to 'make sure you're using version x or stable release y'. I have tried about 15 different combinations and this is the closest I have got.
Can anyone help?
UPDATE:
Got rid of WAMP as I wanted finer control. I've got Apache 2.2 and PHP 5.4.12 working great, but Mongo is still not playing ball. I've checked the server logs and it's giving me this line:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\ext\php_mongo.dll' - The specified module could not be found.\r\n in Unknown on line 0
When I used a different version of the driver I got an error saying it wasn't a valid win32 program, but now it's saying that (even though that file DOES exist).
Related
I have a Windows 2012 R2 server with XAMPP installed. I need to connect to a Microsoft SQL Server database but I saw the mssql-library is no longer supported and I was redirected to the official Microsoft package SqlSrv.
I've unzipped all files to d:\xampp\php\ext and I've added extension=php_pdo_sqlsrv_56_nts.dll in my php.ini.
Using XAMPP's controlpanel I've restarted Apache but it didn't work. I'm always getting the errors:
[20-Apr-2015 08:38:08 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_pdo_sqlsrv_56_nts.dll' - The specified module could not be found.
in Unknown on line 0
[20-Apr-2015 08:38:08 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_pdo_sqlsrv_56_nts.dll' - The specified module could not be found.
in Unknown on line 0
I've checked a few times to be sure the filename is correct. The file truely exists. All system users have full control over the file (any file in the \ext directory for that matter). It also doesn't matter to switch to a ts or non-pdo variant.
I'm running PHP 5.6.3. Any suggestions? I'm out of ideas to look for the issue...
Update 1:
Via several form posts I came across a C++ Redistributable to install, so I've got that covered. But still I'm missing out on some DLL's according do depends.exe (Dependency Walker).
To this point I'm missing the following DLL's:
API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.DLL
API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL
API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL
PHP5.DLL
API-MS-WIN-CORE-SHUTDOWN-L1-1-1.DLL
EXT-MS-WIN-NTUSER-UICONTEXT-EXT-L1-1-0.DLL
IESHIMS.DLL
SETTINGSYNCPOLICY.DLL
WLANAPI.DLL
I assume they're part of a package I'm missing. I also saw some posts about installing the latest SQL Server Native Client. But as far as I found the latest version is 11, but is too old for Windows 2012R2.
Update 2:
On this forum page I saw a useful reaction (in German) telling SqlSrv can't work with the latest available XAMPP PHP version. So I've reinstalled XAMPP with PHP 5.5.19 now, but this still didn't help.
How to proceed?
Okay, I've found out what's wrong.
At this moment I'm succesfully running SqlSrv on my Windows 2012R2 machine with XAMPP. The main problem was I was using the *nts.dll files. Using Dependency Walker I was able to get a list of dll's that were not loaded succesfully. One of the DLL's listed there was php5.dll. It took me a while to figure out that would be strange. I've inspectected my php folder and I saw the file php5ts.dll in there, but no php5.dll So I Googled for sqlsrv php5.dll and I came across this page from Microsoft.
That page lists which drivers work with which DLL for PHP. I've switched the modules from nts to ts and now everything is working as expected. At this moment I've also installed the C++ redistributable to fix the MSVCP110.dll issue but I'm not sure if that was mandatory to get it working. If you run into the same issue maybe you'll also have to install this patch (Microsoft downloadpage, I've downloaded VSU_4\vcredist_x86.exe)
Good luck future solution seekers!
I'm using XAMPP and trying to configure Oracle connection for sql.
I uncommented the line extension=php_oci8.dll and at first it ended up with an error (that oci.dll is missing), but later I downloaded instantclient from Oracle web pages. I tried with versions 10.2, 11.2, and 12.1 but neither worked. Obviously I've added the path to those libraries to my PATH env variable.
The warning I'm getting at the startup of Apache is: PHP Warning: PHP Startup: in Unknown on line 0
The error when I'm trying to connect is: PHP Fatal error: Call to undefined function oci_connect() in ...
I've tried with php_oci8.dll and php_oci8_11g.dll. Those files are in my php/ext directory (they were included in xampp), my instantclient is added to PATH and the warning doesn't show up if I disable those modules. I've tried restarting services and computer.
Can you help me find a solution how to configure it correctly? I'm using Windows 8.1 with administrative privileges.
BTW. My phpinfo() says that OCI8 is activated (but functions like oci_connect still don't work).
EDIT: When I tried running PHP manually I finally got the error to display what was wrong: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_oci8_11g.dll' - %1 is not a valid Win32 application. in Unknown on line 0 Can you help me find out where can I download a correct version?
There was a problem with 64bit version of instantclient. If you ever have the same issue, please install 32bit version of instantclient.
To be honest the easiest way is just to follow PROPER instructions: http://www.oracle.com/technetwork/articles/dsl/technote-php-instant-084410.html
I tried a lot of other advices and they all went really bad on me (not just because I used different bit version - also I copied the files everywhere following stupid advices and it was hard to correct it)
Its because your Oracle is 64 bit. Remove it and install a 32 bit version of Oracle client and it will work.
It looks like your extension are not install properly. Try to update it or reinstall it with pecl with
pecl install extname
You should also check extension_dir directive in php.ini and check if the PHP folder is added to the path
There's an alternate way to solve this: Install the full Oracle Client, not the basic zip, you can get it at oracle site (about 1Gb):
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle12c-windows-3633015.html
Im using Windows 10, Apache 2.4, PHP 7.1 (all x64) and it works. Also tryed PHP 5.6 and it works too. Still use the php_oci8_11g.dll from the basic client zip to match your php and system version.
You can search the site to find older client versions (11g, 32bits, etc) but Im working with de 12c client and accessing an Oracle 11g enterprise server.
I found a lot of occurrencies of this same error all around, but none gave me this solution. Hope taht helps.
I'm trying to get PHP to load some extensions (sqlsrv driver for PHP PDO).
I'm using a wamp server, With PHP 5.4, Apache 2.4.4.
In my PHP.ini file, i've entered the following line:
extension_dir = C:\wamp\bin\php\php5.4.16\ext
...
extension=php_pdo_sqlsrv_54.nts.dll
However in the apache error log, whenever I restart the apache service, I get the error message:
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.16/ext/php_pdo_sqlsrv_54_nts.dll' - The specified module could not be found.\r\n in Unknown on line 0
Now, I know for a fact, this error is incorrect. If I copy the file location directly from the error log, (C:\wamp\bin\php\php5.4.16\ext\php_pdo_sqlsrv_54_nts.dll) and paste it into windows explorer, it finds the file fine.
I've added the ext directory to windows PATH environment variable, still no success.
Any ideas what to try next?
Thanks
Your problem is that you are trying to run a NTS 'Not Thread Safe' dll with a PHP that is 'Thread Safe', so initially try downloading the Thread Safe version of the sqlsrv DLL.
BIG NOTE and possibly your next problems solution:
As far as I know the sqlserver database interface dlls are only available as 32bit. So if you have installed the 64bit WAMPServer you will have to uninstall and install the 32bit WAMPServer.
Goal
Connect to a MSSQL 2008 R2 server using the FreeTDS (php_dblib.dll 0.82 + 20110906 patches) Drivers for PHP 5.4.16 (VC9).
I am unable to use any alternative to FreeTDS unless the client also decides to use an alternative. This is unlikely unless they also run into this issue when upgrading their current version of PHP (currently 5.3.x) tomorrow.
Issue
PHP is unable to load the FreeTDS extension.
The Apache error log displays this on server start:
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.16/ext/php_dblib.dll' - The specified module could not be found.\r\n in Unknown on line 0
As far as I understand it, the extension is either unable to be found or is the wrong version?
The extension directory location in the php.ini has been checked and triple checked and is:
c:/wamp/bin/php/php5.4.16/ext/
That leads me to believe it is the wrong version of php_dblib.dll. I've also checked that multiple times and made sure to use the version for PHP 5.4.X Thread Safe.
Steps Taken
Clean install of WAMP 2.4 with PHP 5.4.16 and Apache 2.4.4
Thread Safe php_dblib.dll placed in PHP extension directory
extension=php_dblib.dll added to the correct php.ini
extension=php_mssql.dll and extension=php_pdo_mssql.dll disabled in php.ini
msvcr71.dll (DotNet framework 1.1) added to PHP root directory
freetds.conf added to server root directory (c:)
System Details
WAMP Server 2.4
Apache 2.4.4
PHP 5.4.16 (VC9)
Thread Safety: enabled
FreeTDS Thread Safe (php_dblib.dll) 0.82 + 20110906 patches
Microsoft SQL Server 2008 R2
msvcr71.dll (DotNet framework 1.1) only included in the PHP root directory
EDIT:
WAMP 2.4 32-bit
OS: Windows 7 Pro 64-bit
EDIT 3
Last update only applied to the 64-bit version of WAMP. I've installed the 32-bit version, again, and --without-dblib is no longer in the configure command section of the phpinfo().
Questions
With the information given, is there anything else you'd need to know about to give an accurate assessment of the situation?
I am unable to find any, but are there any known issues with FreeTDS 0.82 and PHP 5.4.16?
Temporary Defeat
I've rolled back to PHP 5.3.x for now, FreeTDS works fine on that version. I'm not sure that it will make a difference with the little bit of code I am actually delivering to the client. This was intended to be a "double" check to make sure it all works perfectly, but since I'll be on site during the install I can fix any issues if they come up.
I would like to find a solution eventually since more and more of the systems I work with every day are going to be upgraded to php 5.4 and beyond.
I am getting an error:
"Fatal error: Uncaught exception 'RuntimeException' with message 'The "mssql" extension is not loaded' in ..."
Though it is enabled. In php.ini (PHP version 5.3.4) it is uncommented out (no ;) before extension=php_mssql.dll and its showing up as checked off on the PHP extentions list in wamps system tray menu. What might be causing this?
Also semi related, I can't run php version 5.3.1. I downloaded and installed it but when i switch to it in wamp, the wamp system try stays yellow (instead of white indicating its ready to go). And no php loads anywhere / can't get to localhost or phpmyadmin at all. I tried to run 5.3.1 as a work around for this mssql error.
I am running WampServer Version 2.1 on a windows 7 64 bit box. This same exact setup works just fine on my windows XP (32-bit) box running 5.3.1.
Same issue. My apache log is showing
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.4/ext/php_mssql.dll' - The specified module could not be found.\r\n in Unknown on line 0.
I have the same issue with the ZIP module. The modules are legitimately not there.
I tried downgrading to PHP 5.3.1 from http://www.wampserver.com/en/addons_php.php, but then my Apache wouldn't start up at all; I'm guessing that was an x64/x86 issue.
Then tried copying the php_mssql.dll from 5.3.1 to my 5.3.4 directory, then restarting apache and it was just more fail with
PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.4/ext/php_mssql.dll' - %1 is not a valid Win32 application.
Installing WampServer 2.1e (the active build) but 32-bit to see if there were any differences. There were. This build packages PHP 5.3.5, which still doesn't include php_mssql.dll. BUT I was then able to use PHP 5.3.1 I had downloaded (apparently it is capable with this WAMP Build, whether because it's 2.1e or because 32-bit, I don't know or care).
So, the point of the story is that if you're trying to use WAMP Server with PHP's MSSQL extension, you're going to want Wamp Server 2.1e (32-bit, specifically) and PHP 5.3.1.
Also note, I still can't get the ZIP extension working with this setup, but luckily for me it's not essential to my current project.
Hope that helps someone.