pear

How do I get PEAR.php with Composer?

那年仲夏 提交于 2019-12-06 12:21:50
问题 I installed pear/archive_tar to work with Phing, which I installed with Composer. However, I received this error: BUILD FAILED exception 'BuildException' with message 'Error reading project file [wrapped: You must have installed the PEAR Archive_Tar class in order to use TarTask.]' in vendor/phing/phing/classes/phing/parser/ProjectConfigurator.php:197 I added the PEAR repository to Composer and updated, but it still did not work. The second half of this question branched off here. 回答1: I set

Putting PEARs php_dir into include_path in php.ini

倾然丶 夕夏残阳落幕 提交于 2019-12-06 11:03:22
问题 I'm unsure of how to alter my php.ini file according to the instructions on the PEAR website It says "In every case, PEAR's php_dir should be in the include path. If not, add it in your system's php.ini." On my system(Mac 10.6.6), this is PEAR's php dir /Users/michaelmitchell/pear/share/pear On my system, this is the php.ini include path .:/Applications/MAMP/bin/php5.3/lib/php What should the resulting path look like in my php.ini? Do I delete the current path and replace it with PEAR's php

Problems installing PHP EzComponents using pyrus

那年仲夏 提交于 2019-12-06 10:02:42
It seems that the Ez Components repository will not play nice with pyrus. It seems to 302 when pyrus tries to download the package. Has anyone had any luck installing this? It's a requirement for PHPUnit. C:\wamp\bin\php\php5.3.5>php pyrus.phar install ezc/eZComponents Pyrus version 2.0.0a3 SHA-1: BE7EA9D171AE3873F1BBAF692EEE9165BB14BD5D Using PEAR installation found at pyrus Downloading components.ez.no/eZComponents PEAR2\Pyrus\Package\Exception: Invalid abstract package components.ez.no/eZCompo nents PEAR2\Pyrus\Package\Exception: Could not download from "http://components.ez.no /get

Apply Diff in PHP

ぐ巨炮叔叔 提交于 2019-12-06 08:52:50
问题 I'm working with the Text_Diff PEAR package to diff to short text documents, where the Text_Diff object is created with a space-delimited list of the words in each document. I was hoping to store the diff in a database, and then apply it when the file is loaded again. Is there an easy way to apply this diff, or do I need to write a function to parse it? 回答1: The php xdiff extension supports patching from both files and strings. Looking at the source for Text_Diff I see that it uses xdiff for

Installing pear on windows, wrong paths

蓝咒 提交于 2019-12-06 05:18:49
I'm trying to install PEAR on Windows 7. I have php 5.4 in d:\web\soft\php directory, and I want to install PEAR in this directory too. I run: php go-pear.phar I see this: This paths are ok for me. Then I run enter and install it. In the end I see this warning: WARNING! Old version found at D:\web\soft\php, please remove it or be sure to use the new d:\web\soft\php\pear.bat command The 'pear' command is now at your service at d:\web\soft\php\pear.bat` and when I press pear config-show I see completely wrong paths related to disk C:\ : Auto-discover new Channels auto_discover <not set> Default

Netbeans-PHPUnit “No tests executed” error

送分小仙女□ 提交于 2019-12-05 23:43:51
问题 I am newbie to any kind of testing. I just installed pear and PHPUnit using this doc. I use netbeans 7.3.1. I also installed skeletongenerator running this command : pear install phpunit/PHPUnit_SkeletonGenerator . I Followed the steps listed in this testing with PHPUnit to integrate PHPUnit to netbeans. As described in Installing PHPUnit section of that doc, by clicking search button under Netbeans->preferences->unit testing my netbeans recognizes PHPUnit installation. I followed all the

PEAR mail authentication failure when sending emails

我的梦境 提交于 2019-12-05 21:44:38
Since I found that the in-build mail function in PHP has security vulnerabilities I tried to use PEAR. I have installed & made the necessary configuration on my localhost (WAMP server 2.2). However each time I try to send an email the following message is displayed. error: authentication failure [SMTP: Invalid response code received from server (code: 535, response: 5.7.8 Username and Password not accepted. Learn more at 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 gg10sm16772067pbc.46 - gsmtp)] . Both the username and password is correct I have checked it over & over again.

Installing phpDocumentor using PEAR

穿精又带淫゛_ 提交于 2019-12-05 20:52:20
On the home page of http://www.phpdoc.org/ , on http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.quickstart.pkg.html , and on https://github.com/phpDocumentor/phpDocumentor2 , instructions to install phpDocumentor are: pear channel-discover pear.phpdoc.org pear install phpdoc/phpDocumentor When I do so, I see that it is deprecated: [root@desktop ~]# pear channel-discover pear.phpdoc.org Adding Channel "pear.phpdoc.org" succeeded Discovery of channel "pear.phpdoc.org" succeeded [root@desktop ~]# pear install PhpDocumentor WARNING: "pear/PhpDocumentor" is

Fatal error: Class 'PHPUnit_Framework_TestCase' not found

强颜欢笑 提交于 2019-12-05 18:42:39
I am using XAMPP 1.8.1, Windows 7 64 bit, Netbeans IDE 7.4 I have installed PHPUnit. When I run a code, I am getting the below error. Fatal error: Class 'PHPUnit_Framework_TestCase' not found in D:\xampp\htdocs\PHPUnit\index.php on line 6 The Code is: <?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->assertEquals(1, count($stack)); $this->assertEquals('foo', array_pop($stack)); $this->assertEquals(0, count(

Pass GD image object to Imagick?

霸气de小男生 提交于 2019-12-05 17:50:20
I'm generating a barcode with PEAR::Image_Barcode which uses GD, but I need to write that barcode onto a section of a PDF and PHP/Imagick seems to be the easiest way to do that, is there any way to convert a GD image object into something Imagick can work with? here we go: ob_start(); Image_Barcode::draw($barcode, 'upca', 'gif'); $couponBarcode = ob_get_contents(); ob_end_clean(); $second = new Imagick(); $second->readImageBlob($couponBarcode) it's writing the image to an output buffer with GD then reading that variable into an Imagick object ImageMagick has internal image creation functions.