PECL

php pear / pecl 扩展工具的安装和使用

你。 提交于 2019-11-29 19:21:18
PEAR php extension and application repository php 扩展和应用仓库,为 php 的工具类库(就是说都是用 php 来实现的工具包) pear/pecl 安装 go-pear会同时安装 pear 和 pecl 命令 #这是一个安装 pear 的 php 发行包文件 wget http://pear.php.net/go-pear.phar #执行安装 php go-pear.phar pear 升级或更新源 #如果想升级到最新版本 pear upgrade --force PEAR #更新下仓库 pecl channel-update pecl.php.net pear 安装扩展工具 仓库:https://pear.php.net/packages.php pear install DB pear install DB downloading DB-1.9.2.tgz ... Starting to download DB-1.9.2.tgz (133,795 bytes) .............................done: 133,795 bytes install ok: channel://pear.php.net/DB-1.9.2 安装成功,引入类文件即可调用我们安装的工具类 PECL PHP

Pecl和Pear的区别和联系?

对着背影说爱祢 提交于 2019-11-29 19:20:50
Pear、Pecl都是PHP扩展模块的集合。 扩展PHP有两种方法:   一种是用 纯粹的PHP代码 写函数和类。   Pear就是这样一个项目。PEAR是PHP的官方开源类库(PHP Extension and Application Repository的缩写)。Pear在英文中是梨子的意思。PEAR将PHP程序开发过程中常用的功能编写成类库,涵盖了页面呈面、数据库访问、文件操作、数据结构、缓存操作、网络协议等许多方面,用户可以很方便地使用。它是一个PHP扩展及应用的一个代码仓库,简单地说,PEAR就是PHP的cpan。其主页是pear.php.net。   另外一种是用 C或者C++ 编写外部模块加载至PHP中。   Pecl(The PHP Extension Community Library)就是干这个事的,PHP的标准扩展,可以补充实际开发中所需的功能。所有的扩展都需要安装,在Windows下面以DLL的形式出现;在linux下面需要单独进行编译,它的表现形式为根据PHP官方的标准用C语言写成,尽管源码开放但是一般人无法随意更改源码。其主页是pecl.php.net。   最直接的表述: Pear是PHP的上层扩展,Pecl是PHP的底层扩展。   这两种方法其实都是为特定的应用提供现成的函数或者类,本质上来说都是一样的。 来源: oschina 链接: https:

PHP7 windows 10 VS编译(扩展开发)

怎甘沉沦 提交于 2019-11-29 17:25:57
PHP7.2及以上官方教程 https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2 PHP7.1及以下官方教程 https://wiki.php.net/internals/windows/stepbystepbuild php7要求使用vc2015 Visual Studio 2015 社区版本 PHP -sdk-binary-tools-20110915.zip ( http://windows.php.net/downloads/php-sdk/ 下载) deps-7.0-vc14-x86.7z ( https://windows.php.net/downloads/php-sdk/archives/ 下载) php-7.0.2 ( http://php.net/downloads.php 下载) 第一步 解压php-sdk-binary-tools的二进制包,譬如我解压到我的D:\vcmyprojects\php-sdk文件夹中,现在的目录结构如下 D:\vcmyprojects\php-sdk --bin --script --share 然后,这个是你已经安装完成了visual studio 2015,打开VS2015开人员命令提示,注意,编译是一定要用这个进,普通的cmd不行,走了很多弯路。。。

PHP cannot find MongoDB driver

你离开我真会死。 提交于 2019-11-29 12:30:52
On my Ubuntu 12.04 installation I install PHP5 (5.5) from the ondej package. Everything works ok with the PHP, Apache and MySQL, I also successfully install Mongo daemom and Mongo client. But then PHP cannot locate the MongoDB driver in pear. I have followed all the steps explained in the documentation I have added the extension to the php.ini file in the CLI folder restarted the server updated everything and restart the server again. I have been stuck on this issue quite long time now. Where should I look in. My Ubuntu is also running on a virtual machine I have tried both on VMWare and

Error while installing mongo driver for PHP on amazon linux

独自空忆成欢 提交于 2019-11-29 10:54:00
I tried to install the mongodb driver for PHP on Amazon Linux. While running sudo pecl install mongo , I get the error message: fatal error: openssl/evp.h: No such file or directory #include <openssl/evp.h> ^ compilation terminated. make: *** [io_stream.lo] Error 1 ERROR: `make' failed PEAR Version: 1.9.5 PHP Version: 5.3.29 I installed gcc which helped me progress further with the install till this error. The best Guide I was able to find was here: http://jonathanhui.com/install-mongodb-amazon-linux PHP's guide: http://php.net/manual/en/mongo.installation.php evp is high-level cryptographic

Docker | PHP 扩展配置

孤人 提交于 2019-11-29 07:51:58
# PHP 容器配置 # 从官方基础版本构建 FROM php:7.2-fpm # 官方版本默认安装扩展: # Core, ctype, curl # date, dom # fileinfo, filter, ftp # hash # iconv # json # libxml # mbstring, mysqlnd # openssl # pcre, PDO, pdo_sqlite, Phar, posix # readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard # tokenizer # xml, xmlreader, xmlwriter # zlib # 1.0.2 增加 bcmath, calendar, exif, gettext, sockets, dba, # mysqli, pcntl, pdo_mysql, shmop, sysvmsg, sysvsem, sysvshm 扩展 RUN docker-php-ext-install -j$(nproc) bcmath calendar exif gettext \ sockets dba mysqli pcntl pdo_mysql shmop sysvmsg sysvsem sysvshm # 1.0.3 增加 bz2

Ubuntu pecl install pecl_http fail

风流意气都作罢 提交于 2019-11-29 05:43:41
I'm trying to install this extension but it fails in the configuration phase. I'm on ubuntu 12.04 and I have just installed these packages: libcurl3-openssl-dev php-http libpcre3-dev libcurl3 php-pear php5-dev PHP version: PHP 5.3.10-1ubuntu3.14 with Suhosin-Patch (cli) (built: Sep 4 2014 07:08:49) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans Here is the log of the installation command: sudo pecl install pecl_http downloading pecl_http-2.1.1.tgz ... Starting to download pecl

PDF Lib install fail on linux server. Using pecl install pdflib

别说谁变了你拦得住时间么 提交于 2019-11-29 02:35:02
I'm attempting to install pdflib on my server and receiving the error: configure: error: pdflib.h not found! Check the path passed to --with-pdflib=<PATH>. PATH should be the install prefix directory. ERROR: /root/tmp/pear/pdflib/configure --with-pdflib=/usr/local' failed I am entering the following in terminal: pecl install pdflib path to pdflib installation? : /usr/local I got it solved this way: Downloaded latest http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5p3.tar.gz # cd /home/xxx/Downloads/ # wget http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5p3.tar.gz Un-tar

Parallel HTTP requests in PHP using PECL HTTP classes [Answer: HttpRequestPool class]

自闭症网瘾萝莉.ら 提交于 2019-11-28 21:34:48
The HttpRequestPool class provides a solution. Many thanks to those who pointed this out. A brief tutorial can be found at: http://www.phptutorial.info/?HttpRequestPool-construct Problem I'd like to make concurrent/parallel/simultaneous HTTP requests in PHP. I'd like to avoid consecutive requests as: a set of requests will take too long to complete; the more requests the longer the timeout of one request midway through a set may cause later requests to not be made (if a script has an execution time limit) I have managed to find details for making simultaneuos [sic] HTTP requests in PHP with

sudo pecl install apc returns error

扶醉桌前 提交于 2019-11-28 21:01:06
I run the command: sudo pecl install apc The file gets downloaded, the configuration succeeds, then make is launched and I get the following error. /usr/include/php5/ext/pcre/php_pcre.h:29: fatal error: pcre.h: No such file or directory Is there a way to fix it? Chris Henry PCRE is a dependency for installing APC. You can install it pretty quick with yum install pcre-devel or apt-get install libpcre3-dev once it's installed, re-run sudo pecl install apc sudo apt-get install libpcre3-dev is the answer. So to be able to install pecl [install extension] the following packages are required: sudo