pear

Installing PHP Zip Extension

眉间皱痕 提交于 2019-11-28 06:15:41
I'm attempting to install the PHP Zip extension. My server does not have external internet access, so I downloaded it myself from PECL: http://pecl.php.net/package/zip . I chose 1.10.2, the latest "stable" release, and transferred it to my server. I ran: pear install zip-1.10.2.tgz and added extension=zip.so to php.ini as instructed. I can see that zip.so was created and placed in the right extension_dir folder as well. I restarted apache and then checked to see if it was loaded by running: php -m Despite all of this, "zip" is still not in that list. Am I missing a step or doing something

PHP: PEAR mail help

那年仲夏 提交于 2019-11-28 05:46:15
I'm trying out the mail pear package. It successfully sends an email but give me the following error: Strict Standards: Non-static method Mail::factory() should not be called statically, assuming $this from incompatible context in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ClientPortal\classes\SupportTickets.php on line 356 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in C:\PHP\PEAR\Mail\smtp.php on line 365 Strict Standards: Non-static method PEAR::isError() should not be called statically

Getting PHPUnit Working - Include Path not set correctly?

五迷三道 提交于 2019-11-28 05:24:48
I'm trying to get PHPUnit working on my development environment but I've hit a bit of a roadblock when it comes to including PHPUnit in my scripts. I know that I need to set the include path on PHP but every combination I've tried fails without the compiler seeing the PHPUnit_Framework_TestCase class. I just ran updates on PHP and PEAR and PHPUnit is installed on the computer because I can access it through the command line just fine. PHPUnit is installed at /usr/share/php/PHPunit Pear is at /usr/share/php/PEAR Is there something I'm missing? This is my first time trying to use PHPUnit or even

How to send emails with PHP using the PEAR Mail package with attachment

牧云@^-^@ 提交于 2019-11-28 04:46:35
问题 I am trying to send an email with PHP by using the PEAR mail package with an attachment. The email sends successfully with a code I got from the internet. However, the attachment does not get sent or attached. Where am I going wrong, below is my code. <?php require_once "Mail.php"; require_once "Mail/mime.php"; $from = "<my.name@company.com>"; $to = "<myname@gmail.com>"; $subject = "Testing email from PHP with attachment"; $body = "Testing email from PHP with attachment"; $file = "invoices

yum install php-pear* on centos

烈酒焚心 提交于 2019-11-28 04:03:48
问题 I'm trying to install pear on my centos. I've used "*yum install php-pear**" to install pear and it seemed to install with success. No errors. I restart my server. However when I check out phpinfo(). I see that my php is still built using " --without-pear ". Isn't yum supposed to rebuild my php with pear? What would be possibly going wrong? Thanks! 回答1: Try something like $ pear list and $ pear info PEAR - now if you get a listing of installed packages in the first case and information on

Phpize under Windows

纵然是瞬间 提交于 2019-11-28 01:22:50
问题 I'm trying to follow the instructions here: https://code.google.com/p/php-sweph/wiki/build to compile a PHP extension. My OS is Windows XP. I'm unable to find "phpize" to do the command. However, I've installed Pear for PHP. is it something only for Linux or is there a way to compile with phpsize with Windows? 回答1: In windows compile script design to compile php itself and should add your extension to compile with php ... On Windows, you don't call phpize but instead you call buildconf.bat.

how to send html mails using PEAR mail

北战南征 提交于 2019-11-27 19:45:35
I am using PEAR mail system to send authenticated mails.I need to send HTML mails that has alinks.It was working fine before i started using PEAR mail.Now i am not able to send HTML mails. mail body looks like this: $body = <<<EOD Hiya $username You might be interested in the current 'haves' and 'wants' on example.com Latest Haves <a href="http://www.exmaple.com/product/have/64/Titan+Fast+Track+SunGlass">Titan Fast Track SunGlass</a> EOD; a tag appears as it is in the mail.Any idea how to solve this??Pls help.. karim79 If you follow this example there's no reason it shouldn't work: <?php

RSA Encrypt in PHP to decrypt in .NET

倾然丶 夕夏残阳落幕 提交于 2019-11-27 18:07:22
问题 In PHP I am RSA encrypting a message to be decrypted by .NET application... but I keep getting a "Bad Key" exception from .NET.... For RSA encryption, I am using PEAR class Crypt_RSA-> encrypting with the public key (which is a modulus, exponent pair) I get from working encryption system in .NET... I guess the easiest question would be-> does "Bad Key" mean it is not able to decrypt the message whatsoever? IE, it is not encrypted correctly? The harder question is-> Is there anything specific

Call to undefined method PHP_CodeCoverage_Filter::getInstance()

橙三吉。 提交于 2019-11-27 17:41:41
I've got a fresh copy of PHPUnit installed on my system (Ubuntu 11), but whenever I type phpunit in the console I get the following error: PHP Fatal error: Call to undefined method PHP_CodeCoverage_Filter::getInstance() in /usr/bin/phpunit on line 39 I have PHPUnit's code coverage installed, as far as I know: >sudo pear install phpunit/PHP_CodeCoverage phpunit/PHP_CodeCoverage is already installed and is the same as the released version 1.1.1 install failed Why am I getting this error and how can I fix it? David Harkness The executable script that loads PHPUnit must not have been updated when

sudo pecl install apc returns error

孤者浪人 提交于 2019-11-27 13:24:11
问题 I run the command: sudo pecl install apc The file gets downloaded, the configuration succeeds, then make is launched and I get the following error. /usr/include/php5/ext/pcre/php_pcre.h:29: fatal error: pcre.h: No such file or directory Is there a way to fix it? 回答1: PCRE is a dependency for installing APC. You can install it pretty quick with yum install pcre-devel or apt-get install libpcre3-dev once it's installed, re-run sudo pecl install apc 回答2: sudo apt-get install libpcre3-dev is the