Install php extension on wampserver 3 - php

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

Related

Xampp Unable to load dynamic library 'php_pthreads.dll'

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

I can't get PHP zip extension to work on WAMP

I am using WAMP with PHP 7.2.4. I need to use PHP's ZipArchive, for which I need the zip.so (php_zip.dll) extension.
I've read it is somehow included in PHP's core since 5.6.x (I believe), so I tried to simply add
extension=php.so
or
extension=php_zip.dll
to php.ini file (tried both lines, also tried both php.ini and phpForApache.ini). It didn't work, so I've downloaded php_zip.dll file (5.6 NTS x64) from here: https://pecl.php.net/package/zip/1.12.4/windows , copied it to /wamp64/bin/php7.2.4/ext/ and repeated the process, with the same results.
When I look into PHP error log, this is what I get:
[03-Mar-2020 07:15:04 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'zip.so' (tried: c:/wamp64/bin/php/php7.2.4/ext/zip.so (The specified module could not be found.), c:/wamp64/bin/php/php7.2.4/ext/php_zip.so.dll (The specified module could not be found.)) in Unknown on line 0
[03-Mar-2020 07:15:04 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'php_zip.dll' (tried: c:/wamp64/bin/php/php7.2.4/ext/php_zip.dll (The specified module could not be found.), c:/wamp64/bin/php/php7.2.4/ext/php_php_zip.dll.dll (The specified module could not be found.)) in Unknown on line 0
I get the first or second line, depending on whether I tried to load php.so, or php_zip.dll extension. Notice the path near the end of those lines: .../ext/php_php_zip.dll.dll. Because of this I also tried to load simply extension=zip, but no luck.
How can I get it to work?

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