pear

PHP PEAR Auth session timeout

走远了吗. 提交于 2019-12-24 01:02:04
问题 This issue has been driving me insane. On two separate projects (both of which use PEAR as libraries but are written on completely different custom frameworks) I am using PEAR Auth for authentication which uses the session. After logging in, users are logged out within an hour or so of being idle. I don't have the exact time, but it's very short. I have tried the following with no success. All attempts to extend the session to one day, just to nail the point home. <?php // Tried built-in

PHP SwiftMailer or PEAR Mail

爷,独闯天下 提交于 2019-12-23 23:17:29
问题 Does someone have some comments about those two? in terms of experience, performance, easiness, problems, spam related, etc. Say you need to send emails (10-20) every 1 hour (cron job). 回答1: I'd go with SwiftMailer. I've used both and Swiftmailer has imho the best API and support. Also SwiftMailer maintenance has been adopted by Fabien Potencier of Symfony fame which only means that it'll improve over time. Pear Mail is also under developement but not really active. In terms of functionality

Can't seem to set my php.exe path in pear.bat

こ雲淡風輕ζ 提交于 2019-12-23 10:41:30
问题 I installed PEAR and when I try to run it, I receive this message: PHP_PEAR_PHP_BIN is not set correctly. Please fix it using your environment variable or modify the default value in pear.bat The current value is: .\php.exe In the pear.bat file that error message is generated as such: :PEAR_PHPBIN_ERROR ECHO PHP_PEAR_PHP_BIN is not set correctly. ECHO Please fix it using your environment variable or modify ECHO the default value in pear.bat ECHO The current value is: ECHO %PHP_PEAR_PHP_BIN%

Can't seem to set my php.exe path in pear.bat

淺唱寂寞╮ 提交于 2019-12-23 10:40:51
问题 I installed PEAR and when I try to run it, I receive this message: PHP_PEAR_PHP_BIN is not set correctly. Please fix it using your environment variable or modify the default value in pear.bat The current value is: .\php.exe In the pear.bat file that error message is generated as such: :PEAR_PHPBIN_ERROR ECHO PHP_PEAR_PHP_BIN is not set correctly. ECHO Please fix it using your environment variable or modify ECHO the default value in pear.bat ECHO The current value is: ECHO %PHP_PEAR_PHP_BIN%

How to not call a function statically in php?

不问归期 提交于 2019-12-23 10:36:58
问题 I am using pear to send mail in PHP. I've followed the example that is on here (http://pear.php.net/manual/en/package.mail.mail.send.php). However, I am getting this error message. Strict Standards: Non-static method Mail::factory() should not be called statically in C:\xampp\htdocs\functions.php on line 43 So I've been trying to get this Strict Standards message to not show up. This is my code: $smtpinfo["host"] = "********"; $smtpinfo["port"] = "587"; $smtpinfo["auth"] = true; $smtpinfo[

How to not call a function statically in php?

℡╲_俬逩灬. 提交于 2019-12-23 10:34:18
问题 I am using pear to send mail in PHP. I've followed the example that is on here (http://pear.php.net/manual/en/package.mail.mail.send.php). However, I am getting this error message. Strict Standards: Non-static method Mail::factory() should not be called statically in C:\xampp\htdocs\functions.php on line 43 So I've been trying to get this Strict Standards message to not show up. This is my code: $smtpinfo["host"] = "********"; $smtpinfo["port"] = "587"; $smtpinfo["auth"] = true; $smtpinfo[

Can't include pear package that definitely exists (and is installed)

一个人想着一个人 提交于 2019-12-23 09:38:49
问题 I installed the Mail_Mime package. include('Mail.php'); include('Mail/mime.php'); I get the following errors: Warning: include(Mail.php) [function.include]: failed to open stream: No such file or directory in /var/www/vhosts/domain.co.uk/httpdocs/mail_mime/index.php on line 2 Warning: include() [function.include]: Failed opening 'Mail.php' for inclusion (include_path='.:/usr/lib/php/PEAR:/usr/lib/php/modules') in /var/www/vhosts/domain.co.uk/httpdocs/mail_mime/index.php on line 2 Warning:

Fatal error: Class 'PHPUnit_Framework_TestCase' not found

て烟熏妆下的殇ゞ 提交于 2019-12-22 09:37:35
问题 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-

Pass GD image object to Imagick?

倖福魔咒の 提交于 2019-12-22 08:04:23
问题 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? 回答1: 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

PHPUnit not recognizing cURL extension — can't install selenium test

泄露秘密 提交于 2019-12-21 20:23:46
问题 I'm on a Windows 7 machine running a WAMPserver and I'm trying to install the Selenium extension for PEAR. However, whenever I try to install it, I'm told that it requires the already-enabled PHP extension "curl": pear install phpunit/PHPUnit_Selenium Package "pear.phpunit.de/PHPUnit_Selenium" dependency "pear.phpunit.de/PHPUnit" has no releases phpunit/PHPUnit_Selenium requires PHP extension "curl" No valid packages found install failed So I go to check my php.ini file to see if it's enabled