Page 1 of 1

nurunpdf.php not found

Posted: Fri Feb 03, 2023 12:50 am
by treed
Running php8 and trying to use nuRunReportSave with this line of javascript.

Code: Select all

nuRunReportSave('InvoiceRpt');

Nothing happens on screen and no errors in console however the apache log shows.
[Thu Feb 02 15:34:31.181674 2023] [proxy_fcgi:error] [pid 21978] [client 192.52.251.253:58852] AH01071: Got error 'PHP message: PHP Warning: unlink(): No such file or directory in /var/www/html/db/core/nurunpdf.php on line 1172', referer: https://dbs.winecountry-bbq.com/index.php

nurunpdf.php exists in that location. Any ideas?

Re: nurunpdf.php not found

Posted: Fri Feb 03, 2023 6:40 pm
by kev1n
nuRunReportSave() simply saves a pdf to the temp directory. Do you see it there?

Re: nurunpdf.php not found

Posted: Fri Feb 03, 2023 7:18 pm
by treed
No, I don't have the entry in temp_pdf either. What I'm reading is that unlink() is very picky about paths and does not like relative paths. The path is good because.

Code: Select all

wcbbq-cloud@wcbbq2:~$ dir /var/www/html/db/core/nurunpdf.php
/var/www/html/db/core/nurunpdf.php
This is possibly a php8 thing because this code did work before I upgraded.
https://stackoverflow.com/questions/430 ... -directory

Re: nurunpdf.php not found

Posted: Fri Feb 03, 2023 7:37 pm
by kev1n
I tested with both Linux and Windows and both times the file is generated and saved in nuBuilder's \temp directory

- Apache/2.4.54 (Debian), PHP version: 8.2.2
- Apache/2.4.51 (Win64), PHP version: 8.1.0

Re: nurunpdf.php not found

Posted: Fri Feb 03, 2023 7:46 pm
by kev1n
If the file is not even saved in the Temp directory, there is obviously another problem.

Add

Code: Select all

nuDebug($path);
After the line $path = realpath($dir); in nurunpdf.php and check the debug results to inspect where the file is saved to.

Re: nurunpdf.php not found

Posted: Fri Feb 03, 2023 8:02 pm
by treed
Ah, that flushed up that it was a permissions error. Issue resolved. Thank you!