Bug #73050 [Nab]: Not able to make mongodb to work in Bitnami wampstack-5.6.20-0

From: Date: Sat, 10 Sep 2016 23:19:40 +0000
Subject: Bug #73050 [Nab]: Not able to make mongodb to work in Bitnami wampstack-5.6.20-0
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203955@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73050&edit=1 ID: 73050 Updated by: cmb@php.net Reported by: g dot statkute at gmail dot com Summary: Not able to make mongodb to work in Bitnami wampstack-5.6.20-0 Status: Not a bug Type: Bug Package: *General Issues Operating System: Windows 10 PHP Version: 5.6.25 Assigned To: cmb Block user comment: N Private report: N New Comment: > Everything works with thread safe version x86. Fine! > There could be more instructions on pecl website how to install > for the beginners. There is rather good documenation available on <http://php.net/manual/en/install.pecl.windows.php>. On the PECL start page there's a link to "PECL specific docs", and that page links to "How to install a PECL extension", which leads to Windows installation instructions. Not so bad at all. :-) Also note that there are several support channels available, see <http://php.net/support.php>. :-) Previous Comments: ------------------------------------------------------------------------ [2016-09-10 21:40:07] g dot statkute at gmail dot com Thank you so much for replying on late Saturday evening. Everything works with thread safe version x86. p.s. There could be more instructions on pecl website how to install for the beginners. ------------------------------------------------------------------------ [2016-09-10 19:49:41] cmb@php.net > How to choose thread-safe or non-thread-safe version with pecl? Frankly, I don't know, but I wouldn't recommend using the pecl installer on Windows. Just download the appropriate DLLs of the respective PECL package directly. > Nevertheless, the instllation of packages related to mongodb > using composer is still not working. I am getting the error > doctrine/mongodb dev-master requires ext-mongo ^1.5 . Apparently, doctrine/mongodb requires PECL/mongo[1], but not PECL/mongodb[2]. [1] <https://pecl.php.net/package/mongo> [2] <https://pecl.php.net/package/mongodb> ------------------------------------------------------------------------ [2016-09-10 19:30:09] g dot statkute at gmail dot com You are right: i have x86 architecture. System Windows NT AMBER 10.0 build 10586 (Windows 10) i586 Build Date Mar 31 2016 14:47:48 Compiler MSVC11 (Visual C++ 2012) Architecture x86 I have tried both: thread safe and tread non-safe mongodb installation, and many versions. How to choose thread-safe or non-thread-safe version with pecl? Now it works, thus does not matter. Maybe i made some mistake somewhere. As i wrote, to make mongodb to work, i have opied mongodb.dll and mongo.dll from Bitnami MeanStack to WampStack and restarted apache. Mongodb worked in htdocs/index.php or in htdocs/symfony_project/controller/SomeController.php . Nevertheless, the instllation of packages related to mongodb using composer is still not working. I am getting the error doctrine/mongodb dev-master requires ext-mongo ^1.5 . composer.json "require": { "doctrine/mongodb": "dev-master", "alcaeus/mongo-php-adapter": "^1.0.0", "doctrine/mongodb-odm": "~1.1", "doctrine/mongodb-odm-bundle": "~3.0", ------------------------------------------------------------------------ [2016-09-09 13:39:16] cmb@php.net I presume that wampstack-5.6.20-0 is build for x86, so you should use the respective x86 php_mongo.dll. Check phpinfo() regarding whether you need the thread-safe or non-thread-safe version. ------------------------------------------------------------------------ [2016-09-08 20:59:42] g dot statkute at gmail dot com Description: ------------ Everything is described here: http://stackoverflow.com/questions/39397930/how-to-install-mongodb-on-bitnami-wamp-windows-for-using-with-symfony-3 Symfony installation (does not work) composer.json "require": { "doctrine/mongodb": "dev-master", "alcaeus/mongo-php-adapter": "^1.0.0", "doctrine/mongodb-odm": "~1.1", "doctrine/mongodb-odm-bundle": "~3.0", 2a) I followed the steps http://php.net/manual/en/mongo.installation.php#mongo.installation.windows Downloaded mongodb.dll 1.8.8 from http://pecl.php.net/package/mongodb unzipped to: C:\Bitnami\wampstack-5.6.20-0\php\ext\php_mongodb-1.1.8-5.6-ts-vc11-x64 I tried both thread safe and unsafe versions. Both gave the same errors. and copied file php_mongodb.dll to C:\Bitnami\wampstack-5.6.20-0\php\ext and corrected php.ini by adding extension=php_mongodb.dll. Nevertheless iam getting the error Unable to load dynamic library: c:\Bitnami\wampstack-5.6.20-0\apache2\htdocs\sym\patmonS1>php PHP Warning: PHP Startup: Unable to load dynamic library 'C:/Bitnami/wampstack-5.6.20-0/php/ext\php_mongodb.dll' - %1 is not a valid Win32 application. in Unknown on line 0 2b) If i try to install using pecl, i am getting the error invalid package: :\Bitnami\wampstack-5.6.20-0\php\ext>pecl install mongodb downloading mongodb-1.1.8.tgz ... Starting to download mongodb-1.1.8.tgz (806,900 bytes) .................................................................................................................................................................done: 806,900 bytes could not extract the package.xml file from "C:\Bitnami\wampstack-5.6.20-0\php\pear\download\mongodb-1.1.8.tgz" Download of "pecl/mongodb" succeeded, but it is not a valid package archive Error: cannot download "pecl/mongodb" Download failed install failed 2c) If i try to install mongoDB with composer, i am getting the error doctrine/mongodb dev-master requires ext-mongo ^1.5 . c:\Bitnami\wampstack-5.6.20-0\apache2\htdocs\sym\patmonS1>composer update PHP Warning: PHP Startup: Unable to load dynamic library 'C:/Bitnami/wampstack-5.6.20-0/php/ext\php_mongodb.dll' - %1 is not a valid Win32 application. in Unknown on line 0 Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for doctrine/mongodb dev-master -> satisfiable by doctrine/mongodb[dev-master]. - doctrine/mongodb dev-master requires ext-mongo ^1.5 -> the requested PHP extension mongo is missing from your system. Problem 2 - alcaeus/mongo-php-adapter 1.0.0 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2]. - alcaeus/mongo-php-adapter 1.0.1 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2]. - alcaeus/mongo-php-adapter 1.0.2 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2]. - alcaeus/mongo-php-adapter 1.0.3 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2]. - alcaeus/mongo-php-adapter 1.0.4 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2]. - alcaeus/mongo-php-adapter 1.0.5 requires mongodb/mongodb ^1.0.1 -> satisfiable by mongodb/mongodb[1.0.1, 1.0.2]. - mongodb/mongodb 1.0.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.0.1 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system. - Installation request for alcaeus/mongo-php-adapter ^1.0.0 -> satisfiable by alcaeus/mongo-php-adapter[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5]. To enable extensions, verify that they are enabled in those .ini files: - C:\Bitnami\wampstack-5.6.20-0\php\php.ini You can also run php --ini inside terminal to see which files are used by PHP in CLI mode. c:\Bitnami\wampstack-5.6.20-0\apache2\htdocs\sym\patmonS1> "doctrine/mongodb-odm": "~1.1", Test script: --------------- it is installation problem ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73050&edit=1

« previous php.bugs (#203955) next »