In my apache error.log I have the following line:
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_curl.dll' - The specified procedure could not be found.\r\n in Unknown on line 0
However I have checked my PATH variable and the PHP directory is listed, the ext folder is set correctly and php_curl.dll exists in the folder.
I have reinstalled VC++ redistributes to ensure that there are no issues there.
During my checking I have found that all of the following DLLs are present when opening them from run (to test they can be found from the PATH variable):
ws2_32.dll
wldap32.dll
php7ts.dll
libeay32.dll
libssh2.dll
nghttp2.dll
ssleay32.dll
normaliz.dll
kernel32.dll
vcruntime140.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-convert-l1-1-0.dll
api-ms-win-crt-filesystem-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-utility-l1-1-0.dll
api-ms-win-crt-time-l1-1-0.dll
api-ms-win-crt-environment-l1-1-0.dll
I am unsure of what dependencies that php_curl could have, if you could provide any suggestions then this would be greatly appreciated.
More system info:
Compiler MSVC14 (Visual C++ 2015)
Architecture x64
Windows 7 platform
PHP version 7.1.4
Apache version 2.4
I have the same issue. I was not able to find the root cause for this error but I managed to find a fix. Simply copied php_curl.dll from previous version of php I used - 7.1.2 x86 Thread Save. Everything works fine for now.
Related
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.
I have updated four files names given below in php/ext folder of xampp
I also updated these updated lines in php.ini
extension=php_pdo_sqlsrv_7_nts_x64.dll
extension=php_pdo_sqlsrv_7_ts_x64.dll
extension=php_sqlsrv_7_nts_x64.dll
extension=php_sqlsrv_7_ts_x64.dll
but when I try to run php artisan migrate it gives me this error
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_pdo_sqlsrv_7_nts_x64.dll' - %1 is not a valid Win32 application.
in Unknown on line 0
what could be the possible problem?
Am I doing something wrong
I downloaded files from https://www.microsoft.com/en-us/download/details.aspx?id=20098
Actually I came to knew that x64 or x86 is version of php which can be obtained from phpinfo(). so my php was x86 and I was using x64 files and also my php was thread enables so I did not need nts files
I'm currently setting up a Windows 10 Pro x64 machine to work with Apache, PHP and its oci8 extension.
I successfully managed to get oci8 working on OSX 10.11 and Windows 2012 Server before, so I thought I knew what to do. But this was 32bit – now it's 64.
The software now installed is:
Apache 2.4.18 x64
PHP 7.0.3 TS x64
Oracle Instant Client x64 (instantclient-basic-windows.x64-12.1.0.2.0)
oci8 2.1.0 TS x64
I don't get it to work. The error message is:
Warning: PHP Startup: Unable to load dynamic library
'ext\php_oci8_12c.dll' - Das angegebene Modul wurde nicht gefunden. (Module not found.)
in Unknown on line 0
Extension 'oci8' not present.
I installed the Oracle Instant Client by writing its directory into the PATH variable and copied the php_oci8_12c.dll file to the PHP ext dir and uncommented the corresponding line in the php.ini. Shouldn't that be enough?
I've read many postings here on Stackoverflow and other websites about similar problems, things I've tried:
Moving all DLLs to C:\Windows\system32
Include the PHP extension dir in the PATH variable
Re-checked that every component is 64bit
Created ORACLE_HOME and ORACLE_BASE variables (which shouldn't be necessary)
If I change the php_oci8_12c.dll x64 to the 32bit one, I get a different error message:
Warning: PHP Startup: Unable to load dynamic library 'ext\php_oci8_12c.dll' - %1 ist keine zulässige Win32-Anwendung. (%1 is not a valid Win32 program.)
in Unknown on line 0
Extension 'oci8' not present.
Any ideas what's wrong with all that?
Thank You!
To sum it all up,
One more thing... NTS assumes that PHP does not run as Apache module,
is that correct? Are you using FastCGI? – Álvaro González
was the way to go. If anyone's having troubles with the same, here are the exact steps I took:
PHP 7.0.3 VC14 x64 Thread Safe from windows.php.net/download/
Apache 2.4.18 x64 from apachehaus.com/cgi-bin/download.plx
Oracle Instant Client 12.1.0.2.0 x64 from oracle.com/technetwork/topics/winx64soft-089540.html
(Get the current Thread Safe oci8 DLL from pecl.php.net/package/oci8, but PHP comes with a version of it - worked with either for me)
Install PHP as an Apache module. Unzip the Instant Client and move it to your desired location. Add this location to your PATH system variable. Restart your machine and it should show up under 'PATH' in your phpinfo().
Then I had to make the PHP extension_dir an absolute path. So no 'ext', but 'C:/Program Files/php-7.0.3/ext'. With only 'ext' set to the extension_dir I could connect to a remote Oracle DB via 'php.exe filename.php'. But Apache would throw me an error in error.log that it cannot find the DLL.
No DLL copying is needed if you choose to keep the oci DLL that comes with PHP. No more environment variables than PATH have to be changed/created.
At least in my case :-)
I'm trying to load the MongoDb extension for php on a Windows 7 64 bit PC, running XAMPP with Apache 2.0 and PHP 5.3.5, compiler version VC6. I started out with this tutorial, and have also tried the extensions that the php documentation suggested. MongoDb itself is running fine, and shell commands seem to work.
At the moment I have:
Added extension=php_mongo.dll to my php.ini file.
Put the VC6 version of php_mongo.dll (from the following download page, suggested by the PHP documentation) in the php/ext folder.
Restarted my Apache server.
I have also tried php_mongo.dll files form Stealth's github, but they didn't seem to work either.
When restarting Apache, I don't get any errors, but I can't find anything on MongoDb in phpinfo(), and the Mongo class is not recognised either.
Any ideas of what might be wrong? Let me know if you need more info.
The problem might be incorrect version of extension. Try different versions downloaded from here: http://pecl.php.net/package/mongo/1.6.4/windows
Use Bitnami WAMP Stack instead of XAMPP it comes preloaded php_mongo.dll driver installed and no need to configure php.ini file
There is no official MongoDB Driver released for PHP7. So it would be better to download the recommended PHP version 5.5.30(currently) offered by Bitnami Wamp Stack.
There might be two reasons:
First one is as #Sadd suggested. Your mongodb extension should be loaded after what you have done so its very likely that you have enabled extension in wrong file. And yes, there are two such similar files (named php.ini-development and php.ini-production on windows computers), so make sure to enable it in php.ini file and run the following code echo extension_loaded("mongodb") ? "loaded\n" : "not loaded\n"; and you should see loaded on screen.
If you still don't see it, then the second thing you can do is to check whether the version is right or not. You can check your phpinfo() for your php version and then put the right versioned dll file in ext folder. In this, you can have to check whether your php is ts or nts and second one is whether your php is x64 or x86. I hope you are good to go after one or both of the changes.
This was driving my crazy until I looked closely at my PHP version:
$ php -v
PHP 7.4.1 (cli) (built: Dec 17 2019 19:23:59) ( NTS Visual C++ 2017 x64 )
Notice that it says PHP 7.4.1 and NTS and x64? This means that when I download from PECL, I need version 7.4 Non Thread Safe (NTS) x64 or it won't run correctly.
If the correct version of module is not added, an error is thrown.
[PHP Warning: PHP Startup: Unable to load dynamic library 'php_mongodb.dll' (tried: C:\xampp\php\ext\php_mongodb.dll (The specified module could not be found), C:\xampp\php\ext\php_php_mongodb.dll.dll (The specified module could not be found)) in Unknown on line 0]
When downloading the dll extension from https://pecl.php.net/package/mongodb, make sure that NTS (Non Thread Safe) or TS (Thread Safe) is chosen according to what shown from php -v command.
$ php -v
PHP 8.1.7 (cli) (built: Jun 7 2022 21:45:53) (ZTS Visual C++ 2019 x64)
Although here it shows ZTS, TS version can be used in this case.
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