Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 08:16 am EST
Geeklog Forums
Did some legwork on the mail problem
Status: offline
Don
Forum User
Full Member
Registered: 06/09/04
Posts: 153
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
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
9
7
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
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
7
7
Quote
Status: offline
Don
Forum User
Full Member
Registered: 06/09/04
Posts: 153
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
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
10
9
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
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
6
6
Quote
All times are EST. The time is now 08:16 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content