Solved

phpmailer.php on Windows platform giving error (fine on unix)- how do I fix?

Posted on 2007-04-10
6
707 Views
Last Modified: 2013-12-13
Hi there,

I was testing a php driven website on a Linux platform and all was great. the script made use of the phpmailer.php class which I've used in a few projects.

In this case the code needed to be ported to a Windows hosting environemen and on any page that calls the phpmailer script I get the following error:

There has been an email error
The error was:
Language string failed to load: instantiate
There has been an email error
The error was:
Language string failed to load: instantiate

The error is printed twice at the top of the page. does anyone know how to fix this.
Not being familar with windows hosting that much I've not tried anything yet. Hopefully so,ethign simple like changing a path.
0
Comment
Question by:afflik1923
  • 4
  • 2
6 Comments
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
Comment Utility
The pathes might be a little bit different on windows than on yourl inux, did you made a call to
$mailer->SetLanguage('en', '/path/to/the/langauge/dir/of/your/phpmailer/');
This error message comes if no language files could be included correctly.
0
 

Author Comment

by:afflik1923
Comment Utility
Ok yes, this seems to be the problem as looking through the code I find reference to a call to SetLangauge.

but what value should I be using as a path? How do I know where the language settings are?

Forgive me if this is stupid question and I will keep looking into this but if you do know off hand then great.
0
 
LVL 48

Expert Comment

by:hernst42
Comment Utility
the language-files are in the language directory. The path can either be absolute or relative to your current executed script. THe language directory comes with phpmailer. Maybe that directory is missing in your application?
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:afflik1923
Comment Utility
Well that is strange. I have used the script many times on Linux boxes and all I have ever done is use a single script called
class.phpmailer.php and it never has been a problem. It was a log time ago that I originally downloaded it and having just downloiaded it agqain from source forge I see there are many files associated with it.

There is even the option to download both a unix and windows version. Maybe I hve just been very stupid here.

I will investigate further and report back.
0
 

Author Comment

by:afflik1923
Comment Utility
Not havin much luck on the windows server. Not that familar with using Windows hosting
I now get the error:

Could not instantiate mail function.
I pust the language folders on the server.
It was all so easy on Linux
0
 

Author Comment

by:afflik1923
Comment Utility
Problem resolved.

The hosts did not allow sending of email from domains other then those parked (An anti spam measure I assume).

Bit annoying actually but heopfully should be as simple as parking the required domains (even if the name servers are not changed for those domains)

thanks again.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now