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.
Related
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
I am trying to compile a third party library into a dll to use in PHP5.6.31. By following the php build directions here, and the dll's reference guide (select 'Using lpsolve from PHP' from the index and scroll down to the compile section). This is what i did.
Downloaded the PHP source php-5.6.31-src.zip from here.
Downloaded the binary tools php-sdk-binary-tools-20110915.zip from here.
Downloaded the php libraries deps-5.6-vc11-x86.7z from here.
Set up the build directory and extracted both the source files and the deps to this directory C:\php-sdk\phpdev\vc11\x86\.
Downloaded lp_solve_5.5.2.5_dev_win32.ziphere and extracted them to C:\lp_solve_5.5.
Downloaded lp_solve_5.5.2.5_PHP_source.tar.gz here and extracted it, then from the extracted files copied this folder lp_solve_5.5\extra\PHP to C:\php-sdk\phpdev\vc11\x86\php-5.6.31-src\ext\lp_solve_5.5.
Opened VS2012 x86 Native Tools Command Prompt that came with Visual Studio 2012.
Ran C:\php-sdk>bin\phpsdk_setvars.bat then C:\php-sdk\phpdev\vc11\x86\php-5.6.31-src>buildconf.
Ran C:\php-sdk\phpdev\vc11\x86\php-5.6.31-src>cscript /nologo configure.js --without-xml --without-wddx --without-simplexml --without-dom --without-libxml --disable-zlib --without-sqlite3 --disable-odbc --disable-cgi --enable-cli --without-iconv --enable-phplpsolve55=shared --with-phplpsolve55path="C:\lp_solve_5.5".
Ran nmake php_phplpsolve55.dll which created a dll named php_phplpsolve55 in this directory C:\php-sdk\phpdev\vc11\x86\php-5.6.31-src\Release_TS.
I then copied php_phplpsolve55 to my wampserver php extensions folder C:\wamp\bin\php\php5.6.31\ext.
Added this line to my php.ini file extension=php_phplpsolve55.dll.
Then I restarted Wampserver, but the php_lpsolve55 extension does not show up in the loaded extensions. I checked the php_error log and this is the error.
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.6.31/ext/php_phplpsolve55.dll' - The specified module could not be found. in Unknown on line 0
Are there any other ways to troubleshoot this other than the php_error log?
From other posts I read maybe this is a compiler compatibility issue?
Here is my WampServer version.
WampServer version 3.1.0 - 32bit
Apache version: 2.4.27
PHP version: 5.6.31
And here are a few properties from phpinfo()
Compiler: MSVC11 (Visual C++ 2012)
PHP Extension Build: API20131226,TS,VC11
Thread Safety: enabled
Note: I changed line 5 of C:\php-sdk\phpdev\vc11\x86\php-5.6.31-src\ext\lp_solve_5.5\PHPmod.c to static zend_function_entry php_phplpsolve55_functions[] = { I got this from this post.
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
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.
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