PHP Startup: unable to initialize module

14,551

http://windows.php.net/download/

  • Download the zip file for VC9 x86 Thread Safe (which is for PHP run as Apache module).
  • Extract the contents of the zip somewhere
  • Stop apache
  • Backup the php.ini file you have in your current PHP directory ../php5.3.0/
  • Delete (or backup) the rest of the contents you have in ../php5.3.0/
  • Place the extracted content in ../php5.3.0/
  • Put php_mongodb.dll in ../php5.3.0/ext/
  • Put php.ini back also
  • Restart Apache

edit:
Sorry, I forgot to mention that you also need to replace your apache install with the one from apachelounge as well, and have Microsoft 2008 C++ Runtime (x86) or the Microsoft 2008 C++ Runtime (x64) installed, as per the remarks in "Which version do I choose?" on the same page http://windows.php.net/download/

Share:
14,551

Related videos on Youtube

vaanipala
Author by

vaanipala

Updated on June 04, 2022

Comments

  • vaanipala
    vaanipala almost 2 years

    i'm trying to install mongoDB in my system. As instructed in

    http://www.mongodb.org/display/DOCS/PHP+Language+Center,

    I downloaded php_mongo.dll and put it in ../php5.3.0/ext folder. Then I added extension=php_mongo.dll to php.ini. When I restarted WAMP, I got the following errors:

    PHP Startup: unable to load dynamic library php5.3.0/ext/php_gd2.dll
    

    and the same error for

    php_mbstring.dll,php_mysql.dll,php_mysqli.dll,php_pdo_mysql.dll,php_pdo_sqlite.dll.
    

    After that, I got another error:

    PHP Startup: Mongo: Unable to initialize module 
    Module compiled with build ID=API20090626, TS, VC9
    PHP compiled with build ID=API20090626, TS, VC6.
    These options need to match.
    

    After some reading up from the net, I realize that I have to change the compiler for PHP. Does anyone know on how to update php compiler VC6 to php compiler VC9?

    My Apache version 2.2.11 PHP version 5.3.0

    thank you

  • vaanipala
    vaanipala over 12 years
    Ok, i will try that out and let you know.
  • Decent Dabbler
    Decent Dabbler over 12 years
    @vaanipala: make sure you back up important stuff first. If you have WAMP installed as a complete package there might be some dependencies involved I'm not aware of. I usually install every part of a WAMP stack independently.
  • vaanipala
    vaanipala over 12 years
    Ok, I got ur point. I will try ur solution first. If it doesn't work then i will have to reinstall everything separately.
  • Decent Dabbler
    Decent Dabbler over 12 years
    @vaanipala: Did you install all those parts (Apache, MySQL, PHP) separately? Or did you use some prefabricated WAMP package that installs them in one go? If you did the latter, then there might be configuration dependencies specific to that WAMP package. If you installed them individually though (not as part of some WAMP install package), then you should be good.
  • vaanipala
    vaanipala over 12 years
    i used the WAMP package that installs them in one go. So, i guess i will be in trouble. I will try ur solution first. If it doesn't work,then I have to uninstall WAMP and reinstall Apache, MySql and Php separately.
  • vaanipala
    vaanipala over 12 years
    hi fireeyedboy, everthing is working fine now. I had to remove WAMP and reinstall everything all over again before I got mongo to work. I tried the first example (that connects to mongodb) in php.net/manual/en/mongo.tutorial.php and it is displaying the correct output. Thanks a lot! :)