PHP Startup: unable to initialize module - php

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

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/

For time being, check which module is in warning message, just go to php.ini file and comment it. This could work

Related

php chilkat_9_5_0 extension not working in windows 10

My PHP Version 7.2.1 and Architecture is x86 and System is Windows 10 64 bit so I have downloaded chilkat-9.5.0-php-7.2-nts-win32 from https://www.chilkatsoft.com/php.asp#winDownloads
and extension DLL file added into my C:/xampp/php/ext such as "C:/xampp/php/ext/chilkat_9_5_0.dll" and updated my php.ini as well
But PHP is throwing startup warning and chilkat extension is not working for me could you please guide me where is i am wrong.
My php.ini
extension_dir="C:\xampp\php\ext"
extension=chilkat_9_5_0
PHP Error
PHP Warning: PHP Startup: Unable to load dynamic library 'chilkat_9_5_0' (tried: C:\xampp\php\ext\chilkat_9_5_0 (The specified module could not be found.
), C:\xampp\php\ext\php_chilkat_9_5_0.dll (The specified module could not be found.
)) in Unknown on line 0
well first of all you need to find if your PHP is NTS (None Thread Safe) or TS (Thread Safe) by phpinfo()
as you can see thread safety is enabled which means that PHP is TS
and my PHP version is 7.2.34 x64 which means that i have to download
chilkat PHP 7.2.* (thread-safe) x64
after installation place chilkat_9_5_0.dll in (C:\xampp\php\ext)
if you are using xamp my default require() is at (C:\xampp\php\pear)
so move chilkat_9_5_0.php to (C:\xampp\php\pear)
in the php.ini search for dynamic extension and below add ( extension=chilkat_9_5_0.dll ) with the .dll
restart XAMP and test it with the given test.php file in the downloads and it should work

Problems with pthreads in PHP

I have a problem with pthreads in PHP.
When I start apache I see error like this:
php.exe - Entry point not found
The procedure entry point was not found _zend_hash_update##12 in library D:\xampp\php\ext\php_pthreads.dll
When I execute script in CMD I have a warning:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_pthreads.dll' (tried: D:\xampp\php\ext\php_pthreads.dll
I copied pthreadVC2.dll to:
C:/windows/system32
D:/xampp/php
D:/xampp/apache/bin
And I copied last file php_pthreads.dll to:
D:/xampp/ext
I added to php.ini line with:
extension=php_pthreads.dll
My config:
XAMPP on Windows 10
PHP Version 7.3.0
Compiler: MSVC15 (Visual C++ 2017)
Architecture: x86
Thread Safety is enabled
Thread API is Windows Threads
php_threads 3.1.6 x86 downloaded from https://windows.php.net/downloads/pecl/releases/pthreads/3.1.6/
I tried in php 7.2.x and i had the same problem but other apache startup error message.
Maybe someone can help me.
My problem was solved!
My advices:
Downgrade to 7.2.x version PHP on xampp (because pthreads 3.2.0 is compltible with php 7.2)
Download and install php_pthreads-3.2.0 (which is compiled MSVC 15 the same as
PHP. Link: https://github.com/krakjoe/pthreads/releases)
Delete pthreadVC2.dll from apache/bin (because it isn't needed)
Make copy php.ini and save copy as php-cli.ini
From php.ini remove line with extension=php_pthreads.dll (this line must be exist in php-cli.ini)
Try in CMD command: php --ini and check Loaded Configuration File. That must be set as php-cli.ini. And also try command: php -i and find pthreads in result.

Datastax Cassandra PHP extension in WAMP

I am using WAMP with php v5.5.12.
Trying to install datastax php driver(https://github.com/datastax/php-driver).
1. I take the compiled dll file from here and put it in /ext folder
2. Add the extention=php_cassandra.dll to php.ini
3. Restarting WAMP server
I get this error in wamp php error log:
[28-Jan-2016 07:32:57 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_cassandra.dll' - The specified module could not be found.
Also installed Pear package, but there are no changes.
Does anyone here experience with cassandra new driver on windows?
What can be the problem?
I could not either make the .dll found on the pecl php site work. Same error.
But the .dll found here works!
http://downloads.datastax.com/php-driver/windows/cassandra/
You will need to use the Thread Safe version (TS) and of course the one for PHP5.5. Also you need to use the x86 if you WAMPServer is the 32 bit and the x64 if WAMPServer is the 64bit version
That dll should be place into the \wamp\bin\php\php5.5.12\ext folder

Issue Running Imagick module (PHP 5.3.5, WAMP server 2.1e)

I have installed Wamp server 2.1e-32bit and ImageMagick-6.8.9-7-Q16-x86-dll in Windows Server 2008 R2-x64. After completed my installation process and run wamp server, i get a error message and Imagick not working
The error msg is:
"PHP Warning: PHP Startup: imagick: 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 in Unknown on line 0"
How to resolve the problem?
Try the 64-bit DLL since you are running on Windows Server 2008 R2-x64 as recommended by the doc.
UPDATE:
If you don't already have the php_imagick.dll extension, you can download it from here. In your case, you will pick the php 5.3 Thread Safe (TS) x86 version. The caveat here is I am unsure if this will work with the latest imagemagick Q16 DLL.
Copy the php_imagick.dll file to your PHP ext folder, and update your php.ini to include extension=php_imagick.dll. Then restart your WAMP server.
Run phpinfo() to ensure the imagick library is loaded properly.

php_mcrypt extension for windows server 2008 R2

I found lots of articles about this problem, however none of them helped me.
Here is a I list of what I 've already tried:
uncomment the semicolon on php.ini
add the dependence file (libmcrypt.dll) on php folder, windows and
windows/system32
I 've restarted the IIS Server after each attempt
I cannot use this method, it was installed with a zip file.
On IIS Manager the extension is shown as enabled but checking the php error log I found this message multiple times:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\v5.3\ext\php_mcrypt.dll' - %1 is not a valid Win32 application. in Unknown on line 0
Here is a the screenshot of phpinfo()
I have Windows Server 2008 R2 64bit with IIS 7.5 and PHP 5.3.10. Maybe the file (php_mcrytp.dll) is not the good one, where can I download it? On php site I cannot find the php_mcrytp.dll file under ext folder.
Thank you
If you downloaded PHP for Windows from php.net and are running the FastCGI version of PHP (as you should with PHP 5.3.x and IIS), mcrypt library is already compiled statically in the PHP engine. You don't need to install any extra DLL.
If you see the mcrypt section in phpinfo's output then it means mcrypt is already enabled (otherwise the mcrypt section would be missing).
And that's also the reason there is no mcrypt DLL.

Categories