PHP Zip extension in xampp for windows - php

I'm using latest xampp(v3.1.0) in my windows system. I want to use zip extension. How can I enable it? I've heard that it's already pre-compiled in latest xampp. I've already taken a look at php.ini but there is no extension related to zip neither in extension folder.

PHP 5.2.0 and later has inbuilt zip function just have to active the zip library.
Windows users need to enable php_zip.dll inside of
php.ini in order to use these functions.

Related

PHP wont see ImageMagic enabled

I have a Laragon enviroment and a project that uses PHP 7.4.
My 7.4 has ImageMagic enabled in the .ini, the .dll file is in the .ext directory.
I even installed the latest ImageMagic for Windows.
And yet, I get this error:
You need to install the imagick extension to use this back end
The project is using Simple QrCode package by SimpleSoftareIO.
Not sure what else could I be required to do in order to enable ImageMagick and also not sure what other information I can provide to make solving this easier.
Install imageMagick from the official website https://imagemagick.org/script/download.php
and then move all the files into your PHP installation folder.

How to install php-xml extension in windows?

I'm trying to install laravel-excel on my laravel project. That library requires below php extensions to be enabled.
PHP extension php_zip
PHP extension php_xml
PHP extension php_gd2
PHP extension php_iconv
PHP extension php_simplexml
PHP extension php_xmlreader
PHP extension php_zlib
I changed the php.ini accordingly. But I can't download related .dll files to copy to ext folder.
Do you have any place to download these?
Download them from PHP Extension Community Library (PECL)
For example this is the php_zip source that you need:
https://pecl.php.net/package/zip/1.12.4/windows
Similarly you can get the rest of them.

Mongodb php extension loaded but class not found

I've download and install mongo and it's woring just fine, but when i tried to use it with Laravel I get some problems.
I downloaded mongodb PHP (TS) extension from pecl https://pecl.php.net/package/mongodb/1.4.0/windows and add it to my php extension
I've read other solutions but it just don't work;
The Class 'MongoDB\Driver\Manager' not found and even when i add phpinfo() in a page It doesn't display any mongodb extension
I'm using php 7.0 and wamp64 btw.
You need to download exact dll file which is match with your PHP version. phpinfo() will not show Mongodb if version doesn't match.
Ensure the following things and download the correct dll file.
1) Your php version
2) Your system architecture (64 or 86)
3) Whether Thread safety enabled or not (You can check this in phpinfo())
Download DLL here

Using Libsodium with PHP on WAMP

I'm having really hard trouble installing libsodium on my local server (WAMP64).
I used this guide and many others, but still no luck.
I successfully installed PEAR but I can't use it to install the PHP wrapper of libsodium. Can someone post a little guide step by step to help me?
I would appreciate help installing Halite, wich needs libsodium, because maybe it will be my next step.
Thank you everyone.
On Windows, download the appropriate zip file for your version of PHP and then follow these three steps. (I used 1.0.6 for PHP 7.0 in my testing).
Copy libsodium.dll to the System32 Folder or the same directory as php.exe. Also copy it to the apache/bin/ folder (for me that was C:\xampp\apache\bin).
Copy php_libsodium.dll to the PHP extension directory (C:\xampp\php\ext\ for me)
Add extension=php_libsodium.dll to your php.ini file.
The bolded part in step 1 is what I was missing. As soon as I placed the dll in that folder and restarted Apache, everything started working.
You can create a new php file with this code to verify it is working properly:
<?php
var_dump([
\Sodium\library_version_major(),
\Sodium\library_version_minor(),
\Sodium\version_string()
]);
Do Not Try To Install Pecl Extensions On Windows With Pear/Pecl. It Will Not Work.
Rather use pre-compiled .dll file.
The guide page even says so:
Installing Libsodium and the PHP Extension on Windows
On Windows, download the appropriate zip file for your version of PHP and then follow these three steps.
goto WAMPSERVER and install listed PHP
Enable sodium and check in 'Show PHP loaded Extensions' it will get loaded
check-in PHP module if sodium is available or not with the following command
cmd> php -m
cmd> php --ri sodium
if sodium is not listed then go to your /php/php.ini and search for ';extension=sodium' and remove ';' you will be good to go

PHP Extension development ubuntu

I created an extension based on some tutorials and began to develop extension using eclipse IDE with PHP source.
I compiled the extension independently using phpize not compiled with whole PHP. Now I have the .so file then I moved it to the /usr/lib/php5/20090626+lfs directory and updated php.ini file, these locations are for already installed php. not from the source where I compiled the extension. (installed PHP and PHP source both are same version PHP 5.3.10 so that i can run the extension on already installed locations)
here is my question,
How do i test my extension using the same php source which i used in eclipse. I don't want to install the PHP that resides in eclipse work space again but how do we specify the php.ini and load extensions in compiled php source itself?

Categories