Warning: require_once(../../outside_root/PHPMailerAutoload.php): failed to open stream: No such file or directory...
Fatal error: require_once(): Failed opening required
'../../outside_root/PHPMailerAutoload.php'
(include_path='.:/Applications/MAMP/bin/php/php5.4.10/lib/php') in...
When I had just …/outside_root… I kept seeing “Waiting on local.mysite” in the bottom of the browser window.
So then I tried to fix the path and now it errors out.
I’m not sure what is going on, and not knowing object-oriented programming doesn’t help when it comes to phpMailer.
Can someone please help me figure out what I am doing wrong?
Because I INCLUDED “functions.php” in “contact-us.php”, PHP treats “functions.php” like it is at the same level as the including file.
So while it is physically here…
/public_html/utilities/functions.php
PHP treats it like it is here…
/public_html/
That of course messed up my path reference FROM “functions.php” TO “PHPMailerAutload.php”…
On a side note, another mysterious issue I was having at the same time of this one, but which seems to have disappeared was the fact that when I clicked “Submit” the Comment/Question was spinning out and I saw a “Waiting on local.mysite…” in the bottom of my browser.
Things failed several times, and then after supper, thing started working.
Not sure what that was all about.
Anyway, I think I have my first ever use of phpMailer working finally.
Not sure how much better it is than just mail( ), but they say it is?!
Here is one other crucial thing I had to do to make phpMailer work across my client’s site…
Since several different scripts - located in several different part of my directory-tree - INCLUDE “functions.php”, the solution I showed above only works if the parent script is in the Web Root.
To fix this, I created a constant called “HOME” like this…