PECL

pecl installing extension on production server troubles

限于喜欢 提交于 2019-12-10 14:13:59
问题 So I installed the pecl oauth module locally, and it all works perfectly. I then tried to do this for the production server but ran into some problems. If I say sudo pecl install oauth, I get this error: No releases available for package "pecl.php.net/oauth" install failed So I figure I have to update pecl.php.net, so I try the command sudo pecl channel-update pecl.php.net , but then I get this output: Updating channel "pecl.php.net" Channel "pecl.php.net" is not responding over http://,

How to check if PECL extension is present?

亡梦爱人 提交于 2019-12-10 12:49:43
问题 How do I from PHP code if a PECL extension is installed or not? I want gracefully handle the case when an extension is not installed. 回答1: Couple different ways. You can just check for the existence of the class, or even a function: class_exists, function_exists, and get_extension_funcs: <?php if( class_exists( '\Memcached' ) ) { // Memcached class is installed } // I cant think of an example for `function_exists`, but same idea as above if( get_extension_funcs( 'memcached' ) === false ) { //

ImageMagick - PECL issue - Cannot locate header file MagickWand.h

与世无争的帅哥 提交于 2019-12-10 12:39:16
问题 We are getting this error while installing ImageMagick PECL: checking ImageMagick MagickWand API configuration program... found in /usr/local/bin/MagickWand-config checking if ImageMagick version is at least 6.2.4... found version 6.8.6 Q16 checking for MagickWand.h header file... configure: error: Cannot locate header file MagickWand.h ERROR: `/root/tmp/pear/imagick/configure --with-imagick' failed extension imagick.so installed in /usr/local/lib/php.ini /usr/local/bin/php does not have a

sudo pecl install apc error on os x lion

元气小坏坏 提交于 2019-12-10 01:14:03
问题 I tried installing APC with pecl on OS X Lion ( sudo pecl install apc ) and it complained about a missing pcre.h file: In file included from /private/tmp/pear/temp/APC/apc.c:44: /usr/include/php/ext/pcre/php_pcre.h:29:10: fatal error: 'pcre.h' file not found #include "pcre.h" So I used MacPorts to install the pcre package ( sudo port install pcre ) but it still complains. How can I fix this? 回答1: I think this is because MacPorts installs the header files in a different location from where

Memcache extension with PHP 7 on CentOS fails to install

家住魔仙堡 提交于 2019-12-08 21:13:13
问题 I'm trying to upgrade a fairly large PHP 5.3 code base to PHP 7. It's hosted on CentOS 6.5, so I want to keep it on that OS. I'm currently doing it on a virgin Vagrant box - I've installed PHP 7 successfully, and all the modules except for Memcache. As root, when I run pecl install memcache it tries to install v2.2.7 but I get a long list of errors and warnings from make . At the end is: make: *** [memcache.lo] Error 1 ERROR: `make' failed According to GoPHP7 it should work, Memcache should

Unknown authentication scheme on LinkedIn API

懵懂的女人 提交于 2019-12-08 17:11:37
问题 I'm using OAuth 1.0a for LinkedIn API. Currently, I've already implemented some calls for getting the profile and connections and they all seem to work fine. But for sending a message, the oauth library throws an exception with the following: { "errorCode": 0, "message": "Unknown authentication scheme", "requestId": "I2Y0MFJ8ME", "status": 401, "timestamp": 1378376573339 } I'm using PHP PECL OAuth. I'm initializing the $oauth object like this: $oauth = new OAuth(API_KEY, API_SECRET, OAUTH_SIG

Creating php DLL from pecl source files

可紊 提交于 2019-12-08 07:24:43
问题 How can i build a DLL file from a PECL source file. I need to build DLL for APC extension from PECL source (http://pecl.php.net/package/APC) 回答1: download php_apc-3.1.9-svn20110915-5.3-VC9-x64-win7-2008.zip from http://www.mediafire.com/php-win64-extensions Enable the APC extension in your PHP.INI file. Edit the php.ini file and add the following line in the extensions section: extension = php_apc.dll Restart apache / iis and look at the output of phpinfo. 回答2: If you are on Linux life is

php扩展可以通过pecl 或者phpize 安装

烂漫一生 提交于 2019-12-07 11:04:34
pecl 算是 php 扩展的一个官方聚合平台,一些比较有名,有特点的扩展会被 pecl 收录,收录后可以通过 pecl 的方式安装。但是更多的扩展是没有收录在 pecl 上的,这些扩展还是需要通过 phpize 配置进行手动安装。 pecl的用法: 安装pecl cd /usr/local/php/bin/ wget http://pear.php.net/go-pear.phar -O go-pear.php php go-pear.php ##回车默认安装 安装php扩展 pecl search key-word #用于查找扩展 pecl install key-word #用于安装扩展 phpize的用法: #cd /home/php5.2.1/ext/sockets #/server/php/bin/phpize #./configure --with-php-config=/server/php/bin/php-config --enable-sockets #make #make install 再修改/usr/local/php/etc/php.ini文件 #extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/" (php5.4版本以上不用加扩展路径)

wamp server php extension PECL Missing

a 夏天 提交于 2019-12-07 10:42:28
Does any one know why the PECL extension in wamp server does not exists? I am trying to use the http_build_url() but I get this error: Fatal error: Call to undefined function http_build_url() in ... The function http_build_url() is part of the PECL extension pecl_http . In your WAMP directory locate pecl.exe and open a command shell. Type: pecl install pecl_http and the function call should work. i have found this source of pecl_http package, but dont know how to make it work on wamp as there is no .dll file in there. http://pecl.php.net/package/pecl_http This question is old now, so if you

ZipArchive Library Is Not Enabled When Using PHPExcel

廉价感情. 提交于 2019-12-07 04:20:29
问题 I am using CodeIgniter and PHPExcel to read and write to excel files. Everything worked fine in localhost, but when I uploaded my PHP CodeIgniter application to the server in pagodabox I got the below message when I tried to read data from excel files. Fatal error: Uncaught exception 'Exception' with message 'ZipArchive library is not enabled' in /var/www/application/libraries/PHPExcel/Reader/Excel2007.php 回答1: For writing, PHPExcel does provide PCLZip as an alternative to ZipArchive. You can