pear

PHP-PEAR require_once('DB.php');

核能气质少年 提交于 2019-12-01 10:46:22
I've a problem with PEAR (PHP). This is the error: Warning: require_once(DB.php): failed to open stream: No such file or directory in /WWW/xxx.php on line 2 Fatal error: require_once(): Failed opening required 'DB.php' (include_path='.:/usr/share/php:/usr/share/pear') in /WWW/xxx.php on line 2 I've already installed PEAR (version 1.9.0) In my PHP file the first two lines are these: 1- <?php 2- require_once('DB.php'); Where's the problem? Thank you all! You need to install the module: pear install DB Although this page gives a warning about this package being superseded ( not deprecated) by

Xampp 1.7.4 and PHP 5.3.5 (Deprecated warnings)

≡放荡痞女 提交于 2019-12-01 10:11:44
问题 I just upgraded my Xampp installation to 1.7.4 I had a working script (jquery calling PHP script and showing the returned value). After upgrade, my jquery is getting the result correctly, but in addition to the results, there are also some warnings that are returned, hence stopping my script to show the result (I checked in firebug). Here are the warnings: Deprecated : Assigning the return value of new by reference is deprecated in D:\xampp\php\PEAR\Config.php on line 80 Deprecated :

What to use for localization (php/smarty/pear application)?

99封情书 提交于 2019-12-01 09:34:27
问题 I have a php/smarty/pear app that has it's own localization implementation that involves using ids for strings and the strings are stored in a db. currently the app is only in English but I will start adding other languages. The current implementation is very poor and basically I'm not a big fan of re-inventing the wheel. Can anybody recommend what to use for localization? I had used gettext years ago, is that still used or is there something newer and better ? thanks in advance. 回答1: I would

PHP Send UTF-8 mail without PEAR::Mail PEAR::Mail_Mime

浪尽此生 提交于 2019-12-01 09:13:54
问题 I would like to be able to send e-mails with PHP mail() containing the 8-bit characters åäö. They will be used in the subject, the message and in the "From:"-header. How can I do this without using the PEAR packages? 回答1: Simplest solution if you don't mind encoding even words that don't need it is to put everything in a base64 RFC 2047 encoded-word: $subject= "=?utf-8?b?".base64_encode($subject)."?="; $body= "blah blah $utf8text blah"; $headers= "MIME-Version: 1.0\r\n"; $headers.= "From: =

Changing Pecl installation directory

て烟熏妆下的殇ゞ 提交于 2019-12-01 08:36:54
问题 Hi i'm having trouble with pecl installation, the problem i'm having is i'm installing gearman , and i'm now at the stage of installation of the pecl PHP extension. it should be a simple as executing the command : $ sudo pecl install gearman the installation was successfull and I could even test a php containing <?php echo "Gearman version: " . gearman_version() . PHP_EOL; ?> executing it in CLI php using : $ php gearman_version.php does the trick. Unfortunately I am using a stack. lappstack

Setup include path for PEAR on Wamp

眉间皱痕 提交于 2019-12-01 05:49:34
问题 Installed PEAR and followed the directions on http://www.phpunit.de/manual/current/en/installation.html: pear config-set auto_discover 1 pear install pear.phpunit.de/PHPUnit. Then, I created the test: <?php # error reporting ini_set('display_errors',1); error_reporting(E_ALL|E_STRICT); # include TestRunner require_once 'PHPUnit/TextUI/TestRunner.php'; # our test class class ExampleTest extends PHPUnit_Framework_TestCase { public function testOne() { $this->assertTrue(FALSE); } } # run the

Sending HTML message through PEAR while using SMTP authentication returns an error

谁说胖子不能爱 提交于 2019-12-01 05:29:17
I'm trying to send an HTML message while using SMTP authentication to Gmail in PHP. Here is the script that I am using: require_once "Mail.php"; require_once 'Mail/mime.php'; $from = "Some Name <myemail@gmail.com>"; $to = "Other Name <otheremail@gmail.com>"; $subject = "This is a test"; $crlf = "\n"; $host = "ssl://smtp.gmail.com"; $port = "465"; $username = "myemail@gmail.com"; $password = "mypass"; $headers = array ('From' => $from, 'Return-Path' => $from, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username,

PHPUnit , PEAR upgrading Errors

試著忘記壹切 提交于 2019-12-01 03:33:40
Note : I've read all questions about this problem PEAR is installed and configured on my system (Ubuntu 11.10 + Apache/2.2.20). Because <?php require_once 'System.php'; var_dump(class_exists('System', false)); ?> Returning this : bool(true) ( PEAR Manual : Checking if PEAR works Step 4 ) When i tried to use phpunit i'm getting this error. PHP Warning: require_once(PHP/CodeCoverage/Filter.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 38 PHP Fatal error: require_once(): Failed opening required 'PHP/CodeCoverage/Filter.php' (include_path='.:/usr/share/php:/usr

Sending HTML message through PEAR while using SMTP authentication returns an error

人盡茶涼 提交于 2019-12-01 03:09:10
问题 I'm trying to send an HTML message while using SMTP authentication to Gmail in PHP. Here is the script that I am using: require_once "Mail.php"; require_once 'Mail/mime.php'; $from = "Some Name <myemail@gmail.com>"; $to = "Other Name <otheremail@gmail.com>"; $subject = "This is a test"; $crlf = "\n"; $host = "ssl://smtp.gmail.com"; $port = "465"; $username = "myemail@gmail.com"; $password = "mypass"; $headers = array ('From' => $from, 'Return-Path' => $from, 'Subject' => $subject); $smtp =

sending mail using php and pear on windows

假装没事ソ 提交于 2019-12-01 00:48:45
I am trying to send an e-mail using php script but i am getting errors this is my code.i am using xampp netbeans and windows. and i included pear in the php.ini file but still having thies errors any ideas require_once "Mail.php"; $from = "onlinebookstorb@gmail.com"; $to = "'$email'"; $subject = "Online book store information"; $body = "This is your Id '$userID' click <a href =../index.php > here </a> to change to go to the website "; //todo change URL to make it work when it is online $host = "ssl://smtp.gmail.com"; $port = "993"; $host = "smtp.gmail.com"; $username = "onlinebookstoreb@gmail