Author Topic: Help with auto invoice generator - 'unlink' message during PDF generation  (Read 614 times)

Offline theitd

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Hi,

I'm running a CRON script to generate invoices on the first day of each month - and I receive the following error when the address is cURL'd from a bash script.

An error has occurred in nBill (front end)! Details of the error are given below:

Billing Version:
Service Pack:
Domain: http://www.theitd.com
Date/Time: 01-Mar-2012 09:03:08 am
IP Address: 176.9.118.173
Page: http://www.theitd.com/index2.php?option=com_nbill&action=cron_entry&Itemid=999999999&cron_file=inv_cron_auto_invoice_generator.php
Referrer:
Error Log ID: 39
Error Message: unlink(/var/www/theitd2/administrator/components/com_nbill/pdfwriter/cache/3ca87669e165b954281f590f65e3cdc3): No such file or directory
File Name: /var/www/theitd2/administrator/components/com_nbill/pdfwriter/image.class.php
Line Number: 170
PHP Version (and OS): 5.3.3-7+squeeze8 (Linux)
CMS: Joomla!
CMS Version: 1.5.x


nBill version: 2.3.0
Joomla: 1.5.25

The permissions on the cache directory are 777.
The PDF gets generated successfully and attached to the email - which is also sent successfully.
So there appears to be no problem with the process - except this error message.

Does anyone know why the unlink fails? Or should I just ignore this message?
Any help would be appreciated.

Offline netshine

  • Administrator
  • Hero Member
  • *****
  • Posts: 4,955
    • View Profile
I didn't write the pdf generation script, so I am not especially familiar with its workings, but unlink just means 'delete', so it is trying to delete a file that has already been deleted. As such, it is not a critical problem and can be safely ignored. However, I checked the code, and there is already an '@' prefix on that line, which tells PHP to ignore any errors - I think I added this quite some time ago to prevent the error message you are getting, so I guess you have an old version of the PHP generator. I suggest you grab the latest version (http://www.nbill.co.uk/component/option,com_docman/Itemid,10/task,cat_view/gid,15/) which should stop the errors being raised.

Offline theitd

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Thanks for getting back to me. You're absolutely right, I was running the old script (I thought I'd checked that  :-\ )
The next run isn't until the beginning of the month, so I'll let you know if I get any problems.

Thanks again.