Fwd: [PEAR] need help with using Mail.php
| From: | Paula Fether | Date: | Thu, 19 Oct 2006 12:16:06 +0000 |
| Subject: | Fwd: [PEAR] need help with using Mail.php | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25551@lists.php.net to get a copy of this message | ||
---------- Forwarded message ----------
From: Paula Fether <gridzmaster@gmail.com>
Date: Oct 19, 2006 8:15 AM
Subject: Re: [PEAR] need help with using Mail.php
To: papercrane@reversefold.com
pear info PEAR gives:
About PEAR-1.3.6
================
Provides Classes: OS_Guess, System
Package PEAR
Summary PEAR Base System
Description The PEAR package contains:
* the PEAR installer, for creating,
distributing
and installing packages
* the alpha-quality PEAR_Exception php5-only
exception class
* the beta-quality PEAR_ErrorStack advanced
error handling mechanism
* the PEAR_Error error handling mechanism
* the OS_Guess class for retrieving info about
the OS
where PHP is running on
* the System class for quick handling common
operations
with files and directories
* the PEAR base class
Maintainers Stig Bakken < stig@php.net> (lead)
Tomas V.V.Cox <cox@idecnet.com> (lead)
Greg Beaver <cellog@php.net> (lead)
Pierre-Alain Joye <pajoye@pearfr.org> (lead)
Martin Jansen <mj@php.net> (developer)
Version 1.3.6
Release Date 2005-08-18
Release State stable
Release License PHP License
Release Notes * Bump XML_RPC dependency to 1.4.0
* return by reference from PEAR::raiseError()
Release Deps PHP >= 4.2
Package Archive_Tar >= 1.1
Package Console_Getopt >= 1.2
Package XML_RPC >= 1.4.0
ext xml ==
ext pcre ==
ext xmlrpc ==
Last Modified 2006-03-05
And pear upgrade PEAR gives
downloading PEAR-1.4.11.tgz ...
Starting to download PEAR-1.4.11.tgz (283,272 bytes)
..........................................................done: 283,272
bytes
requires package `Archive_Tar' >= 1.3.1
PEAR: Dependencies failed
On 10/19/06, Justin Patrin <papercrane@gmail.com > wrote:
On 10/18/06, Paula Fether <gridzmaster@gmail.com > wrote: downloading PEAR-1.4.11.tgz ... Starting to download PEAR-1.4.11.tgz (283,272 bytes) ..........................................................done: 283,272 bytes Release for 'pear' dependency Release for 'pear' Release for 'pear' dependency/usr/lib/php/extensions/no-debug-non-zts-20020429'PEAR_Frontend_Web' has state dependency 'PEAR_Frontend_Gtk2'has state'alpha', requires 'stable' 'PEAR_Frontend_Gtk' 'beta', requires'stable'has state 'beta', requires 'stable'upgrade failed That output doesn't make sense to me.... could you do: pear info PEAR Then try: pear upgrade PEAR On 10/18/06, Justin Patrin <papercrane@gmail.com> wrote:On 10/18/06, Paula Fether <gridzmaster@gmail.com > wrote:Mail, doesYes, I did that twice.Ok, well, if upgrading PEAR didn't work or it did work but the installer still says there are no package.xml 2.0 handlers then somehting is wrong. What happens when you do: pear upgrade -a PEAROn 10/18/06, Justin Patrin < papercrane@gmail.com > wrote:On 10/18/06, Paula Fether <gridzmaster@gmail.com> wrote:package.xmlI tried the install again and saw the message "No handlers forversion 2.0" but I don't think that has anything to do withyourit?The first lines of the install are Starting to download Mail-1.1.14.tgz (17,537 bytes) ......done: 17,537 bytes downloading Net_SMTP-1.2.8.tgz ... So maybe it's downloaded but not installed?Did you do the upgrade-all as I asked before? You need to updatetestPEAR package.On 10/18/06, Justin Patrin < papercrane@gmail.com > wrote:On 10/18/06, Paula Fether <gridzmaster@gmail.com> wrote:pearcmd.phpListing of /usr/lib/php isArchive Net PEAR.php buildConsole OS System.php datadocHTML PEAR XMLso apparently Mail.php wasn't installed.Sounds like pear install -a Mail sisn't work....On 10/18/06, Justin Patrin < papercrane@gmail.com> wrote:On 10/18/06, Paula Fether < gridzmaster@gmail.com > wrote:remembered toDone, also added some more paths. No change. Evenmessage, sorestartApache again. The new paths do show up in the errorwrote:thechangesare taking effect, but it still can't find Mail.phpDid you look to see if Mail.php is actually there? Did you ge it installed via the pear command?On 10/18/06, Justin Patrin < papercrane@gmail.com>wrote:On 10/18/06, Paula Fether < gridzmaster@gmail.com >stored, I'm/private/etc/php.iniThat's weird. Phpinfo now shows the php.ini path as.There must be another place where the path iswrote:guessing.Try editing that file then.On 10/18/06, Justin Patrin < papercrane@gmail.com >wrote:On 10/18/06, Paula Fether < gridzmaster@gmail.com>no worky.Saved file as php.ini, restarted Apache, stillphpinfo();You still get the file not found problem? Runinclude_pathagain(onyour webserver) and look at the php.ini andvalues.Arethey what you expect?On 10/18/06, Justin Patrin < papercrane@gmail.comgridzmaster@gmail.comwrote:On 10/18/06, Paula Fether </usr/lib/phpwrote:pear config-show says php_dir isUnixphpinfo() says php.ini.default is in /etc found php.ini.default and un-commented thecan'tinclude_path,thenadded/usr/lib/php saved php.ini.default but my program stillrightfindMail.phpSo I'm guessing I didn't add the path in thesays. Theplace, orIneedtosavethe file as php.ini?It needs to be named exactly as phpinfo()it to.defaultversionjust has the defaults in it. You should copypapercrane@gmail.com >php.iniandchangeit there. Then you need to restart apache.On 10/18/06, Justin Patrin <gridzmaster@gmail.com>wrote:On 10/18/06, Paula Fether <openwrote:Done, but it can't find Mail.php: Warning: main( Mail.php): failed torequired 'stream: No/Users/paulafether/Sites/gui4me.com/Temail.phpsuchfileordirectoryinonline 2Fatal error: main(): Failed opening/Users/paulafether/Sites/gui4me.com/Temail.phpMail.php'(include_path='.:/usr/lib/php') inaddonline2Do: pear config-show and look for the php_dir line. You need tocomesthatphp.ini,pathtoyourinclude_path in your php.ini. To find yourputthisin ascript (at the top) and look for php.ini: phpinfo();Doing "which Mail.php " in Terminal alsothatupempty."which" is for finding binary commands, soright awaywon'tworkforthesekind of files. You can try using: locate Mail.php but the locate database isn't updatedbin_dirandpapercrane@gmail.com >maynotfindituntil updatedb is re-run.On 10/18/06, Justin Patrin <gridzmaster@gmail.comwrote:On 10/18/06, Paula Fether <wrote:Net_SMTP- 1.2.8.tgz,It downloaded Mail-1.1.14.tgz andthensaidFirst thing you should do is: pear list-upgrades then pear upgrade-all Once that's done, look again at: pear help install You want pear install -a Mail Net_SMTPrequires package `Net_Socket' requires package `Auth_SASL' Net_SMTP: Dependencies failed Here are the config settings: PEAR executables directorydoc_dir/usr/binPEAR documentation directory/usr/lib/php/docPHP extensiondirectory ext_dir
php_dirPEAR directory
cache_dir/usr/lib/phpPEAR Installer cache directory
/tmp/pear/cachePEAR data
directory data_dir/usr/lib/php/data
php_binPHP CLI/CGI binary
/usr/bin/phpPEAR test
directory test_dir/usr/lib/php/test
cache_ttlCache TimeToLive
preferred_state3600Preferred Package State22stableUnix file mask umaskDebug Log
Level verbose1
http_proxyHTTP Proxy Server Address
passwordmaster_server<notset>PEAR serverpear.php.netPEAR password (for
sig_bin<notset>maintainers) Signature Handling Program
sig_keydir/usr/local/bin/gpgSignature Key Directory
sig_keyid/private/etc/pearkeysSignature Key Id
sig_type<notset>Package Signature Type
usernamegpgPEAR username (for
----------<notpapercrane@gmail.com >set>maintainers) On 10/18/06, Justin Patrin <gridzmaster@gmail.com>wrote:On 10/18/06, Paula Fether <wrote:---------- Forwarded message
with usinggridzmaster@gmail.com >From: Paula Fether <Date: Oct 18, 2006 12:06 PM Subject: Re: [PEAR] need help
installation, so Iresponse.Mail.phpTo: papercrane@reversefold.com Hi Justin, thanks for the quickPEAR came with my php
that itthoughteverythingwasalreadyhere. That's why I was surprised
and dodirectorycouldn'tfindMail.php.SoIjustdownloaded it and put it in thewithmysite.So Iguess Ineed todownload the whole PEAR package
concerninganinstallthen?Ifso,arethereanyprecautions I need to take
whenotherprogramsthatuseit?Open up a terminal and type: pear help Then use it to do things like: pear install Mail Net_SMTPAlso I do have an error routine
methods oncallingMail,butitdoesn'tseemtoget there.Did you try the error handling
paths,mywiki?Thanks again for your help.! PS: I've had other problems with
mysqldump inmaybethisisanotherone. Ihadtomanually add the path to
order to doTerminal(macosx),andthenappendthe PATH statement in php in
yourmysqldumpfromthere.It's possible that 'pear' isn't in
different.path.Trytheaboveandsee ifit is. include_path in PHP is
simple emailspapercrane@gmail.com >On 10/18/06, Justin Patrin <gridzmaster@gmail.comwrote:On 10/18/06, Paula Fether <wrote:Hi, I'm trying to send
someonefrom awebsite.Iusedtojustuse"mail()" but noticed that if
webhost thatreadstheheaderstheycanseeinformation about the
theI'drathernotsend,so ItriedMail.php.At first it couldn't find
program soIdownloadedit.Then Iwrotethefollowing test code: <?php require_once " Mail.php
"; //use
me@mail.comPEARyou@mail.com";$recipients = "$headers["From"] = "
"test with";you@mail.com$headers["To"] = "";$headers["Subject"] =
moreremotehost";$body = "just testing some
(PEAR::isError($mail_object)) {now";mail.me.com";$params["host"] = ""mypassword";owner@me.com ";$params["port"] = "25"; $params["auth"] = true; $params["username"] = "$params["password"] =&Mail::factory("smtp",$mail_object =Mail::send($recipients,$params);$mail_object =$headers,$body);if
successfully$mail_object->getMessage()echo("<p>" .."</p>");}else{ echo("<p>Message
"*Fatalsent!</p>");}?> But it gives the error
*/mypath.com/Mail.php*error*:Callto amemberfunctiononanon-object in
"functiononline*90*".That's where Mail calls
PEARsend($recipients,$headers,$body)".Help please?A few things: 1) Did you install via the
PEARinstallerorbymanuallycopyingthefile? You shoul dbe using the
The smtpinstaller.2) Did you install Net_SMTP?
beforebackendtorequiresthispackage as well. 3) Are you checking for errors
error tousinyourobject?Likelytheabove problems are causing an
http://pear.reversefold.com/dokuwiki/doku.php?id=phpfaqs#what_does_call_to_undefined_method_xxxxxx_meanbereturned.See:
-- Justin Patrin-- Justin Patrin-- Justin Patrin-- Justin Patrin-- Justin Patrin-- Justin Patrin-- Justin Patrin-- Justin Patrin-- Justin Patrin-- Justin Patrin-- Justin Patrin-- Justin Patrin