在AMPPS上安装php扩展 [英] Install php extension on AMPPS

查看:86
本文介绍了在AMPPS上安装php扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所述,我试图安装ampps 3.8中php7.1版本所缺少的php扩展名(zip.so).我一直在寻找答案,但到目前为止还没有运气.

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.

还使用php5.6进入php扩展列表,无法看到zip扩展,但是由于我试图安装的软件需要php 7.X,因此我无法简单地使用php5.6.

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.

非常感谢您的帮助.

推荐答案

我终于找到了一种方法:

I finally found a way to do it:

  1. 转到(例如) https://pecl.php.net/并下载扩展您需要.
  2. 解压缩扩展名并转到文件位置$ cd my/extension
  3. 运行phpize /usr/local/ampps/php-7.1/bin/phpize
  4. 下一步运行./configure --with-php-config=/path/to/my/php-config,例如./configure --with-php-config=/usr/local/ampps/php-7.1/bin/php-config
  5. makesudo make install
  6. sudo make install日志末尾,您将找到该Installing shared extensions: /usr/local/ampps/php-7.1/lib/extensions/no-debug-non-zts-20160303/文件路径.
  7. 转到文件路径,您会找到编译后的扩展名,对我来说,它是zip.so
  8. 最后将扩展名复制到您的php文件夹/usr/local/ampps/php-7.1/lib/extensions/ext中,您将能够在ampps扩展名列表中看到它,不要忘记启用它并重新启动apache2!
  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!

希望有帮助!

这篇关于在AMPPS上安装php扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆