Jump to content
  • 0
MDHMatt

error after applying payment

Question

im getting the attached error message when i applied a payment to a client. The amount has been credited to the invoice etc when i look at it after just not sure what's the problem?

Untitled.png

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0
22 hours ago, Paul said:

Was the email sent? Did you make any changes to the email template recently? If you made changes to the template and are using undefined tags, or have entered them incorrectly, it can produce an error.

Ive not changed the email templates they are the stock installs. Ive had issues since upgrading to 4.2.2 and php 7.1 :(

Ive watched the logs and it dosen't show any errors when running which is making me assume its sent them. I see no errors in the mail logs either. I did clear out the cron logs in the database and forced a cron run and got this;

Attempting to run all tasks for MDHosting.
Attempting to apply credits to open invoices.
There are no invoices to which credits may be applied.
The apply credits task has completed.
Attempting to deliver invoices scheduled for delivery.
Error: tempnam(): file created in the system's temporary directory #0 [internal function]: UnknownException::setErrorHandler(8, 'tempnam(): file...', '/home/****/...', 179, Array) #1 /home/*/*/billing/vendors/monolog/monolog/src/Monolog/ErrorHandler.php(164): call_user_func(Array, 8, 'tempnam(): file...', '/home/*****/...', 179, Array) #2 [internal function]: Monolog\ErrorHandler->handleError(8, 'tempnam(): file...', '/home/*/...', 179, Array) #3 /home/*/*/billing/vendors/h2o/h2o/loaders.php(179): tempnam('18188455885ad5e...', '') #4 /home/*/*/billing/vendors/h2o/h2o/loaders.php(166): H2o_File_Cache->__construct(Array) #5 /home/*/*/billing/vendors/h2o/h2o/loaders.php(38): h2o_cache(Array) #6 /home/*/*/billing/vendors/h2o/h2o/loaders.php(33): H2o_File_Loader->setOptions(Array) #7 /home/***/*/billing/vendors/h2o/h2o.php(75): H2o_File_Loader->__construct(Array, Array) #8 /home/*/*/billing/app/models/emails.php(902): H2o->__construct() #9 /home/*/*/billing/app/models/emails.php(567): Emails->buildEmail('invoice_deliver...', '1', 'en_uk', Array) #10 /home/*/*/billing/components/invoice_delivery/invoice_delivery.php(162): Emails->send('invoice_deliver...', '1', 'en_uk', 'karenharrison12...', Array, NULL, NULL, Array, Array) #11 /home/****/*/billing/app/controllers/cron.php(1649): InvoiceDelivery->deliverInvoices(Array, 'email', 'karenharrison12...', NULL, Array) #12 /home/*****/*/billing/app/controllers/cron.php(1420): Cron->sendInvoices(Array, Object(stdClass), 'email', 'paid') #13 /home/*/*/billing/app/controllers/cron.php(175): Cron->deliverInvoices('54b100e4c6c54b3...') #14 /home/*/*/billing/app/controllers/cron.php(127): Cron->all('54b100e4c6c54b3...') #15 /home/*/*/billing/vendors/minphp/bridge/src/Lib/Dispatcher.php(143): Cron->index() #16 /home/*/*/billing/index.php(21): Dispatcher::dispatch('/billing/cron/?...') #17 {main}Attempting to provision paid pending services.
The paid pending services task has completed.
Attempting to unsuspend paid suspended services.
The unsuspend services task has completed.
Attempting to cancel scheduled services.
The cancel scheduled services task has completed.
Attempting to process service changes.
The process service changes task has completed.
Attempting to process renewing services.
Renewed service #6 for client 1505.
Renewed service #9 for client 1502.
The process renewing services task has completed.
Attempting to update exchange rates.
Exchange rates were updated successfully.
The exchange rates task has completed.
Attempting plugin cron for order accept_paid_orders.
Finished plugin cron for order accept_paid_orders.
Attempting plugin cron for support_manager poll_tickets.
Finished plugin cron for support_manager poll_tickets.
Attempting plugin cron for support_manager close_tickets.
Finished plugin cron for support_manager close_tickets.
Attempting plugin cron for mass_mailer export.
Finished plugin cron for mass_mailer export.
Attempting plugin cron for mass_mailer mass_mail.
Finished plugin cron for mass_mailer mass_mail.
Attempting to clean up old logs.
0 old Gateway logs have been deleted.
0 old Module logs have been deleted.
The clean logs task has completed.
All tasks have been completed.
Attempting to run all system tasks.
Attempting to validate the license.
The license validation task has completed.
Attempting to backup the database to AmazonS3.
The backup completed successfully.
The AmazonS3 database backup task has completed.
Attempting to backup the database via SFTP.
exec() has been disabled for security reasons
The SFTP database backup task has completed.
All system tasks have been completed.

 

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, MDHMatt said:

Ive not changed the email templates they are the stock installs. Ive had issues since upgrading to 4.2.2 and php 7.1 :(

Ive watched the logs and it dosen't show any errors when running which is making me assume its sent them. I see no errors in the mail logs either. I did clear out the cron logs in the database and forced a cron run and got this;


Attempting to run all tasks for MDHosting.
Attempting to apply credits to open invoices.
There are no invoices to which credits may be applied.
The apply credits task has completed.
Attempting to deliver invoices scheduled for delivery.
Error: tempnam(): file created in the system's temporary directory #0 [internal function]: UnknownException::setErrorHandler(8, 'tempnam(): file...', '/home/****/...', 179, Array) #1 /home/*/*/billing/vendors/monolog/monolog/src/Monolog/ErrorHandler.php(164): call_user_func(Array, 8, 'tempnam(): file...', '/home/*****/...', 179, Array) #2 [internal function]: Monolog\ErrorHandler->handleError(8, 'tempnam(): file...', '/home/*/...', 179, Array) #3 /home/*/*/billing/vendors/h2o/h2o/loaders.php(179): tempnam('18188455885ad5e...', '') #4 /home/*/*/billing/vendors/h2o/h2o/loaders.php(166): H2o_File_Cache->__construct(Array) #5 /home/*/*/billing/vendors/h2o/h2o/loaders.php(38): h2o_cache(Array) #6 /home/*/*/billing/vendors/h2o/h2o/loaders.php(33): H2o_File_Loader->setOptions(Array) #7 /home/***/*/billing/vendors/h2o/h2o.php(75): H2o_File_Loader->__construct(Array, Array) #8 /home/*/*/billing/app/models/emails.php(902): H2o->__construct() #9 /home/*/*/billing/app/models/emails.php(567): Emails->buildEmail('invoice_deliver...', '1', 'en_uk', Array) #10 /home/*/*/billing/components/invoice_delivery/invoice_delivery.php(162): Emails->send('invoice_deliver...', '1', 'en_uk', 'karenharrison12...', Array, NULL, NULL, Array, Array) #11 /home/****/*/billing/app/controllers/cron.php(1649): InvoiceDelivery->deliverInvoices(Array, 'email', 'karenharrison12...', NULL, Array) #12 /home/*****/*/billing/app/controllers/cron.php(1420): Cron->sendInvoices(Array, Object(stdClass), 'email', 'paid') #13 /home/*/*/billing/app/controllers/cron.php(175): Cron->deliverInvoices('54b100e4c6c54b3...') #14 /home/*/*/billing/app/controllers/cron.php(127): Cron->all('54b100e4c6c54b3...') #15 /home/*/*/billing/vendors/minphp/bridge/src/Lib/Dispatcher.php(143): Cron->index() #16 /home/*/*/billing/index.php(21): Dispatcher::dispatch('/billing/cron/?...') #17 {main}Attempting to provision paid pending services.
The paid pending services task has completed.
Attempting to unsuspend paid suspended services.
The unsuspend services task has completed.
Attempting to cancel scheduled services.
The cancel scheduled services task has completed.
Attempting to process service changes.
The process service changes task has completed.
Attempting to process renewing services.
Renewed service #6 for client 1505.
Renewed service #9 for client 1502.
The process renewing services task has completed.
Attempting to update exchange rates.
Exchange rates were updated successfully.
The exchange rates task has completed.
Attempting plugin cron for order accept_paid_orders.
Finished plugin cron for order accept_paid_orders.
Attempting plugin cron for support_manager poll_tickets.
Finished plugin cron for support_manager poll_tickets.
Attempting plugin cron for support_manager close_tickets.
Finished plugin cron for support_manager close_tickets.
Attempting plugin cron for mass_mailer export.
Finished plugin cron for mass_mailer export.
Attempting plugin cron for mass_mailer mass_mail.
Finished plugin cron for mass_mailer mass_mail.
Attempting to clean up old logs.
0 old Gateway logs have been deleted.
0 old Module logs have been deleted.
The clean logs task has completed.
All tasks have been completed.
Attempting to run all system tasks.
Attempting to validate the license.
The license validation task has completed.
Attempting to backup the database to AmazonS3.
The backup completed successfully.
The AmazonS3 database backup task has completed.
Attempting to backup the database via SFTP.
exec() has been disabled for security reasons
The SFTP database backup task has completed.
All system tasks have been completed.

 

are you on shared hosting? because it appears some php functions required by blesta aka exec(),etc has been disabled on that shared hosting server, which would explain why you are having issues.

Share this post


Link to post
Share on other sites
  • 0
5 hours ago, timnboys said:

are you on shared hosting? because it appears some php functions required by blesta aka exec(),etc has been disabled on that shared hosting server, which would explain why you are having issues.

Nope its on my own dedicated system with cpanel licence. Ive just been playing about with phpmyadmin looking for instances of the invoice for the named details above. Turns out the cron job is trying to send a invoice that id set not to send and was closed off ages ago. Looking in the database the invoice sent date was Null, modified it to the day after generated and cleared the cron logs. re ran cron and all is clear?

Should invoices sent to do not send be tying to send??
 

@Paul is there a way to clear the cron logs database after x time? mine had got over 30mb and over 1000 pages! surely cron logs from 6 month ago are not relevent anymore

Share this post


Link to post
Share on other sites
  • 0
18 minutes ago, MDHMatt said:

Nope its on my own dedicated system with cpanel licence. Ive just been playing about with phpmyadmin looking for instances of the invoice for the named details above. Turns out the cron job is trying to send a invoice that id set not to send and was closed off ages ago. Looking in the database the invoice sent date was Null, modified it to the day after generated and cleared the cron logs. re ran cron and all is clear?

Should invoices sent to do not send be tying to send??
 

@Paul is there a way to clear the cron logs database after x time? mine had got over 30mb and over 1000 pages! surely cron logs from 6 month ago are not relevent anymore

The cron log is rotated out automatically. Check your rotation policy at Settings > System > Basic Setup. Also check that the automation task "Clean up Logs" is scheduled to run under Settings > Company > Automation.

Since the cron runs every 5 minutes, and there are many tasks to process, it's normal for there to be a lot of records. Just don't arbitrarily delete things, the system relies on the existence of certain logs in the way it schedules/processes things, and manually deleting things can cause things to run in-duplicate.

Share this post


Link to post
Share on other sites
  • 0

@Paul @timnboys so ive tried sending an invoice today and im still getting the same error. its failing when trying to send the invoices, i have a feeling that its something to do with where its saving the temp file. I have the blesta temp dir set to /home/username/billing/tmp and is fully writable but it seems to be failing and trying to write to the system /tmp which looking at the docs is what its meant to do.

The invoice is created fine its just struggling to send them??? 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×