Guillermo Teixeira
Guillermo Teixeira

Reputation: 305

Install php extension on AMPPS

As the title says im trying to install a php extension (zip.so) that is missing from php7.1 version in ampps 3.8. I have searched for an answer but no luck so far.

Also using php5.6 and going to the php extensions list im able to see the zip extension, but since the software that im trying to intstall requires php 7.X im unable to simply use php5.6.

Thanks for the help in advance.

Upvotes: 1

Views: 10255

Answers (2)

Issam Ab
Issam Ab

Reputation: 11

There is an easier way to do so

  1. Open AMPPS Application ->Stop Apache (If running)

2 In "PHP" Tab -> "PHP Extension"

  1. Enable "zip.so".

  2. Apply

  3. Restart Apache.

See image for clarification I am using a mac

Upvotes: 1

Guillermo Teixeira
Guillermo Teixeira

Reputation: 305

I finally found a way to do it:

  1. Go to (for example) https://pecl.php.net/ and download the extension that you need.
  2. Unzip the extension and go to the file location $ cd my/extension
  3. Run phpize /usr/local/ampps/php-7.1/bin/phpize
  4. Next run ./configure --with-php-config=/path/to/my/php-config for example ./configure --with-php-config=/usr/local/ampps/php-7.1/bin/php-config
  5. make and sudo make install
  6. In the end of sudo make install log you will find this Installing shared extensions: /usr/local/ampps/php-7.1/lib/extensions/no-debug-non-zts-20160303/ file path.
  7. Go to the file path and you will find your compiled extension, for me it was zip.so
  8. Finally copy the extension into your php folder /usr/local/ampps/php-7.1/lib/extensions/ext and you will be able to see it on the list of extensions in ampps, dont forget to enable it and restart apache2!

Hope it helps!

Upvotes: 9

Related Questions