pear

How to use PEAR behind proxy?

妖精的绣舞 提交于 2019-12-31 08:55:27
问题 Initially I used the following with no success; export http_proxy=http://username@password:host:port Worth noting I don't get a connection error directly, instead; [root@pal ~]# sudo pear info PHP_CodeSniffer-1.2.1 No information found for `PHP_CodeSniffer-1.2.1' 回答1: Instead of using the system's http_proxy, set the proxy directly in pear's config; pear config-set http_proxy http://username:password@yourproxy:80 回答2: You also may have an issue with your sudo user having different

What error messaging could I insert into this script to find out the problem

允我心安 提交于 2019-12-31 06:13:30
问题 I'm reading a book called PHP 5 Advanced Techniques by Larry Ullman. In Chapter 4, he introduces us to PEAR. After a long struggle I managed to get PEAR working with MAMP and installed the Auth and MDB2 package required for this authentication code. However, when I run it, I'm getting this server errror The website encountered an error while retrieving http://localhost:8888/phpvqp2_scripts/Ch04/login.php. It may be down for maintenance or configured incorrectly. Here are some suggestions:

No releases available for package “pecl.php.net/intl”

試著忘記壹切 提交于 2019-12-31 04:20:08
问题 I'm trying to install intl for php. When I'm running sudo pecl install intl it gives me an error No releases available for package "pecl.php.net/intl" . I have tried to clear cache and also I tried to upgrade pear and pecl . Nothing. Here my pear and php versions: PEAR Version: 1.9.4 PHP Version: 5.6.3 Zend Engine Version: 2.6.0 Running on: Darwin iMac-bvc.local 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep 1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64 Any ideas? Thanks in

what is the purpose of the extra asterisks in php comments?

久未见 提交于 2019-12-30 03:44:11
问题 I've (finally) been reading up on PEAR (php) coding standards. What is the purpose of commenting like this: /** * Here is my comment * I Wrote this in a haiku * But why put the stars? */ As opposed to this: /* Here is a comment No haiku or anything special, but it still works! */ 回答1: The /** stuff */ document is also referred to as DocBlock notation. It's used to document PHP functions, classes, etc. /** * A test function * * @param foo $bar * @return baz */ function test(foo $bar) { return

MAMP: How to upgrade PEAR

浪尽此生 提交于 2019-12-29 18:39:07
问题 When trying to upgrade MAMP pear the following error is raised: Notice: unserialize(): Error at offset 276 of 1133 bytes in Config.php on line 1050 ERROR: The default config file is not a valid config file or is corrupted. Some suggestions how to fix this? Steps to reproduce: Installed MAMP (version 2.0.5) cd /Applications/MAMP/bin/php/php5.3.6/bin sudo ./pear upgrade pear above mentioned error is thrown Update (1): Based on answer 8375349/420953 I tried 2 possibilities to fix this A: delete

Upgrading PEAR on Mac OS X / MAMP

折月煮酒 提交于 2019-12-25 18:15:13
问题 I am installing PHPUnit on Mac OS X and I am having problems with my current PEAR version. Existing SO questions don't resolve the problem. The current PEAR version is listed as 1.9.1. PHPUnit requires 1.9.4. [le programmeur]$which pear /Applications/MAMP/bin/php5.3/bin/pear [le programmeur]$pear -V PEAR Version: 1.9.1 PHP Version: 5.3.5 Zend Engine Version: 2.3.0 [le programmeur]$pear config-get php_dir /Users/rallen8440/pear/share/pear After running pear install -f pear PEAR 1.9.4 is

HTML email through SES SMTP interface - PEAR

雨燕双飞 提交于 2019-12-25 08:09:26
问题 I wish to send HTML emails. I tried using mime.php but could not get it working. Below is my working text email code: <?php $subject="hello-test"; $body="<html><body><h1>message body</h1></body></html>"; $em_arr=array("email@example.com"); foreach ($em_arr as $to_address) { require_once '/usr/local/share/pear/Mail.php'; $headers = array ( 'Content-Type:text/html;charset=UTF-8', 'From' => 'Test <test@example.com>', 'To' => $to_address, 'Subject' => $subject); $smtpParams = array ( 'host' => '

Fatal error: class not found using pear in xampp

China☆狼群 提交于 2019-12-25 07:24:08
问题 I'm trying to send an email using form data. I'm adapting the method described at http://www.html-form-guide.com/email-form/php-email-form-attachment.html which uses the PEAR library. I'm testing my site locally via XAMPP. Here's the code from the top of my page: <?php // Pear library includes include_once('Mail/mail.php'); include_once('Mail/mime.php'); Testing the page produces the following: Fatal error: Class 'Mail' not found in C:\xampp\php\PEAR\Mail\mail.php on line 51 Here's line 51

PHP PEAR mail fails using Google Apps mail account - error 535 authentication failed

吃可爱长大的小学妹 提交于 2019-12-25 03:35:51
问题 I have a PHP page that uses PEAR Mail to send a message through a Google Apps mail account. The page is only active in the fall and winter, and it was working great when it was last used in January. Now, as I prep the site for the fall, this page no longer works. I have the exact same problem as described at SMTP Error 535 (Incorrect authentication data) using PEAR mail There have been no answers to that question and it won't allow me to comment, so I'm starting a new question. I am using

Unhandled win32 exception occurred in “php.exe” in command line

守給你的承諾、 提交于 2019-12-25 03:12:47
问题 When I try to do anything with PHP in the command line, the command line crashes and throws an "unhandled win32 exception". However, my websites are executing PHP without errors. When I debug using Visual Studio, the program breaks at this line in php.exe: 100E890C mov edx,dword ptr [edx+4] And the call stack is as follows: >php5ts.dll!100e890c() [Frames below may be incorrect and/or missing, no symbols loaded for php5ts.dll] msvcrt.dll!761eade8() msvcrt.dll!761ec470() msvcrt.dll!761ef637()