Install php extension on AMPPS

帅比萌擦擦* 提交于 2020-01-06 03:57:22

问题


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.


回答1:


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!



来源:https://stackoverflow.com/questions/51021800/install-php-extension-on-ampps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!