Link to home
Start Free TrialLog in
Avatar of stkoontz
stkoontzFlag for United States of America

asked on

phpmailer on bluehost

I'm moving a basic form to email script to a new Bluehost account (Apache).  The script uses phpmailer.  The code to call the script is...

require("class.phpmailer.php");
$mail = new PHPMailer();

I'm getting the following error on the 'class.phpmailer.php' line...

Fatal error: require() [function.require]: Failed opening required 'class.phpmailer.php' (include_path='.:/xxx/xxx/php:/xxx/lib/php:/xxx/share/pear') in /xxx/xxx/xxx/xxxxx/apply/city-signup-code.php on line 101

It looks to me like it can't find class.phpmailer.php.  I called Bluehost tech and they couldn't help me unless I could tell them what phpmailer requires.  Since the script just worked on the previous webhost, I couldn't tell them.

Any ideas are greatly appreciated.

Thanks,

Steve
SOLUTION
Avatar of Chris Harte
Chris Harte
Flag of United Kingdom of Great Britain and Northern Ireland 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 stkoontz

ASKER

Thanks for the quick response.  

That's what I was thinking.  I put in a support ticket so should hear back by tomorrow.
SOLUTION
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
This function may be helpful as you try to track down the correct directory path.
http://php.net/manual/en/function.getcwd.php

See also:
http://php.net/manual/en/function.phpinfo.php
ASKER CERTIFIED SOLUTION
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
Thanks for the help.  I downloaded a copy of PHPMailer, uploaded it to my server, and directed the path to the file and it's working now.