pear

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

用pear来安装phpunit

落爺英雄遲暮 提交于 2020-04-14 02:14:52
【今日推荐】:为什么一到面试就懵逼!>>> 安装pear 的命令如下: $ wget http://pear.php.net/go-pear.phar $ php go-pear.phar pear 安装成功! 下面用 pear 来安装phpunit pear channel-discover pear.phpunit.de pear channel-discover components.ez.no pear channel-discover pear.symfony-project.com pear upgrade-all pear install phpunit/PHPUnit 在安装的过程中可能会出现依赖包,按照提示信息进行安装。 如:yum install php-dom -y等 例子:a.php <?php class StackTest extends PHPUnit_Framework_TestCase { public function testPushAndPop() { $stack = array(); $this->assertEquals(0, count($stack)); array_push($stack, 'foo'); $this->assertEquals('foo', $stack[count($stack)-1]); $this-

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

install crypt blowfish on xampp on windows

为君一笑 提交于 2020-02-08 02:30:53
问题 I have a module for a zencart which requires Blowfish Encryption on my server. At the moment I'm just testing on my localhost which is xampp on a windows machine. Ive googled and looked on stackoverflow but can't find any instructions (at least that I understand) on how to do it. Is it even possible? thanks :) 回答1: Actually, if you use the latest XAMPP, mcrypt is installed by default. According to the PHP website: PHP 5.3 Windows binaries uses the static version of the MCrypt library, no DLL

PEAR Mail is so slow, my front end is timing out

|▌冷眼眸甩不掉的悲伤 提交于 2020-02-05 10:18:51
问题 I've got a php script that sends a few emails and echoes a response back to my front end. The problem is that the email handling is so slow, the front end is timing out. Here are the broad strokes for the email implementation. The scenario kicks off when User A books an offer from User B. User A gets a confirmation email, User B gets a notification email and myself and 2 other employees get an email alert. So that's 3 unique email messages and 5 addresses. And the tech specifics are: I'm

How do I update phpunit?

为君一笑 提交于 2020-02-02 03:14:07
问题 I have already tried everything , including https://stackoverflow.com/a/8740349/251311 and all possible channel upgrade and clear cache commands. But still: $ sudo pear install -a -f phpunit/PHPUnit downloading PHPUnit-3.6.12.tgz ... Starting to download PHPUnit-3.6.12.tgz (120,240 bytes) ..........................done: 120,240 bytes install ok: channel://pear.phpunit.de/PHPUnit-3.6.12 while: $ pear list-upgrades Channel pear.php.net: No upgrades available pear.phpunit.de Available Upgrades

why doesn't PEAR use absolute paths? [closed]

倾然丶 夕夏残阳落幕 提交于 2020-01-25 11:47:07
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . Why does PEAR do this: require_once 'HTML/QuickForm2/Exception.php'; Instead of this?: require_once dirname(__FILE__) . '/Exception.php'; The only thing I could find on the subject is this: https://pear.php.net/bugs/bug.php?id=17517 It's supposed to be "completely the opposite direction of PEAR

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

PHP PEAR Container error

佐手、 提交于 2020-01-17 01:30:16
问题 Allrighty, it's the first time I ask a question here. My problem is as awkward as it is difficult to get to the bottom of. Story goes like this: I have this little system, which sends alot of e-mail invitations(not spam). So, being sensible, I don't use the PHP function mail(), I use PEAR classes like Mail, Mail_Queue, Net_SMTP, etc. Only problem is, my error logs fill up with tons of errors like this: PHP Notice: Error in sending mail: Mail Queue Error: Cannot initialize container in /usr

Phing error when using gitclone - Git tasks depend on PEAR\'s VersionControl_Git package

本小妞迷上赌 提交于 2020-01-05 15:17:32
问题 When I run phing install i keep getting this error: Execution of target "install" failed for the following reason: /Applications/MAMP/htdocs/wp-test/build.xml:7:8: /Applications/MAMP/htdocs/wp-test/build.xml:7:8: The Git tasks depend on PEAR\'s VersionControl_Git package. So I download the package: downloading VersionControl_Git-0.4.4.tgz ... Starting to download VersionControl_Git-0.4.4.tgz (14,831 bytes) .....done: 14,831 bytes install ok: channel://pear.php.net/VersionControl_Git-0.4.4 But