PECL

How can I install a pecl extension like mcrypt in DDEV-Local's web container?

会有一股神秘感。 提交于 2020-04-16 02:27:47
问题 In PHP 7.2 and higher the mcrypt extension is no longer available, but my project depends on it. I know that the project shouldn't be using something as ancient as mcrypt, but I don't have any say in this. I know that mcrypt was removed from PHP7.2+ but is still in pecl. What can I do for this project to support php-mcrypt in 7.2 and higher? 回答1: DDEV-Local supports custom Dockerfiles, so you can add almost anything you want to the web container. This .ddev/web-build/Dockerfile will install

Yaf-3.1 10%性能提升版

时光毁灭记忆、已成空白 提交于 2020-03-23 21:23:10
3 月,跳不动了?>>> 本文地址: https://www.laruence.com/2020/03/15/5563.html 转载请注明出处 Yaf(Yet Another Framework) 是我的第一个发布的PECL扩展,也是我走上PHP内核维护的开始,我一直对它比较有感情,Yaf在过去的8年多时间里,也得到了不少朋友的喜爱,当然Yaf还是有很多不足,但毕竟Yaf主要还是针对性能场景,不能满足所有的需求。 即然Yaf == 性能,借着疫情的在家时间,又花了一些时间对Yaf做了一轮优化,希望能对性能有进一步的提升。 主要涉及到的有: 1. 重构了Yaf_Loader::autoload 2. 重写了Yaf_Route_Static/Rewrite的核心逻辑 3. is_localnamespace采用Hash匹配来取代之前的字符串匹配 4. 重写了大部分的逻辑以避免内存分配 因为改动比较大,所以也跳跃了版本,从3.0.9到3.1.0. 下载地址: Yaf At PECL 那么,还是老规矩,我们来测试下性能变化,首先采用yaf代码中的tools/cg/yaf_cg来生成一个测试: tools/cg/yaf_cg benchmark /var/www/html/yaf 测试服务器配置: 32GB RAM Intel(R) Xeon(R) CPU E5-2620 v2 @ 2

Yaconf-1.1 40%速度提升版

荒凉一梦 提交于 2020-03-23 19:30:49
3 月,跳不动了?>>> 本文地址: https://www.laruence.com/2020/03/12/5521.html 转载请注明出处 Yaconf是一个高性能的PHP配置容器, 它在PHP启动的时候把格式为INI的配置文件Parse后存储在PHP的常驻内存中,不需要每次请求的时候都来分析配置文件,并且在获取配置项的时候"zero-copy",具体的介绍可以看我2015年发布的时候写的介绍: Yaconf - 一个高性能的配置管理扩展 。 Yaconf在微博被大量使用,也稳定运行了这么多年,但是2015年发布后基本也没有什么大的变化。 最近因为疫情,我对Yaconf做了一系列的重构,主要是减少取过程中的内存使用,基本重写了整体的逻辑,那性能优化的结果如何呢? 我们来做个简单的测试。 首先测试配置文件如下: name="yaconf" version="1.1.0" [author] name="Laruence" blog.address="https://www.laruence.com" [developer : author] projects.yaf.repo="https://github.com/laruence/yaf" 测试脚本如下: <?php function bench($key) { $count = 1000000; $start =

Yaf-3.1 10%性能提升版

只愿长相守 提交于 2020-03-20 23:27:28
3 月,跳不动了?>>> 本文地址: https://www.laruence.com/2020/03/15/5563.html 转载请注明出处 Yaf(Yet Another Framework) 是我的第一个发布的PECL扩展,也是我走上PHP内核维护的开始,我一直对它比较有感情,Yaf在过去的8年多时间里,也得到了不少朋友的喜爱,当然Yaf还是有很多不足,但毕竟Yaf主要还是针对性能场景,不能满足所有的需求。 即然Yaf == 性能,借着疫情的在家时间,又花了一些时间对Yaf做了一轮优化,希望能对性能有进一步的提升。 主要涉及到的有: 1. 重构了Yaf_Loader::autoload 2. 重写了Yaf_Route_Static/Rewrite的核心逻辑 3. is_localnamespace采用Hash匹配来取代之前的字符串匹配 4. 重写了大部分的逻辑以避免内存分配 因为改动比较大,所以也跳跃了版本,从3.0.9到3.1.0. 下载地址: Yaf At PECL 那么,还是老规矩,我们来测试下性能变化,首先采用yaf代码中的tools/cg/yaf_cg来生成一个测试: tools/cg/yaf_cg benchmark /var/www/html/yaf 测试服务器配置: 32GB RAM Intel(R) Xeon(R) CPU E5-2620 v2 @ 2

Pear error “XML Extension not found” on Ubuntu 14.04 after installing php-xml & php-xml7.0

折月煮酒 提交于 2020-02-27 05:26:29
问题 I wanna use the pecl command to install redis to my php on Ubuntu 14.04. But my Pear is giving me a list of warnings: Warning: Invalid argument supplied for foreach() in Command.php on line 249 Warning: Invalid argument supplied for foreach() in /usr/share/php/PEAR/Command.php on line 249 Warning: Invalid argument supplied for foreach() in Command.php on line 249 Warning: Invalid argument supplied for foreach() in /usr/share/php/PEAR/Command.php on line 249 Warning: Invalid argument supplied

Installing gearman PHP extension on Windows using cygwin and pecl

佐手、 提交于 2020-02-06 08:49:30
问题 There is only a handful of threads on installing gearman on Windows, especially the gearman PHP extension. I have not found a solution yet. If anyone found a solution to get gearman PHP extension working on Windows, please comment on this thread. I came across this thread on pecl install gearman . When attempting to install Gearman PHP extension through cygwin using pecl, the installation failed with the following error. $ pecl search gearman Retrieving data...0% Matched packages, channel

Install PECL modules without the prompts

徘徊边缘 提交于 2020-01-30 13:51:41
问题 I just installed PHP on Ubuntu Natty from source. I'm trying to use PECL to install additional modules like APC and Memcache. I'm using something like this: pecl install apc However, I get prompts asking me to confirm things. How can I use the pecl command to just accept the defaults? I saw something like this on a message board: printf "yes\n" | pecl install pecl_http . However, in the case of APC this would answer yes for things where the default is no (I think). Thanks in advance. 回答1: The

send custom HTTP response with PHP

℡╲_俬逩灬. 提交于 2020-01-17 08:47:17
问题 I want to send a custom HTTP response back to an application requesting a GET to a php script. The body is will be in binary format (octet-streams). I'm wondering if there is a simple way to do this? I am looking into the HttpResponse class in PECL but is having trouble installing it right now. I do not really need all the other functionalities that goes with it so I'm looking for something simpler. Any help would be appreciated. 回答1: PHP has a header() function built in, so you can customise

Install PECL on Mac OS X 10.6

我们两清 提交于 2020-01-09 12:20:59
问题 Is there any way to install PHP:s PECL handler on Mac OS X 10.6, to be used with the bundled PHP? 回答1: Better late than never, but if you are like me and installed PHP directly from php.net (instead of using something like Homebrew or Port, then you can simply follow the following link to install Pear and PECL: http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/ We need PEAR! For some reason, it's not set up ready to on Lion, but the install phar file is here, so we just need to

Install PECL on Mac OS X 10.6

て烟熏妆下的殇ゞ 提交于 2020-01-09 12:20:27
问题 Is there any way to install PHP:s PECL handler on Mac OS X 10.6, to be used with the bundled PHP? 回答1: Better late than never, but if you are like me and installed PHP directly from php.net (instead of using something like Homebrew or Port, then you can simply follow the following link to install Pear and PECL: http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/ We need PEAR! For some reason, it's not set up ready to on Lion, but the install phar file is here, so we just need to