Home » Mail » Mail » Bug #1139
Always Fatal error: Cannot redeclare class mail in ......
Details
| Submitted | 2004-04-05 21:21 UTC |
|---|---|
| From | FractalizeR at yandex dot ru |
| Assigned | jon |
| Status | Closed |
| Package | |
| PHP Version | 4.3.3 |
| OS | Windows 2000 |
| Roadmaps | (Not assigned) |
Comments
[2004-04-05 21:21 UTC] FractalizeR at yandex dot ru
Description:
------------
When I try to create mailer instance, I always get error message Fatal error: Cannot redeclare class mail in <...>\PEAR\PEAR\Mail.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 <...>\PEAR\PEAR\Mail.php on line 33
[2004-04-05 23:37 UTC] chagenbu at php dot net
I agree with Jon.
[2006-10-11 04:35 UTC] hunny_bunny_s at yahoo dot com
HELP GET TO SEND MAIL PLEASE