pear

Can't install PHPUnit via PEAR, requires PEAR Installer >= 1.9.2, can't upgrade PEAR from 1.9.0

独自空忆成欢 提交于 2019-12-17 06:52:23
问题 I read the other PHPUnit installation questions but haven't had any success. What is going on with my PEAR install? $ sudo pear update-channels Updating channel "components.ez.no" Channel "components.ez.no" is up to date Updating channel "doc.php.net" Channel "doc.php.net" is up to date Updating channel "pear.php.net" Channel "pear.php.net" is up to date Updating channel "pear.phpunit.de" Channel "pear.phpunit.de" is up to date Updating channel "pear.symfony-project.com" Channel "pear.symfony

PEAR::Mail Notice Strict Standards error

孤人 提交于 2019-12-14 03:17:56
问题 Installed PEAR Mail library and really like how it works, much better than PHP mail() function. However, I'm getting the strict standards notices showing up in the error_log with every mail sent. They're not fatal, but making a mess of the log. Here is the controlling code: $body = $_POST['message']; //using sendmail on backend $params['sendmail_path'] = '/usr/sbin/sendmail'; //using factory method $mail_object =& Mail::factory('sendmail',$params); //loop through selected users to send for (

How to send and Mime attachment using PEAR Soap

柔情痞子 提交于 2019-12-14 03:07:29
问题 How do I sent and Soap request with an Mime attachment? Now I create an Soap_Attachment with $att = new SOAP_Attachment('contentID', $_FILES['uploaded_file']['type'] . '; charset=utf-8', $_FILES['uploaded_file']['tmp_name']) but how do I attach this attachment to my request? My request is e.g. $result = $soapClient->call('saveEmployeeXmlData', array( 'id' => 'a-key', 'key' => '12456865456845', 'data' => $xml ), $options); Thanks! 回答1: You can try the following $soapClient->getProxy ();

Why $pear->packageExists() returns always false on installed package?

ぃ、小莉子 提交于 2019-12-13 13:27:55
问题 I installed Mail (http://pear.php.net/package/Mail) by pear install Mail everything seems to be ok, but checking for this package programmatically: $pear = new PEAR_Registry(); $enabled = $pear->packageExists('Mail'); always fails for me (false). Could someone give me any advice? If I try to install Mail once again, I am getting: pear/Mail is already installed and is the same as the released version 1.2.0 install failed My include_path settings: include_path = ".;C:\Program Files (x86)\IIS

Install PEAR extension HTTP_Request2 with composer

僤鯓⒐⒋嵵緔 提交于 2019-12-13 12:26:59
问题 I have a composer.json file: { "name": "vendor/Project", "description": "description_text", "repositories": [ { "type": "pear", "url": "http://pear.php.net" } ], "require": { "jakeasmith/http_build_url": "dev-master", "phpmailer/phpmailer": "dev-master", "pear-pear/Text_Diff": "*", "pear-pear/Net_IDNA2": "*", "pear-pear/HTTP_Request2": "2.2.1" }, "require-dev": { "phpunit/phpunit": "< 4.0.0" } } And when I'm trying to execute command php composer.phar install I got this: Loading composer

Get Cname records with NetDNS or get_dns_record

烈酒焚心 提交于 2019-12-13 07:37:19
问题 I'm trying get a list of CNAME records using PHP. This method used to work when I was hosting the code on my old Windows 7 machine, but I moved it to an Ubuntu machine (similar AMP stack setup), and it no longer returned CNAME records for the $url . I uploaded the code to a Windows server and still yet, no CNAME records. $records['cname'] = dns_get_record($url, DNS_CNAME); Not that I'm claiming the OS has much to do with anything, maybe I had something set up a certain way on my old machine

PHP CRYPT_BLOWFISH Error?

五迷三道 提交于 2019-12-13 04:29:08
问题 I'm on Redhat and using PHP Crypt_Blowfish and having following error. ERROR: Notice: Constant CRYPT_BLOWFISH_AUTO already defined in /usr/share/pear/Crypt/Blowfish.php on line 33 Notice: Constant CRYPT_BLOWFISH_MCRYPT already defined in /usr/share/pear/Crypt/Blowfish.php on line 38 Notice: Constant CRYPT_BLOWFISH_PHP already defined in /usr/share/pear/Crypt/Blowfish.php on line 43 Fatal error: Cannot redeclare class Crypt_Blowfish in /usr/share/pear/Crypt/Blowfish.php on line 88 My code is

PHP PEAR Validate Package - Fatal error: Class 'Validate' not found

帅比萌擦擦* 提交于 2019-12-12 23:09:37
问题 This is the error I am receiving: Fatal error: Class 'Validate' not found in C:\xampp\htdocs\final_project\validate.php on line 5 And here is my PHP code: <?php require_once 'Validate.php'; foreach($_POST as $name => $value) { $valid = Validate::string($value); } ?> I do not understand what I am missing. I installed --alldeps for the validate package, and the PEAR include path is also correct. Validate_CA is not giving me any errors, but it is not properly validating either. 回答1: PHP parses

SMTP Error 535 (Incorrect authentication data) using PEAR mail

孤街醉人 提交于 2019-12-12 16:07:27
问题 I used the code from https://stackoverflow.com/a/2748837 to attempt to log into both Gmail and my website's server, and for both of them I received the same error: authentication failure [SMTP: Invalid response code received from server (code: 535, response: Incorrect authentication data)] I have double- and triple-checked that the usernames and passwords are correct (since it works from a desktop client), and removed the brackets around the username. What could be the problem? 来源: https:/

How to install PEAR with EasyPHP 5.3.8?

倖福魔咒の 提交于 2019-12-12 08:14:52
问题 I'm learning Yii and following ebook written by Jeffrey Winesett, the application is built upon TDD. So I need to install PHPUnit to write unit test, which leads me to posts help installing PEAR for my Windows 7 (ref. link 1, link 2). And in those above sites, the author keep telling to use go-pear.bat which doesn't exists in my EasyPHP 5.3.8 which also be the latest version at the time of speaking. Even in this EasyPHP forum post we cannot find the answer. So the question is: How to install