Solved

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

Posted on 2007-04-10
6
711 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
ID: 18884150
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
ID: 18886659
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
ID: 18887795
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:afflik1923
ID: 18888409
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
ID: 18888745
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
ID: 18888948
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
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 create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

751 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