Link to home
Start Free TrialLog in
Avatar of afflik1923
afflik1923Flag for United Kingdom of Great Britain and Northern Ireland

asked on

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

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.
ASKER CERTIFIED SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of afflik1923

ASKER

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.
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?
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.
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
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.