PHP 5.2.5 (x64) + Apache 2.2.12 (x64) + Mongo Errors

1,926 views
Skip to first unread message

BraveOne

unread,
Jun 9, 2010, 10:22:10 PM6/9/10
to mongodb-user
When I start Apache, I get the following error:

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Software
\\php-5.2.5-x64\\ext\\php_mongo.dll' - %1 is not a valid Win32
application.\r\n in Unknown on line 0

I'm running PHP 5.2.5 (x64) and Apache 2.2.12 (x64).

Am I using the wrong version of the driver? Is there a correct version
of the driver for my setup?

Kristina Chodorow

unread,
Jun 10, 2010, 10:15:30 AM6/10/10
to mongod...@googlegroups.com
Can you paste the output of php -i (or the first section of phpinfo())?


--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.


BraveOne

unread,
Jun 10, 2010, 7:19:45 PM6/10/10
to mongodb-user
Here's the first section of phpinfo():

PHP Version 5.2.5 (x64)

System Windows NT MY-PC 6.0 build 6002
Build Date Nov 12 2007 12:08:19
Configure Command cscript /nologo configure.js "--enable-snapshot-
build" "--enable-mysqlnd"
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\Windows
Loaded Configuration File C:\Software\php-5.2.5-x64\php.ini
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety enabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, data, http, ftp, compress.zlib
Registered Stream Socket Transports tcp, udp
Registered Stream Filters convert.iconv.*, string.rot13,
string.toupper, string.tolower, string.strip_tags, convert.*,
consumed, zlib.*

Kristina Chodorow

unread,
Jun 11, 2010, 12:53:24 AM6/11/10
to mongod...@googlegroups.com
It looks like you need the 5.2 non-thread safe VC6 version, is that what you're running?


--

Kristina Chodorow

unread,
Jun 11, 2010, 12:54:30 AM6/11/10
to mongod...@googlegroups.com
Er, thread safe, rather.

BraveOne

unread,
Jun 11, 2010, 6:53:33 PM6/11/10
to mongodb-user
I installed the 5.2 VC6 threadsafe version, but no dice. I still get
the same error. I downloaded mongo-1.0.7-r1-php5.2vc6ts.zip from here
http://github.com/mongodb/mongo-php-driver/downloads.

I think I'm going to punt and fall back to the latest 32-bit versions
of PHP and Apache.

BraveOne

unread,
Jun 12, 2010, 12:45:16 AM6/12/10
to mongodb-user
Thanks very much for your help. I reinstalled with the 32 bit
versions of Apache and PHP, and everything is working fine now.

On Jun 11, 12:54 am, Kristina Chodorow <krist...@10gen.com> wrote:
> Er, thread safe, rather.
>
> On Fri, Jun 11, 2010 at 12:53 AM, Kristina Chodorow <krist...@10gen.com>wrote:
>
> > It looks like you need the 5.2 non-thread safe VC6 version, is that what
> > you're running?
>
> >> mongodb-user...@googlegroups.com<mongodb-user%2Bunsu...@googlegroups.com>
> >> .

Kristina Chodorow

unread,
Jun 12, 2010, 1:20:43 AM6/12/10
to mongod...@googlegroups.com
Good to know, I don't know if I've ever tried it with 64-bit of everything on Windows, I'll set that up and see if I can figure out what was going wrong.  Glad 32-bit worked out for you!


To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.

miral patel

unread,
Apr 19, 2015, 6:48:34 AM4/19/15
to mongod...@googlegroups.com
how to solve api error in windows 8.1.
api cannot match...

Tim Hawkins

unread,
Apr 19, 2015, 4:52:32 PM4/19/15
to mongod...@googlegroups.com

What is the error you are getting?


On Sun, Apr 19, 2015, 18:48 miral patel <miralpa...@gmail.com> wrote:
how to solve api error in windows 8.1.
api cannot match...

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.

To post to this group, send email to mongod...@googlegroups.com.

Jeremy Mikola

unread,
Apr 20, 2015, 3:37:16 AM4/20/15
to mongod...@googlegroups.com
On Sun, Apr 19, 2015 at 4:49 AM, miral patel <miralpa...@gmail.com> wrote:
how to solve api error in windows 8.1.
api cannot match...

Please include more information when reporting an issue, as this is quite vague.

Since you mentioned PHP 5.2.5, it's possible you're seeing an error attempting to load a Windows DLL for a 1.6.x version of the driver. If that is correct, it would be because support for PHP 5.2 was dropped in 1.6.0 (noted in the changelog). 1.5.8 was the last release with 5.2 compatibility.

That said, you should certainly consider upgrading PHP itself, as 5.2 through 5.4 are no longer actively supported (see supported versions on PHP.net).
Reply all
Reply to author
Forward
0 new messages