pear_error code=-1 when retrieving mail

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

cubert
Posts: 25
Joined: 23 Mar 2012, 19:53

pear_error code=-1 when retrieving mail

Post by cubert »

I don't know what pear is or why Email Reporting is using it. I tested automated e-mail retrieval at least 20 times, but as soon as my users started e-mailing tickets they just weren't picked up. Here is the debug output from Email Reporting. The messages are sitting in the helpdesk mailbox. I am using Email Reporting 0.90-DEV and Mantis 1.2.9, schema version 183.

Mailbox: INITIALIZATION PHASE
Message: Debug output memory usage
Location: Mail API - Finished __construct
Current memory usage: 5.06 MiB / -1
Peak memory usage: 5.09 MiB / -1
Current real memory usage: 5.25 MiB / -1
Peak real memory usage: 5.25 MiB / -1

array(11) {
["enabled"]=>
bool(true)
["description"]=>
string(16) "Helpdesk mailbox"
["hostname"]=>
string(10) "10.1.1.158"
["port"]=>
int(110)
["encryption"]=>
string(4) "None"
["username"]=>
string(8) "helpdesk"
["password"]=>
string(12) "YWJjMTIzJA=="
["auth_method"]=>
string(4) "USER"
["project_id"]=>
int(12)
["global_category_id"]=>
int(1)
["mailbox_type"]=>
string(4) "POP3"
}


Mailbox: Helpdesk mailbox
Message: Debug output memory usage
Location: Mail API - Start process mailbox
Current memory usage: 5.06 MiB / -1
Peak memory usage: 5.1 MiB / -1
Current real memory usage: 5.25 MiB / -1
Peak real memory usage: 5.25 MiB / -1



Mailbox: Helpdesk mailbox
[pear_error: message="" code=-1 mode=return level=notice prefix="" info=""]


Mailbox: Helpdesk mailbox
Message: Debug output memory usage
Location: Mail API - Finished process mailbox
Current memory usage: 5.08 MiB / -1
Peak memory usage: 5.1 MiB / -1
Current real memory usage: 5.25 MiB / -1
Peak real memory usage: 5.25 MiB / -1



Done checking all mailboxes
cubert
Posts: 25
Joined: 23 Mar 2012, 19:53

Re: pear_error code=-1 when retrieving mail

Post by cubert »

I upgraded to Mantis 1.2.10 and it still does the same thing.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: pear_error code=-1 when retrieving mail

Post by SL-Gundam »

Pear provides the functionality to use pop3 and imap to connect to the mailbox and retrieve the emails.

For an unknown reason this fails for you as there is an empty pear error (which does not happen often)

I suggest you update all your pear packages for php if you have them
Remove the mailbox you have created in EmailReporting and create it again.

See if that helps
cubert
Posts: 25
Joined: 23 Mar 2012, 19:53

Re: pear_error code=-1 when retrieving mail

Post by cubert »

Can you give me some guidance on how to update PEAR packages? I have PHP 5.4.0 non thread safe running on Windows Server 2008 R2 Service Pack 1. PHP is installed in C:\php\. I do not have a C:\php\pear\ folder. The only place I could find pear on my server is in C:\inetpub\wwwroot\helpdesk\plugins\EmailReporting\core_pear\PEAR.php.

I tried running the following:

Code: Select all

c:\php\php.exe c:\inetpub\wwwroot\helpdesk\plugins\EmailReporting\core_pear\PEAR.php upgrade Net_POP3
It returned quickly with no errors or output of any kind. The pop3.php file was not changed. I don't know if I have PEAR installed properly or how to verify it, or how to begin upgrading PEAR packages.
cubert
Posts: 25
Joined: 23 Mar 2012, 19:53

Re: pear_error code=-1 when retrieving mail

Post by cubert »

I found some instructions for manually installing PEAR: http://www.geeksengine.com/article/inst ... ndows.html. It made no difference.
atrol
Site Admin
Posts: 8376
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: pear_error code=-1 when retrieving mail

Post by atrol »

cubert wrote:I have PHP 5.4.0
I don't recommend this version for production, maybe you try 5.4.1 or even better 5.3.11
Seems that we are getting incompatibility or regression issues. Quite another issue but caused by usage of 5.4.0 http://www.mantisbt.org/bugs/view.php?id=14157
Please use Search before posting and read the Manual
cubert
Posts: 25
Joined: 23 Mar 2012, 19:53

Re: pear_error code=-1 when retrieving mail

Post by cubert »

I was using what was current when I started this a couple of months ago. I didn't know 5.4.1 was available, I'll try upgrading to that.
cubert
Posts: 25
Joined: 23 Mar 2012, 19:53

Re: pear_error code=-1 when retrieving mail

Post by cubert »

I upgraded to 5.4.1. No change. I'm still not sure if PEAR is installed or how to verify it.
cubert
Posts: 25
Joined: 23 Mar 2012, 19:53

Re: pear_error code=-1 when retrieving mail

Post by cubert »

I tried downgrading to 5.3.11 by deleting my PHP directory and unzipping 5.3.11 into it. I can't log in because Mantis won't load the LDAP extension. I put 5.4.1 back in and the LDAP extension worked fine.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: pear_error code=-1 when retrieving mail

Post by SL-Gundam »

Since you don't know anything about PEAR then EmailReporting is most likely using the pear packages it came with (the core_pear directory).

I've never tested MantisBT and EmailReporting on PHP 5.4.x. Maybe the problem lies there but i will have to test it and that will take time
cubert
Posts: 25
Joined: 23 Mar 2012, 19:53

Re: pear_error code=-1 when retrieving mail

Post by cubert »

I'll see if I can get LDAP to work after downgrading to PHP 5.3.11.
atrol
Site Admin
Posts: 8376
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: pear_error code=-1 when retrieving mail

Post by atrol »

Please use Search before posting and read the Manual
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: pear_error code=-1 when retrieving mail

Post by SL-Gundam »

I've finished preliminary testing on PHP 5.4.1 everything seems to be working without issues so far

What mail server are you using?
cubert
Posts: 25
Joined: 23 Mar 2012, 19:53

Re: pear_error code=-1 when retrieving mail

Post by cubert »

It's Exchange 2003. My preliminary testing worked fine. What hasn't worked is e-mails that have been replied to a few times and include multiple formatted signatures and multiple embedded images.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: pear_error code=-1 when retrieving mail

Post by SL-Gundam »

Then i will require the file that starts with "rawmsg_" thats created if debug mode has been activated for EmailReporting or the .msg file when exported from outlook
Post Reply