我尝试decimal使用安装 PHP 扩展,pecl因为现有项目需要它。在我的新 M1 机器上,我收到以下错误:
$ pecl install decimal
[...]
checking for libmpdec library in default path... Could not find libmpdec
configure: error: Please reinstall libmpdec
ERROR: `/private/tmp/pear/temp/decimal/configure --with-php-config=/opt/homebrew/bin/php-config' failed
Run Code Online (Sandbox Code Playgroud) 我正在尝试在我的 MacOS Monterey 上安装适用于 php 8.0.13 的 mongodb 扩展。
我尝试sudo pecl install mongodb命令:然后出现以下错误。
/opt/homebrew/Cellar/php@8.0/8.0.13/include/php/ext/spl/spl_iterators.h:151:4: error: unknown type name 'pcre_cache_entry'
pcre_cache_entry *pce;
^
1 error generated.
make: *** [php_phongo.lo] Error 1
ERROR: `make' failed
Run Code Online (Sandbox Code Playgroud)
哪个 php: /opt/homebrew/bin/php
php -v:PHP 8.0.13 (cli) (built: Nov 28 2021 13:11:14) ( NTS ) Copyright (c) The PHP Group Zend Engine v4.0.13, Copyright (c) Zend Technologies with Zend OPcache v8.0.13, Copyright (c), by Zend Technologies
谁能帮我解决这个错误?感谢您的关注!
我有几个函数是我写的,我经常在我的服务器上使用,有没有办法可以将它们添加到核心,所以我不必将它们包含在外部文件中?
我正在运行PHP5
出于测试目的,我在本地主机上运行齿轮.所以我从php命令行运行gearman worker.php文件.当我在正常的apache模式下测试它时,mongoDB工作正常,但是当它从gearman worker文件运行时,我得到错误"致命错误:找不到类'Mongo'".现在Mongo类来自pecl和php.ini中的mongo.so扩展.是的,试图弄清楚为什么从CLI运行的php文件是不同的.它是否使用单独的php.ini文件?
如何在PHP环境中安装或启用PHP Pecl Intl扩展?
我有一个与Mac OS X Snow Leopard捆绑在一起的PHP配置.从源代码安装libicu会$pecl install intl导致以下错误:
/private/tmp/pear/temp/intl/collator/collator_class.c:92: error: duplicate 'static'
/private/tmp/pear/temp/intl/collator/collator_class.c:96: error: duplicate 'static'
/private/tmp/pear/temp/intl/collator/collator_class.c:101: error: duplicate 'static'
/private/tmp/pear/temp/intl/collator/collator_class.c:107: error: duplicate 'static'
make: *** [collator/collator_class.lo] Error 1
ERROR: `make' failed
Run Code Online (Sandbox Code Playgroud)
任何帮助真的很感激!
我正在尝试使用APCIterator类,并且在许多系统配置中我遇到了Fatal Error: class 'APCIterator' not found错误.
我试过了:
使用apc_store()和apc_fetch()方法正确安装APC并正常工作,只是APCIterator类导致问题.
关于何时引入该类,以及它附带的APC/PHP版本的文档很少.我能找到的最好的是PECL网站上的更改日志中的评论,表明在APC 3.1.1中引入了APCIterator
任何人都可以告诉我是否需要安装,或者我需要升级到哪个版本才能使用它?
首先我运行的是PHP 5.3.3,CentOS 5.7(2.6.18-274.3.1.el5xen)
其次,我基本上不知道我在做什么......对不起!
首先,我从http://www.libssh2.org/安装了libssh2 .Ran配置,make,make install.不是真的了解所有这些东西,但遵循在线说明似乎工作.
然后跑了
pecl install ssh2
Run Code Online (Sandbox Code Playgroud)
到现在为止还挺好.
按照说明将相关的扩展行添加到php.ini.重启apache:
service httpd restart
Run Code Online (Sandbox Code Playgroud)
都好.
但是后来在phpInfo()中找不到对ssh的任何引用.
试着
php -m | grep ssh2
Run Code Online (Sandbox Code Playgroud)
并得到以下错误:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/ssh2.so' - /usr/lib64/php/modules/ssh2.so: undefined symbol: libssh2_sftp_readdir_ex in Unknown on line 0
Run Code Online (Sandbox Code Playgroud)
我做错了什么/错过了什么,我该如何解决?
我是Vagrant和Chef的新手.我有以下使用厨师在Vagrant框上安装apache和php.Cookbook包含官方的opscode烹饪书.
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe "apt"
chef.add_recipe "apache2"
chef.add_recipe "apache2::mod_php5"
chef.add_recipe "apache2::mod_rewrite"
chef.add_recipe "php"
end
Run Code Online (Sandbox Code Playgroud)
它正确安装包括PDO支持在内的所有内容.PHP配方提供对PEAR/PECL回购的访问.但我找不到安装PECL包的方法.
如何使用这位PHP厨师安装PECL包?
我正在尝试将我的所有服务器升级到目前的PHP 5.6,除了安装oci8之外,它已经很好了.它与php55配合得很好,我甚至还推出了一个带有centos的全新vagrantbox来测试它并确保它是一个完全干净的安装.
当我尝试运行安装时,我收到以下错误.
# pecl install oci8
downloading oci8-2.0.8.tgz ...
Starting to download oci8-2.0.8.tgz (190,854 bytes)
.........................................done: 190,854 bytes
11 source files, building
running: phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client [autodetect] :
building in /var/tmp/pear-build-rootMIYqiX/oci8-2.0.8
running: /var/tmp/oci8/configure --with-oci8
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep …Run Code Online (Sandbox Code Playgroud)