473,785 Members | 2,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pear: Mail_Queue problem, Cannot redeclare class mail_queue_cont ainer:mail_queu e_container_db

Hi to all,
I'm getting my hands into PEAR for a small newsletter-sending project.
I need to boost the performance of the sending script and came accross
this mail_queue class that should queue the emails.

After sweating over the pear installation on myWindows Machine (IIS,
PHP 4.4.6, MySQL), I cannot even run the tutorial script.. I get :
Fatal error: Cannot redeclare class
mail_queue_cont ainer:mail_queu e_container_db in p:\softs\php\pe ar\Mail
\Queue\Containe r\db.php on line 44

Any idea ? Nothing in the bugtracker of the package.

Thanks in advance for your help !

BR,
Damien

Apr 6 '07 #1
3 3052
On Apr 6, 11:56 am, "Ciegalo" <damien.poc...@ gmail.comwrote:
Hi to all,
I'm getting my hands into PEAR for a small newsletter-sending project.
I need to boost the performance of the sending script and came accross
this mail_queue class that should queue the emails.

After sweating over the pear installation on myWindows Machine (IIS,
PHP 4.4.6, MySQL), I cannot even run the tutorial script.. I get :
Fatal error: Cannot redeclare class
mail_queue_cont ainer:mail_queu e_container_db in p:\softs\php\pe ar\Mail
\Queue\Containe r\db.php on line 44

Any idea ? Nothing in the bugtracker of the package.

Thanks in advance for your help !

BR,
Damien
Hello Damien,

You should check to use include_once (or require_once), not include
(or require) statements when you are including PEAR Mail functions to
your code.

Best Regards,
Mityok

Apr 6 '07 #2
On 6 avr, 17:25, "Mityok" <mit...@gmail.c omwrote:
On Apr 6, 11:56 am, "Ciegalo" <damien.poc...@ gmail.comwrote:
Hi to all,
I'm getting my hands into PEAR for a small newsletter-sending project.
I need to boost the performance of the sending script and came accross
this mail_queue class that should queue the emails.
After sweating over the pear installation on myWindows Machine (IIS,
PHP 4.4.6, MySQL), I cannot even run the tutorial script.. I get :
Fatal error: Cannot redeclare class
mail_queue_cont ainer:mail_queu e_container_db in p:\softs\php\pe ar\Mail
\Queue\Containe r\db.php on line 44
Any idea ? Nothing in the bugtracker of the package.
Thanks in advance for your help !
BR,
Damien

Hello Damien,

You should check to use include_once (or require_once), not include
(or require) statements when you are including PEAR Mail functions to
your code.

Best Regards,
Mityok
Hello,
Thanks for the pointer, I had not thought about that. Yet, it does not
solve the problem...

Can it be something bad I've done during setup ? An incompatibility
with IIS ? I'm using the code stroight out of the tutorial.

Thanks again !
Damien

Apr 6 '07 #3
On Apr 6, 8:43 pm, "Ciegalo" <damien.poc...@ gmail.comwrote:
On 6 avr, 17:25, "Mityok" <mit...@gmail.c omwrote:
On Apr 6, 11:56 am, "Ciegalo" <damien.poc...@ gmail.comwrote:
Hi to all,
I'm getting my hands into PEAR for a small newsletter-sending project.
I need to boost the performance of the sending script and came accross
this mail_queue class that should queue the emails.
After sweating over the pear installation on myWindows Machine (IIS,
PHP 4.4.6, MySQL), I cannot even run the tutorial script.. I get :
Fatal error: Cannot redeclare class
mail_queue_cont ainer:mail_queu e_container_db in p:\softs\php\pe ar\Mail
\Queue\Containe r\db.php on line 44
Any idea ? Nothing in the bugtracker of the package.
Thanks in advance for your help !
BR,
Damien
Hello Damien,
You should check to use include_once (or require_once), not include
(or require) statements when you are including PEAR Mail functions to
your code.
Best Regards,
Mityok

Hello,
Thanks for the pointer, I had not thought about that. Yet, it does not
solve the problem...

Can it be something bad I've done during setup ? An incompatibility
with IIS ? I'm using the code stroight out of the tutorial.

Thanks again !
Damien
Hello Damie.

No, this issue is not IIS specific.
The difference between include and include_once is that "include"
function will include given source file every time it occurs in your
source code, while "include_on ce" will include source file only if it
was not included before.

Example :
file : inc.php
<?php
print 'Included string!!!!<br/>';
?>
file inc_test.php
<?php
include 'inc.php';
include 'inc.php';
include 'inc.php';
?>
Output will be:
Included string!!!!<br/>
Included string!!!!<br/>
Included string!!!!<br/>

file inconce_test.ph p
<?php
include_once 'inc.php';
include_once 'inc.php';
include_once 'inc.php';
?>
Output will be:
Included string!!!!<br/>

BTW, read the manual, it rocks :)

Apr 20 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3444
by: LornaJane | last post by:
I've not done very much Java before and now I'm working on a j2me application, however I think the trouble I have is generic java. I can compile, preverify and jar everything fine, but the emulator crashes with the error message: Cannot create class in system package My code (in its entirety!) follows: import javax.microedition.lcdui.*;
11
41094
by: Kimmo Laine | last post by:
I'm flipping my wig here, people. I'm using classes and making each class a file. when I'm including dependet classess, I use require_once to avoid multiple declarations - yet they happen. I put debug_print_backtrace in the file to see how it is included, and here's the output: #0 require_once() called at #1 require_once(\eKirje.textGrid.class.php) called at #0 require_once() called at #1 require_once(\eKirje.kanava.class.php)...
2
8100
by: Midgard | last post by:
I have this error: Fatal error: Cannot redeclare send_welcome_mail() (previously declared in /home/oxxowhol/public_html/config.php:21) in /home/oxxowhol/public_html/config.php on line 21 Why?
4
3107
by: mrityunjay11 | last post by:
my ccode goes as such this is php_dbi.php <? function dbi_connect ( $host, $login, $password, $database ) { if ( strcmp ( $GLOBALS, "mysql" ) == 0 ) { $c = mysql_pconnect ( "192.168.100.3", $login, $password ); if ( $c ) { if ( ! mysql_select_db ( $database ) )
1
1871
by: srilathaapi | last post by:
Hi All, I am getting the error cannot redeclare the class some xxx in file xxx.php. bcz i m including xxx.php in 3 diffrent functions in the same file to invoke the 3 differnet functions in the xxx.php from 3 different functions.so can u give me the solution. Thanks&regards Sri
2
14325
by: srilathaapi | last post by:
Hi All, I am getting the error cannot redeclare the class some xxx in file xxx.php. bcz i m including xxx.php in 3 diffrent functions in the same file to invoke the 3 differnet functions in the xxx.php from 3 different functions.so can u give me the solution. Thanks&regards Sri
5
3673
by: Just Another Victim of the Ambient Morality | last post by:
I have a peculiar bug in my PHP code. It looks something like this: Fatal error: Cannot redeclare func_name() (previously declared in script.php:57) in script.php on line 57 I've done a search and determined that "func_name" really is unique. Besides, how is this even possible? It was previously declared on the same line it's declared? Any help is appreciated. Thank you!
6
2890
by: willlen | last post by:
Hello, I got message: Fatal error: Cannot redeclare sqlconnect() (previously declared in E:\Program Files\Apache Group\Apache2\htdocs\openemr-2.9.0\library\sql.inc:33) in E:\program files\apache group\Apache2\htdocs\openemr-2.9.0\library\sql.inc on line 36 File sql.inc: <?php ... function sqlConnect($login,$pass,$dbase,$host,$port = '3306') { return $GLOBALS = $database->_connectionID;
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10319
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10087
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7496
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.