Topic: Reports/Invoices generating 404 errors

I don't believe we have changed any settings on our web server in several months but for the past 24 hours I have not been able to generate any reports or print any invoices no matter what I try or which module I am in. It doesn't work with pdf nor with excel. I have been trying to check logs/diagnostics but haven't figured out what some errors mean.

The system diagnostics in my frontaccounting system reads OK for every item in the list. I have php 5.2.17, mysql 5.5.11 and have tried accessing from IE and Chrome on windows 7. Every report shows up with Object Not Found 404 error.

My web server error log reports only this: "[10-Apr-2014 12:37:17] 0:admin:remote_url.inc:48: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to repo.frontaccounting.eu:80 (Permission denied)"

I don't know what permission I could have changed. Where can I fix this? Am I overlooking something simple? Please help.

Re: Reports/Invoices generating 404 errors

Some more information:

After digging deeper I found that our server host added some features after recent attacks. In the process the IP 91.227.122.4 was blocked as an outgoing connection. After further investigation I discovered that was in fact the server I needed to access causing the original error and was why themes/languages etc would not work either recently.

Before discovering this however, I backed up my database and installed a fresh copy of FA to my subdomain. After all that my reports still will not work. I now get an entirely unrelated (I think) error in my log. The errors alternate between the two below:

[11-Apr-2014 03:31:47 UTC] 0:admin:JsHttpRequest.php:470: mb_convert_encoding(): Illegal character encoding specified
[11-Apr-2014 03:31:53 UTC] 0:admin:prn_redirect.php:40: file_get_contents(../company/0/pdf_files/53476225283fe.xls): failed to open stream: No such file or directory

I am almost certain this is a permissions issue now but can't seem to find what I have set wrong. I understand programming but almost never work with apache or php so I don't know where to go from here. I'd be happy to try anyone's advice. I've got a recent backup of everything so the worst case is I end up right where I am now. Thanks.

Re: Reports/Invoices generating 404 errors

Do any of the admins have a suggestion of something I can look at to resolve this? It's been several days I've tried troubleshooting on my own and I haven't found out what is causing this problem. I have no reports working whatsoever but every other piece of this software is acting normal.

Is there a way to debug this and check if the report file is actually ever being written or if it is disappearing before the next command where it opens the pop-up and looks for the report? Can someone explain to me any differences the software takes between writing a pdf and reporting in excel? Both types of reports are resulting in nothing (excel opens a blank file, pdf says 404 error). If I could understand what is common between the two then I can look more specifically at that section.

Current diagnostics:
MySQL version >=4.1    Required    5.5.11    Ok
PHP version >=4.3.3    Required    5.2.17    Ok
Http server type    Info    Apache mod_fcgid/2.3.7 mod_auth_pgsql/2.0.3    Ok

I'd appreciate anyone's advice. Thank you.
FrontAccounting 2.3.20 fresh installation.

Re: Reports/Invoices generating 404 errors

Need to bump this again. Any admin support would be greatly appreciated. I got the error above fixed by manually deleting the entire install and then re-installing and copying back my backups of language files and then reconfiguring the config files manually. Then repeating it a second time as the first re-install had the same issue.

Here is the bigger problem, every single file on the server after the reinstall has the same modified date as the broken setup except the files in the js_cache folder. I assume this must have something to do with the problem but I cannot figure anything further out. I've deleted those files manually the past 2 days to see if it could reset my setup to no avail. I had this working for exactly 3 months and now the error is back, the exact same problem and I have confirmed with the webhost that no server side changes have been made in the last 3 months. I can't delete and reinstall the entire package every 3 months on the hopes that that fixes it. Has no one else experienced this issue? Does anyone have something I can try so that I don't have to take this software off the server and reinstall the same version tomorrow?

Re: Reports/Invoices generating 404 errors

The report files are written under unique (like e.g. 53c6da659ad34.pdf) name in company/*/pdf_files folder.
If this is not the case you probably have broken permittions on this folder. This location should be writable for www sever.
You can also have some paranoid setting for openbasedir parameter in php.ini.
Janusz