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

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?

Related

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

Can't Get Curl Enabled in PHP 7.3.9

I keep getting this error when I try to run cUrl:
Call to undefined function curl_init()
So I try to install it with these lines:
extension_dir = "C:\PHP7\ext"
extension=curl
But it never shows up in my phpinfo();
Here is from the Apache error log:
PHP Startup: Unable to load dynamic library 'curl' (tried: C:\\PHP7\\ext\\curl (The specified module could not be found.), C:\\PHP7\\ext\\php_curl.dll (The specified procedure could not be found.)) in Unknown on line 0
And I've also tried the absolute path to curl (extension=C:\PHP7\ext\php_curl.dll)
If:
Your settings look correct.
You're trying to load the right DLL for your PHP installation and not e.g. some random one you found in Google).
Curl works just fine from command-line PHP.
But you get this when running PHP as Apache module:
PHP Startup: Unable to load dynamic library 'curl' (tried: C:\...\ext\curl (The specified module could not be found.), C:\...\ext\php_curl.dll (The specified procedure could not be found.)) in Unknown on line 0
Then there's a chance that it gets fixed if you upgrade Apache to the latest build. (I've had that same problem myself.)
That was my problem too. I decided to upgrade my apache to Apache version 2.4.41
Link to binary if you install manually: https://www.apachelounge.com/download/
My php version is 7.3.9
good luck

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.

MongoDB driver extension (php_mongodb.dll)) not found by PHP v7.2.5

I'm trying to add MongoDB extension to the PHP and use it with Laravel 5.6.
I know that I should download the dll file from PECL and copy it in the ext folder inside PHP and add extension=php_mongodb.dll to my php.ini file. But I face this warning when I do like what I said:
Warning: PHP Startup: Unable to load dynamic library 'php_mongodb.dll'
(tried: C:\php\ext\php_mongodb.dll (The specified module could not be
found.), C:\php\ext\php_php_mongodb.dll.dll (The specified module
could not be found.)) in Unknown on line 0
I'm a windows 10 user and my PHP version is 7.2.5.
Is it effect on MongoDB usage or It's ignorable and I can overtake it?
Update:
I also tested extension=php_mongodb.dll like extension=php_mongodb, extension=mongodb.dll, extension=php_mongodb.dll and extension=mongodb too.
And I copied the php_mongodb.dll to the C:\php\ext\php_mongodb.dll.

Categories