pear

What is wrong with this PHP script to send mail using Pear Mail?

↘锁芯ラ 提交于 2019-11-30 04:51:14
问题 I have this script: require_once "Mail.php"; $from = "Stephen <username@nvrforget.com>";//Google apps domain $to = "username@gmail.com"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; $host = "mail.nvrforget.com"; $username = "username@nvrforget.com"; $password = "password"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to,

phing installed but “not found” and not in pear list

喜你入骨 提交于 2019-11-30 04:48:25
问题 I'm attempting to install the Propel ORM on CentOS which has a dependency for phing. I've run the following which was succesful: pear channel-discover pear.phing.info pear install phing/phing pear install Log However when I run ./propel-gen as is described on the Propel documentation it fails with the error: ./propel-gen: line 69: phing: command not found However if I check to see if phing is installed it doesn't appear in the package list, yet if I try to install it again it fails: $ pear

Replacement for PEAR: MDB2 on PHP 5.3

孤者浪人 提交于 2019-11-30 02:45:37
问题 I've been using pear packages in php for years. I'm in the process of upgrading/moving a sites that uses the MDB2 pear package and it has not been updated for PHP 5.3.X. In 5.3, MDB2 is returning those new annoying errors. Unknown: Assigning the return value of new by reference is deprecated in /usr/local/lib/php/MDB2.php on line 390 I know I can change my error reporting settings to get rid of them, but I'd rather not make any exceptions. Anyway, Is anyone else using MDB2 these days and have

MAMP: How to upgrade PEAR

南楼画角 提交于 2019-11-30 00:11:56
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 pear.conf rm /Applications/MAMP/bin/php/php5.3.6/conf/pear.conf B: edit pear.conf change "php_dir";s:44

How do I correctly install PHPUnit with PEAR?

我的未来我决定 提交于 2019-11-29 22:10:15
I have had to de- and reinstall a newer version of PHPUnit following these directions . Now when I'm launching this line sudo pear install --alldeps phpunit/PHPUnit I see an error message, that looks like this. Unknown remote channel: pear.symfony.com phpunit/PHPUnit requires package "channel://pear.symfony.com/Yaml" (version >= 2.1.0) No valid packages found If I install just Yaml by launching sudo pear install symfony/YAML an older version (1.0.6) will be installed that doesn't meet the dependency of PHPUnit. How can I possibly solve this? I had the same problem while upgrading my phpunit.

php pear / pecl 扩展工具的安装和使用

你。 提交于 2019-11-29 19:21:18
PEAR php extension and application repository php 扩展和应用仓库,为 php 的工具类库(就是说都是用 php 来实现的工具包) pear/pecl 安装 go-pear会同时安装 pear 和 pecl 命令 #这是一个安装 pear 的 php 发行包文件 wget http://pear.php.net/go-pear.phar #执行安装 php go-pear.phar pear 升级或更新源 #如果想升级到最新版本 pear upgrade --force PEAR #更新下仓库 pecl channel-update pecl.php.net pear 安装扩展工具 仓库:https://pear.php.net/packages.php pear install DB pear install DB downloading DB-1.9.2.tgz ... Starting to download DB-1.9.2.tgz (133,795 bytes) .............................done: 133,795 bytes install ok: channel://pear.php.net/DB-1.9.2 安装成功,引入类文件即可调用我们安装的工具类 PECL PHP

Pecl和Pear的区别和联系?

对着背影说爱祢 提交于 2019-11-29 19:20:50
Pear、Pecl都是PHP扩展模块的集合。 扩展PHP有两种方法:   一种是用 纯粹的PHP代码 写函数和类。   Pear就是这样一个项目。PEAR是PHP的官方开源类库(PHP Extension and Application Repository的缩写)。Pear在英文中是梨子的意思。PEAR将PHP程序开发过程中常用的功能编写成类库,涵盖了页面呈面、数据库访问、文件操作、数据结构、缓存操作、网络协议等许多方面,用户可以很方便地使用。它是一个PHP扩展及应用的一个代码仓库,简单地说,PEAR就是PHP的cpan。其主页是pear.php.net。   另外一种是用 C或者C++ 编写外部模块加载至PHP中。   Pecl(The PHP Extension Community Library)就是干这个事的,PHP的标准扩展,可以补充实际开发中所需的功能。所有的扩展都需要安装,在Windows下面以DLL的形式出现;在linux下面需要单独进行编译,它的表现形式为根据PHP官方的标准用C语言写成,尽管源码开放但是一般人无法随意更改源码。其主页是pecl.php.net。   最直接的表述: Pear是PHP的上层扩展,Pecl是PHP的底层扩展。   这两种方法其实都是为特定的应用提供现成的函数或者类,本质上来说都是一样的。 来源: oschina 链接: https:

What is the best way to access a database from PHP? [closed]

陌路散爱 提交于 2019-11-29 19:05:19
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 10 months ago . When accessing a MySQL-database from PHP there seems to be several ways: Sprinkle the code with raw SQL-statements Use the VO-pattern from Java (e.g. DB_DataObjects from PEAR) DIY and write a script that auto-generates one PHP class per database Apart from this I have also

Sending multiple CC's and BCCs with PHP PEAR MAIL

▼魔方 西西 提交于 2019-11-29 17:05:54
问题 I have a project that I am working on at my job and I am using Pear's mailing. I need to use smtp because we need to be able to track everything from our mailserver. And users need to be able to log in before sending a company based email. We cannot use php's mail function fo this. My problem is that I cant find any documentation on the net for sending CC and Bcc as well as sending multiple BCCs. It is very easy to do with php' mail funciton . All you do is add it to the $header variable like

Using PEAR package Horde_Text_Diff

随声附和 提交于 2019-11-29 15:36:16
I installed Horde_Text_Diff , which supersedes Text_Diff . Here's the problem: when I try to use it, it gives me: Class 'Horde_Text_Diff_Engine_Native' not found I looked at the files, and it looks like there are fifteen or so classes that depend on each other, and none of the files include each other. Do I have to do this manually? Again, there are about fifteen files. Is this how PEAR packages are supposed to work? You need to use a PSR-0 compatible autoloader that automatically includes classes when they are available from your include path. Horde provides one, Horde_Autoloader . 来源: https: