Page 1 of 2

pear_error code=-1 when retrieving mail

Posted: 30 Apr 2012, 12:40
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

Re: pear_error code=-1 when retrieving mail

Posted: 30 Apr 2012, 14:08
by cubert
I upgraded to Mantis 1.2.10 and it still does the same thing.

Re: pear_error code=-1 when retrieving mail

Posted: 30 Apr 2012, 15:34
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

Re: pear_error code=-1 when retrieving mail

Posted: 30 Apr 2012, 19:02
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.

Re: pear_error code=-1 when retrieving mail

Posted: 30 Apr 2012, 19:20
by cubert
I found some instructions for manually installing PEAR: http://www.geeksengine.com/article/inst ... ndows.html. It made no difference.

Re: pear_error code=-1 when retrieving mail

Posted: 30 Apr 2012, 19:21
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

Re: pear_error code=-1 when retrieving mail

Posted: 30 Apr 2012, 19:37
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.

Re: pear_error code=-1 when retrieving mail

Posted: 30 Apr 2012, 20:02
by cubert
I upgraded to 5.4.1. No change. I'm still not sure if PEAR is installed or how to verify it.

Re: pear_error code=-1 when retrieving mail

Posted: 30 Apr 2012, 21:13
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.

Re: pear_error code=-1 when retrieving mail

Posted: 30 Apr 2012, 21:33
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

Re: pear_error code=-1 when retrieving mail

Posted: 01 May 2012, 12:35
by cubert
I'll see if I can get LDAP to work after downgrading to PHP 5.3.11.

Re: pear_error code=-1 when retrieving mail

Posted: 01 May 2012, 18:16
by atrol

Re: pear_error code=-1 when retrieving mail

Posted: 01 May 2012, 18:21
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?

Re: pear_error code=-1 when retrieving mail

Posted: 07 May 2012, 12:07
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.

Re: pear_error code=-1 when retrieving mail

Posted: 07 May 2012, 15:42
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