Xampp Unable to load dynamic library 'php_pthreads.dll' - php

After downloading the latest version of pthread, coping php_pthreads.dll file into C:\xampp\php\ext folder and pthreadVC2.dll to C:\xampp\php folder and restarting apache, when i try to use composer update command i get this error:
PS C:\xampp\htdocs\xxx_pro> composer update
PHP Warning: PHP Startup: Unable to load dynamic library 'php_pthreads.dll' (tried: C:\xampp\php\ext\php_pthreads.dll (The specified module could not be found), C:\xampp\php\ext\php_php_pthre
ads.dll.dll (The specified module could not be found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'php_pthreads.dll' (tried: C:\xampp\php\ext\php_pthreads.dll (The specified module could not be found), C:\xampp\php\ext\php_php_pthreads.d
ll.dll (The specified module could not be found)) in Unknown on line 0
here the name of php_pthreads file isn't php_php_pthreads.dll.dll and i'm interested why this file name is wrong on output
i also added "ext-pthreads": "*" to composer.json

Related

PHP8 extension could not be loaded (all)

I build up a new development Windows with:
Windows 10 Prof. -
Apache 2.4.54 -
PHP 8.1.7
The problem is that PHP could not load the extension (it does not matter which one I activate).
Configuration in php.ini
extension_dir = "ext"
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
extension=curl
extension=mbstring
extension=openssl
In the apache Log throw the following message:
PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: ext\\curl (The specified module could not be found), ext\\php_curl.dll (The specified module could not be found)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'mbstring' (tried: ext\\mbstring (The specified module could not be found), ext\\php_mbstring.dll (The specified module could not be found)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: ext\\openssl (The specified module could not be found), ext\\php_openssl.dll (The specified module could not be found)) in Unknown on line 0
The installation paths are: c:\Webserver\Apache24
c:\Webserver\php
At first I thought of a permission problem, so I open the hole directory of "Webserver" to "everyone" with "full access", but this does not solve the problem.
Looks like I found the problem. After I added the path of the PHP folder to the Windows environment variables and restart windows, the error message was gone.

Install php extension on wampserver 3

I would like to install the php_bolt extension in php in order to encode my souces.
I have placed my php_bolt.dll file in the php extensions folder.
In my php.ini file I add the line extension=php_bolt.dll.
the extension is still not loaded. And I do not know why.
In command line I have the following error
PHP Startup: Unable to load dynamic library 'php_bolt.dll' (tried: G: /wamp64/bin/php/php7.2.25/ext/php_bolt.dll
(The specified module could not be found.), G:/wamp64/bin/php/php7.2.25/ext/php_php_bolt.dll.dll
(The specified module could not be found.)) in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library 'bz2'

Warning: PHP Startup: Unable to load dynamic library 'gd2' (tried:
E:\phpXampp\php\ext\gd2 (The specified module could not be found.),
E:\phpXampp\php\ext\php_gd2.dll (The specified module could not be
found.)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to
load dynamic library 'gettext' (tried: E:\phpXampp\php\ext\gettext
(The specified module could not be found.),
E:\phpXampp\php\ext\php_gettext.dl l (The specified module could not
be found.)) in Unknown on line 0
I have this problem installing laravel. Actual link is
E:\XAMPPL\php\ext\gettext while it show E:\phpXampp\php\ext\gettext in warning.
How to change the path?
Go to you php installation folder - I'm guessing this is E:\XAMPPL\php\. Open and edit the php.ini file there.
Look for the line containing extension_dir. This is used by php to locate your extensions. Edit this line to:
extension_dir = "E:\XAMPPL\php\ext"
This should solve the problem.
Alternatively, you could just edit it to:
extension_dir = "ext"
They both refer to the same path.
I uninstalled composer and then installed latest composer setup and restarted my PC. And it Worked.

Laravel print to printer

Im trying to add the printer extension to laravel. But I don't know how to do this while using Laravel. It says that I have to add the php_printer.dll to php.ini. But I use Laravel. Does anyone know how I can add this extension to Laravel?
Link:
http://php.net/manual/fa/book.printer.php
Update:
I added the extension in the ext map but now it says that it can not be found
I get the following error:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_printer.dll' (tried: C:\xampp\php\ext\php_printer.dll (The specified module could not be found.), C:\xampp\php\ext\php_php_printer.dll.dll (The specified module could not be found.)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'php_printer.dll' (tried: C:\xampp\php\ext\php_printer.dll (The specified module could not be found.), C:\xampp\php\ext\php_php_printer.dll.dll (The specified module could not be found.)) in Unknown on line 0
Laravel development server started: http://127.0.0.1:8000
[Wed Sep 5 14:37:23 2018] PHP Warning: PHP Startup: Unable to load dynamic library 'php_printer.dll' (tried: C:\xampp\php\ext\php_printer.dll (The specified module could not be found.), C:\xampp\php\ext\php_php_printer.dll.dll (The specified module could not be found.)) in Unknown on line 0
Lets first get the terms right.
The extension you are adding isn't a laravel extension. It is a PHP extension. Laravel is a framework that is written in PHP.
You can not just add the directive into the php.ini file and expect it to work. You also need to install the files. In this case you need to get them from PECL.
The question of how to install is already asked and answereed here installing php_printer on wamp server
If you are using XAMPP, open it up and click on apache->config, you can find php.ini there.

PHP 7.2.5 Loading extensions

I am trying to add ast extension . I downloaded the files and added php_ast.dll to my PHP/ext folder, which is located in path: C:\PHP7\ext .
After that I enabled the extension in php.ini file and restared powershell. If I run php -m command, I get a following warning.
PHP Warning: PHP startup: Unable to load ynamic library 'ast' (tried: C:\PHP7\ext\ast (The specified module could not be found.), C:\PHP7\ext\php_ast.dll (The specified module could not be found.)) In uknown on line 0.
I tried to copy the second path (C:\PHP7\ext\php_ast.dll) to file explorer and It opens the file, so I don't understand why the module could not be found.

Categories