You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: require(/PHPMailer/src/Exception.php): Failed to open stream: No such file or directory in /Library/WebServer/Documents/sites/cognitorum/sendPHPMailer.php on line 7 — [in fact, there is one for Exeption.php]
Fatal error: Uncaught Error: Failed opening required '/PHPMailer/src/Exception.php' (include_path='.:/opt/homebrew/Cellar/php/8.2.3/share/php/pear') — [the path is correct, although in fact it starts from '/'] — in /Library/WebServer/Documents/sites/cognitorum/sendPHPMailer.php:7 Stack trace: #0 {main} thrown in /Library/WebServer/Documents/sites/cognitorum/sendPHPMailer.php on line 7
Code to reproduce
// Load PHPMailer
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
You're using absolute paths when they should be relative. Try removing the leading / from them to start with. This would also be a good time to learn how to use composer.
Problem description
My comments in [].
Warning: require(/PHPMailer/src/Exception.php): Failed to open stream: No such file or directory in /Library/WebServer/Documents/sites/cognitorum/sendPHPMailer.php on line 7 — [in fact, there is one for Exeption.php]
Fatal error: Uncaught Error: Failed opening required '/PHPMailer/src/Exception.php' (include_path='.:/opt/homebrew/Cellar/php/8.2.3/share/php/pear') — [the path is correct, although in fact it starts from '/'] — in /Library/WebServer/Documents/sites/cognitorum/sendPHPMailer.php:7 Stack trace: #0 {main} thrown in /Library/WebServer/Documents/sites/cognitorum/sendPHPMailer.php on line 7
Code to reproduce
// Load PHPMailer
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require '/PHPMailer/src/Exception.php';
require '/PHPMailer/src/PHPMailer.php';
require '/PHPMailer/src/SMTP.php';
Debug output
The text was updated successfully, but these errors were encountered: