Hello, I am attempting to send an email via a cron job via the nucall_ext.php utility. The procedure I'm calling works fine inside of nuBuilder, however when called externally with
$ php -f /var/www/html/db/core/nucall_ext.php wcSendInvEmail acl_cron_job
I get this error
PHP Warning: require(./libs/phpmailer/PHPMailer.php): Failed to open stream: No such file or directory in /var/www/html/db/core/nuemailer.php on line 7
PHP Fatal error: Uncaught Error: Failed opening required './libs/phpmailer/PHPMailer.php' (include_path='.:/usr/share/php') in /var/www/html/db/core/nuemailer.php:7
Stack trace:
#0 /var/www/html/db/core/nucommon.php(7): require_once()
#1 /var/www/html/db/core/nucall_ext.php(3): require_once('...')
#2 {main}
thrown in /var/www/html/db/core/nuemailer.php on line 7
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Error using nucall_ext.php Topic is solved
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Error using nucall_ext.php
Try adding
after
in nucall_ext.php
Code: Select all
require_once ('nuemailer.php');
Code: Select all
require_once ('nucommon.php');
Re: Error using nucall_ext.php
Same message:
PHP Warning: require(./libs/phpmailer/PHPMailer.php): Failed to open stream: No such file or directory in /var/www/html/db/core/nuemailer.php on line 7
PHP Fatal error: Uncaught Error: Failed opening required './libs/phpmailer/PHPMailer.php' (include_path='.:/usr/share/php') in /var/www/html/db/core/nuemailer.php:7
Stack trace:
#0 /var/www/html/db/core/nucommon.php(7): require_once()
#1 /var/www/html/db/core/nucall_ext.php(3): require_once('...')
#2 {main}
thrown in /var/www/html/db/core/nuemailer.php on line 7
PHP Warning: require(./libs/phpmailer/PHPMailer.php): Failed to open stream: No such file or directory in /var/www/html/db/core/nuemailer.php on line 7
PHP Fatal error: Uncaught Error: Failed opening required './libs/phpmailer/PHPMailer.php' (include_path='.:/usr/share/php') in /var/www/html/db/core/nuemailer.php:7
Stack trace:
#0 /var/www/html/db/core/nucommon.php(7): require_once()
#1 /var/www/html/db/core/nucall_ext.php(3): require_once('...')
#2 {main}
thrown in /var/www/html/db/core/nuemailer.php on line 7
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Error using nucall_ext.php
The cron job runs fine here with this config.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Error using nucall_ext.php
Also try replacing these lines in nuemailer.php
with
Code: Select all
require './libs/phpmailer/PHPMailer.php';
require './libs/phpmailer/Exception.php';
require './libs/phpmailer/SMTP.php';
Code: Select all
require __DIR__ . '/libs/phpmailer/PHPMailer.php';
require __DIR__ . '/libs/phpmailer/Exception.php';
require __DIR__ . '/libs/phpmailer/SMTP.php';
Re: Error using nucall_ext.php
Great, testing via browser got me the messages needed to resolve the issues with the command line and it now works. For those using Linux, the wget command is what's needed. I was not able to get wget to work due to Error:400. Switched to curl and added double quotes and it works!
curl "https://dbs.winecountry-bbq.com/core/nu ... l_cron_job"
curl "https://dbs.winecountry-bbq.com/core/nu ... l_cron_job"
Re: Error using nucall_ext.php
On word of caution, don't pass any null parameters to nusendmail. Empty strings are fine.
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact: