PHP 5.6.3 with MongoDB driver: Unable to load dynamic library ... not a valid Win32 application

2,300 views
Skip to first unread message

Caio Cesar Moreira

unread,
Jan 29, 2015, 1:36:32 PM1/29/15
to mongod...@googlegroups.com

Hi,

I'm getting the following error when starting Apache with PHP to work with MongoDB:

[29-Jan-2015 18:25:20 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '\xampp-portable-win32-5.6.3-0-VC11\xampp\php\ext\php_mongo.dll' - %1 is not a valid Win32 application.

I tried all DLLs from: http://pecl.php.net/package/mongo/1.6.0/windows

Including the following:

DLL List
PHP 5.6 5.6 Non Thread Safe (NTS) x86
5.6 Thread Safe (TS) x86
5.6 Non Thread Safe (NTS) x64
5.6 Thread Safe (TS) x64

They were copied to the ext folder and the system finds it (it is not a path issue).

System details:

  • MongoDB v2.6.7
  • Server API Apache 2.0 Handler

  • PHP Version 5.6.3

  • Windows 7 - 64-bits

  • Compiler MSVC11 (Visual C++ 2012)
Can someone help me getting this fixed please?

Thanks in advance,
Caio




s.molinari

unread,
Feb 1, 2015, 7:10:03 AM2/1/15
to mongod...@googlegroups.com
Looks like XAMPP is only 32bit.

You'll need this DLL 

php_mongo-1.6.0-5.6-vc11-nts.dll

out of this driver package. 


Add the .dll file to your \xampp-portable-win32-5.6.3-0-VC11\xampp\php\ext\ directory and rename it "php_mongo.dll". Restart Apache.

Scott
Reply all
Reply to author
Forward
0 new messages