PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Pear script working on one server and breaking on another.

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Mail
View previous topic :: View next topic  
Author Message
Code Junkie



Joined: 31 Aug 2010
Posts: 1

PostPosted: Tue Aug 31, 2010 3:53 am    Post subject: Pear script working on one server and breaking on another. Reply with quote

For one of my clients I set up a script using FPDF and the Pear Mail and mime modules to make a form create a pdf and send it to the client by email. While I was waiting for their server to be set up, I made the script work on my test domain (hosted with icdsoft). Once I transfered the script over to the other domain (hosted with Media Temple), it started erroring.

After talking to Media Temple Support six times, icdsoft support once and doing a lot of research and trying on my own, I can't get it to stop giving me an error. The very same code still works on my test server but not on the new server.

The script works here:

http://code-junkie.com/clients/sage/

but not here:

http://sageenrichment.com/

on the second domain, it outputs this:

Fatal error: Call to undefined method Mail_mimePart::encodeheader() in /nfs/c07/h03/mnt/105329/users/.home/pear/php/Mail/mime.php on line 1316

I've tried installing the pear modules, linking to them in 3 places, making sure it's getting mimePart.php and PEAR.php, changing the php version on both servers, modifying the code, and using a different email script.

If it helps, the script I'm using is roughly this one here:

http://www.astahost.com/info.php/create-email-pdf-file-39on-fly39-php_t6334.html

Here is the PHP info for the test server where it's working:

http://code-junkie.com/clients/sage/phpinfo.php

Here is the PHP info for the server where it's not working:

http://code-junkie.com/clients/sage/phpinfo.php

I have confirmed that both servers are using the same versions of Pear, Mail, and Mail_mime.

icdsoft support reccomended this:
- check if the directory containing the PEAR modules is in the include path of the PHP script

I notice that in the PHPinfo files they have different include paths and that one server has register globals as on and the other has register globals as off. Maybe those could have something to do with it.

If anyone has any suggestions, I would be very appreciative.

Thank you

edit: someone on a site I was reading was having this error and someone mentioned something about case sensitivity. Could that be a part of it? I noticed that the output error has the function name all in lowercase (encodeheader) while in the code it is both uppercase and lower case (encodeHeader).

Interestingly, encodeHeader errors at line 1316 where it is being called within the function call itself but not a little bit lower in the code at around 1265 where it's called twice without issue. This leads me to suspect that the problem lies with the fact that this is being called in relation to Mail_mime and the others aren't.

edit 2: The error will only show up once the form is submitted, but the only fields required to submit the form are clicking the checkbox at the bottom and submitting.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Mail All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement