我试图pecl_http在Ubuntu 14.04 上安装,但它报告要求PHP 7.
$ sudo pecl install pecl_http
pecl/pecl_http requires PHP (version >= 7.0.0), installed version is 5.5.9-1ubuntu4.14
pecl/raphf requires PHP (version >= 7.0.0), installed version is 5.5.9-1ubuntu4.14
pecl/propro requires PHP (version >= 7.0.0), installed version is 5.5.9-1ubuntu4.14
No valid packages found
install failed
$
Run Code Online (Sandbox Code Playgroud)
同样在Debian上:
pecl/pecl_http requires PHP (version >= 7.0.0), installed version is 5.6.17-0+deb8u1
pecl/raphf requires PHP (version >= 7.0.0), installed version is 5.6.17-0+deb8u1
pecl/propro requires PHP (version >= 7.0.0), installed version is 5.6.17-0+deb8u1
Run Code Online (Sandbox Code Playgroud)
我无法找到 …
我浏览过每一个Google搜索结果,阅读有关此错误的所有论坛帖子,但我无法解决.
当使用PECL安装时,我总是得到这个错误:
checking whether the C compiler works... configure: error: cannot run C compiled programs.
Run Code Online (Sandbox Code Playgroud)
其他一切都成功到了那一点他们bam!
我使用的是CentOS 4.3,PEAR是最新的稳定版本,GCC是一个稳定的最新版本.一切都按预期工作,但C编译器似乎总是出错.我试图通过暂时启用它来使tmp具有正确的操作特权:
mount -o remount,exec,suid /tmp
Run Code Online (Sandbox Code Playgroud)
但这不起作用.
我确实尝试过所有建议都无济于事.有任何想法吗?
在PHP 5.3中有一种重命名函数或"挂钩"函数的方法.
还有就是rename_function()因为〜2004年已被打破"APD"内.如果您尝试在PHP 5.3上构建它,您将收到此错误:
'struct _zend_compiler_globals' has no member named 'extended_info'
这是一个非常容易修复的错误,只需更改此行:
GC(extended_info) = 1;
至
CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;
我修改了我的php.ini,APD出现在我的phpinfo()中.但是,当我调用rename_function()PHP页面没有加载,我得到了我的分段错误/var/log/apache2/error.log.
反正有没有修复APD与现代版本的PHP一起工作?或者是否有另一种重命名函数的方法? 为什么地球上的重要功能不在PHP中!??!?!(得爱蟒蛇:)
我正在使用OAuth 1.0a for LinkedIn API.目前,我已经实现了一些获取配置文件和连接的调用,它们似乎都运行正常.但是为了发送消息,oauth库会抛出以下异常:
{
"errorCode": 0,
"message": "Unknown authentication scheme",
"requestId": "I2Y0MFJ8ME",
"status": 401,
"timestamp": 1378376573339
}
Run Code Online (Sandbox Code Playgroud)
我正在使用PHP PECL OAuth.我正在初始化$ oauth对象,如下所示:
$oauth = new OAuth(API_KEY, API_SECRET, OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_FORM);
$oauth->setToken(ACCESS_TOKEN, SECRET);
Run Code Online (Sandbox Code Playgroud)
并使其余的呼叫如下:
$url = 'https://api.linkedin.com/v1/people/~/mailbox?format=json';
$content_type = array('Content-Type' => 'application/json');
$oauth->fetch($url, $message, OAUTH_HTTP_METHOD_POST, $content_type);
Run Code Online (Sandbox Code Playgroud)
和$ message看起来像这样:
$message = Array
(
[recipients] => Array
(
[0] => z2222117O
)
[subject] => this is my title
[body] => this is my body
[format] => json
[id] => EAS123123
)
Run Code Online (Sandbox Code Playgroud)
看起来请求没有任何问题.我按照LinkedIn消息传递文档 …
pecl install cassandra
Run Code Online (Sandbox Code Playgroud)
产生错误:
configure:错误:无法加载libcassandra
错误:`/ tmp/pear/temp/cassandra/configure'失败
此错误消息是SO上的另一个问题,但尚未解决:在ubuntu上安装php datastax驱动程序
有人可以帮忙吗?
在PHP7中遇到pecl yaml的一些问题(参见下面的错误日志).我可以看到:https://pecl.php.net/package/yaml是有一些RC的2.0用于解决问题...我正在运行命令:
pecl install yaml && echo "extension=yaml.so" > /usr/local/etc/php/conf.d/ext-yaml.ini.
Run Code Online (Sandbox Code Playgroud)
但是猜测这不会安装RC版本.如何安装RC?是否有供应的参数..?
我可以谷歌下面的解决方案(未测试):
pear config-set preferred_state beta
Run Code Online (Sandbox Code Playgroud)
但我想这将为所有扩展设置全局测试状态.我只想安装此扩展程序作为测试版..
running: make
/bin/bash /tmp/pear/temp/pear-build-defaultuserPVGidl/yaml-1.2.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/yaml -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserPVGidl/yaml-1.2.0/include -I/tmp/pear/temp/pear-build-defaultuserPVGidl/yaml-1.2.0/main -I/tmp/pear/temp/yaml -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/yaml/yaml.c -o yaml.lo
mkdir .libs
cc -I. -I/tmp/pear/temp/yaml -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserPVGidl/yaml-1.2.0/include -I/tmp/pear/temp/pear-build-defaultuserPVGidl/yaml-1.2.0/main -I/tmp/pear/temp/yaml -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/yaml/yaml.c -fPIC -DPIC -o .libs/yaml.o
In file included …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用pecl install在本地安装OAuth版本1.2.3(在Mac OSX El Capitan上运行PHP 5.6.10).在命令提示符中运行以下命令:
sudo pecl install oauth-1.2.3
Run Code Online (Sandbox Code Playgroud)
安装开始正常并且在构建完成之前运行没有错误.然后我收到这个错误:
Build process completed successfully
Installing '/usr/lib/php/extensions/no-debug-non-zts-20121212/oauth.so'
ERROR: failed to write /usr/lib/php/extensions/no-debug-non-zts-`20121212/oauth.so
(copy(/usr/lib/php/extensions/no-debug-non-zts-20121212/oauth.so):
failed to open stream: Operation not permitted)`
Run Code Online (Sandbox Code Playgroud)
ls在文件夹no-debug-non-zts-20121212中没有显示oauth.so,但除此之外,文件夹看起来很好.
我尝试的事情: - 更新梨和pecl - 更新MAMP - 重新启动webserver - 重新启动计算机
我没有尝试过的想法.有谁曾经听过这个问题吗?
我正在尝试使用PECL在我的新Mac(El Capitan 10.11.4)上安装PHP Intl扩展,但是在make阶段期间存在链接错误.
以下是我采取的步骤:
已安装PEAR以在Mac上运行
编译并安装ICU库(版本51.2) /usr/local/lib
执行此命令:sudo pecl install intl出现错误(见下文).我也尝试直接从PHP源代码("ext"文件夹)编译扩展,并收到相同的错误消息.
我收到以下错误:
ld: file not found: libicudata.51.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [intl.la] Error 1
ERROR: 'make' failed
Run Code Online (Sandbox Code Playgroud)
看起来像:
文件丢失(即使它知道要查找的正确ICU库版本).也许它真的找不到文件.该-L开关和相应的开关似乎指向正确的路径/usr/local/lib路径.
然后,还存在某种架构不匹配.所以,我跑了file libicudata.51.dylib,它似乎是正确的架构.
这是file重新调整的:
$ file /usr/local/lib/libicudata.51.dylib
/usr/local/lib/libicudata.51.dylib: Mach-O 64-bit dynamically linked shared library x86_64
Run Code Online (Sandbox Code Playgroud)
以前有人碰过这个吗?或者知道如何在新的Mac Book Pro(El Capitan 10.11.4)上编译PHP的Intl扩展?我希望能有一些关于下一步要看的提示,因为我在这里有点难过.
官方php7 docker镜像有以下示例:
FROM php:7.0-fpm
RUN apt-get update && apt-get install -y libmemcached-dev \
&& pecl install memcached \
&& docker-php-ext-enable memcached
Run Code Online (Sandbox Code Playgroud)
我正在尝试使用FROM php:7.0-fpm-alpine:
RUN apk add --update --no-cache libmemcached-dev
RUN pecl install memcached && docker-php-ext-enable memcached
Run Code Online (Sandbox Code Playgroud)
PECL给出了这个错误:
pecl/memcached需要PHP(版本> = 5.2.0,版本<= 6.0.0,排除版本:6.0.0),安装版本为7.0.13
如何在alpine上安装memcached php扩展?
我正在尝试在最新的 Mac OS 上为 php 7.4 安装 pecl mongodb 和 memcached 扩展。
得到同样的错误:
pecl install memcached
...
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-timurbYTemI/memcached-3.1.5/libtool --mode=compile cc -I/usr/local/Cellar/php/7.4.11/include/php -I. -I/private/tmp/pear/temp/memcached -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-timurbYTemI/memcached-3.1.5/include -I/private/tmp/pear/temp/pear-build-timurbYTemI/memcached-3.1.5/main -I/private/tmp/pear/temp/memcached -I/usr/local/Cellar/php/7.4.11/include/php -I/usr/local/Cellar/php/7.4.11/include/php/main -I/usr/local/Cellar/php/7.4.11/include/php/TSRM -I/usr/local/Cellar/php/7.4.11/include/php/Zend -I/usr/local/Cellar/php/7.4.11/include/php/ext -I/usr/local/Cellar/php/7.4.11/include/php/ext/date/lib -I/usr/local/opt/zlib/include -I/usr/local/Cellar/libmemcached/1.0.18_2/include -I/usr/local/opt/php@7.4/include -DHAVE_CONFIG_H -g -O2 -I/usr/local/Cellar/php/7.4.11/include/php -I/usr/local/Cellar/php/7.4.11/include/php/main -I/usr/local/Cellar/php/7.4.11/include/php/TSRM -I/usr/local/Cellar/php/7.4.11/include/php/Zend -I/usr/local/Cellar/php/7.4.11/inclu
de/php/ext -I/usr/local/Cellar/php/7.4.11/include/php/ext/date/lib -I/usr/local/opt/zlib/include -I/usr/local/Cellar/libmemcached/1.0.18_2/include -c /private/tmp/pear/temp/memcached/php_memcached.c -o php_memcached.lo
mkdir .libs
cc -I/usr/local/Cellar/php/7.4.11/include/php -I. -I/private/tmp/pear/temp/memcached -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-timurbYTemI/memcached-3.1.5/include …Run Code Online (Sandbox Code Playgroud)