Posted on: 10/29/04 01:41pm
By: Don
I went looking for the error message I've been getting - this one:
Fatal error: Cannot redeclare class mail_rfc822 in d:websitesmillerplacebridge.comwwwsystempearMailRFC822.php on line 59
I found this reference to a known bug on the Pear site:
Description:
------------
When I try to create mailer instance, I always get error message Fatal
error: Cannot redeclare class mail in PEARPEARMail.php on line
33
This is because files Mail.php (base PEAR Mail class) and class mail.php
used as engine to PHP mail() function have the same name under Windows.
The temporary solution is to remove or comment
require_once 'Mail.php'; line from mail.php (mail() engine script)
Reproduce code:
---------------
$MailingEngine = &Mail::factory('mail');
Expected result:
----------------
Fatal error: Cannot redeclare class mail in PEARPEARMail.php on
line 33
So I commented out the reference to 'include_once( 'Mail.php' );' in lib-common. php, and now I get this error message:
Undefined class name 'mail' in D:websitesmillerplacebridge.comwwwlib-common.php on line 3198
Am I on the right track with this? Anybody? TIA.
(Edited to remove quotes in an effort to get the body of message to appear.)
-Don
Did some legwork on the mail problem
Posted on: 10/29/04 01:57pm
By: Dirk
This "solution" doesn't seem to make sense ... If you don't include the Mail.php, which includes the definition of the Mail class, then of course PHP complains that it doesn't know how do create a new object of the Mail class ...
One workaround would be to put the complete path to Mail.php in the require once.
Another should be to use the server's version of the PEAR classes (i.e set $_CONF['have_pear'] = true). At least that's what's working for me on MacOS X (which has the same problem with a case-insensitive file system).
Sorry, haven't had the time to look into this in any detail.
bye, Dirk
Did some legwork on the mail problem
Posted on: 10/29/04 02:04pm
By: Don
As always, Dirk, i appreciate the help. You're a patient man.
One more dumb question - which 'Mail.php' do I include the path to? I found 3 - 1 in 'Admin', 1 in 'system/pear', and 1 in 'system/pear/mail.'
I'm confused as to which one I should be referring to.
-Don
Did some legwork on the mail problem
Posted on: 10/29/04 02:35pm
By: Dirk
sytem/pear/Mail.php is the one I meant.
The pear/Mail/mail.php seems to be an internal file ("internal PHP-mail() implementation of the PEAR Mail:: interface") and admin/mail.php is Geeklog's "Mail Users" functionality.
bye, Dirk
Did some legwork on the mail problem
Posted on: 10/29/04 03:08pm
By: Don
Thanks. I'll be sure to let you know how it turns out.
-Don