Topic: 404 error for pdf reports after upgrade

I've updated from 2.3.11 to 2.3.13 by overwriting the FA directory with the new files, leaving untouched any that were not updated.  Have renamed config.default.php to replace the old config.php.

Printer / PDF reports now give me a 404 error with this narrative:
The requested URL /company/0/pdf_files/50b8b67ed4b07.pdf was not found on this server.

I've tried restoring the old release, but this doesn't fix it.  Have checked permissions of /pdf_files: 777.

What have I lost or broken and how do repair it?  Many thanks.

Re: 404 error for pdf reports after upgrade

Folder Write permission for web server user is needed.

Re: 404 error for pdf reports after upgrade

I've come back to this: no joy.

- Removed all application files except config.php and replaced with 2.3.13.  No improvement; indeed was unable to stay logged in in this version (a separate issue, no doubt)
- Removed all application files and replaced with a backup of 2.3.11.  Same error on printing.

I've checked file write permissions over and over and tested with new users, different browsers etc.  My hosting service has also looked it over.  There is no php.ini interfering with things.

Overall, it looks like the system is trying to read a file in ../company/0/pdf_files that it hasn't created.  There is no record of the file ever having existed.  No PHP errors are logged.

I've spent about 2 days poring over various bits of the reporting module, logs, file system etc and can't make any progress.  Without reports, the system is no use to me.  Do I need to get a clean copy of 2.3.11 and install that?

Or is there a setting in a config or include file that might fix this?

Thanks.

4 (edited by apmuthu 01/09/2013 07:33:58 pm)

Re: 404 error for pdf reports after upgrade

config.default.php is only a template file and not used. Copy it over as config.php

It is best you use the given installer rather than merely populating the config.php as the file paths and extra installed_extensions / installed_languages files get created automatically.

Also try the latest edition - v2.3.13 Mercurial Build 3131 listed in the announcement forum post.

Re: 404 error for pdf reports after upgrade

Thanks apmuthu.  Do you mean, call ../install/index.php, as for a fresh installation?  This is not what the documentation tells you to do when updating.  What will this do to the existing database?

6 (edited by apmuthu 01/10/2013 09:31:42 pm)

Re: 404 error for pdf reports after upgrade

You can do a full install of the new version in a separate database and migrate the data - quite messy if the table structures have changed.

In your current state, take a backup of your database. Then:
You can simply login and proceed to Setup -> software upgrade and upgrade the database if needed.

Refer the Wiki for the upgrade path - you will need to manually make changes to the existing config.php to accommodate the new variables (after comparing with the new config.default.php) and make the version number 2.3.13 in it - FA Update Wiki Page

Re: 404 error for pdf reports after upgrade

An upgrade didn't work, nor did restoring an old backup I thought should have fixed it.  This is getting seriously frustrating.  I have done a fresh install as follows:

1. Delete the whole FA directory
2. Upload 2.3.13 Mercurial version
3. Create a new database
4. Run install wizard, installing sample COA but no data

Running a report (list COA) fails with the same error - pdf file not found.

/tmp/error.log is showing me this:
[14-Jan-2013 10:51:53 UTC] 0:admin:JsHttpRequest.php:470: mb_convert_encoding() [<a href='function.mb-convert-encoding'>function.mb-convert-encoding</a>]: Illegal character encoding specified

Is this related / does it point to the problem?  What can be causing a completely fresh installation to fail?

Re: 404 error for pdf reports after upgrade

Hope you have a pre-upgrade db backup and the original config.php file with you.
Expect it is a linux install.
Did you have any extensions installed?
What languages / locales are you using?
Have you tried one of the current mercurial builds available - like the one here?

PM me access details of server or VNC while you watch.

Re: 404 error for pdf reports after upgrade

Thanks for your continuing help.

I've tried the Mercurial build.  Have now restored the pre-upgrade v2.3.11 and db.  Currently no php.ini since some settings there clearly interfere with sessions.  Would it help if I email you the phpinfo() report?

This is on a Cloud server, so I have no access to the  linux installation - other than my part of it in a chroot environment.  However, if you can point me to a setting / problem, I can get it addressed.

Language: English.  Extensions: Annual balance breakdown report, annual expense breakdown report, report generator.  They are all dispensible.

Re: 404 error for pdf reports after upgrade

1. Backup v2.3.11 - SQL, config_db.php, config.php, installed_extensions.php lang/linstalled_languages.inc
2. Uninstall all extensions.
3. Backup SQL again along with the said files
4. rename the frontaccounting folder.
5. extract latest mercurial build onto new frontaccounting folder
6. install FA to another dummy db.
7. compare the saved files (config_db.php, config.php, installed_extensions.php lang/linstalled_languages.inc) with the currently installed ones and make changes to use the old db.
8. Login to the 0 company and go to Setup -> Software Upgrade and force an upgrade.

Post your php.ini file along with the output of:
uname -a
php -m

Better still, VNC your desktop which can be chrooted into your cloud server.

Report Generator extension is broken / unsafe for FA v2.3.13+

Re: 404 error for pdf reports after upgrade

Have done all this.  No change, unfortunately.  Note that 'software upgrade' seems to do nothing.  'Force software upgrade' strips all data out of the sys_prefs table and er.. messes things up.

Will PM you php.ini and result of php -m.  My jailed chroot doesn't permit uname -a

With v2.3.13 I'm now seeing this error on logging in, which clears on page refresh.  No idea what this is about....
"Moved Temporarily
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, you@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log."

Re: 404 error for pdf reports after upgrade

FA 2.3.19. PHP5.4; Same error occurred after server crash and host restored.

Cannot get PDF to display. Urgent fix needed.

Regards

Wynand

Re: 404 error for pdf reports after upgrade

PHP 5.4 may have issues as FA v2.3.x is tested for a max PHP version of 5.3.x.
Also your db schema may have to be compared with the latest ones for anomalies.

Try a new install with noting from your backups and see if PDF works. Then migrate your data step by step.

Re: 404 error for pdf reports after upgrade

Can anyone tell me if they resolved this?

apmuthu I would be happy to give you my server login details if you think you can figure this out. Same error, all acceptable version numbers. Was working for 3 months since this happened the last time and I cannot get it resolved. Have posted in reporting and bugs forum with 0 replies. Server tech support cannot find any incorrect configuration on my server, but the exact same zip file extracted to a free server on 000webhost works and on my paid server doesn't. Even after fresh install. There must be something not clearing from a cache is all I can figure but I have done it locally and on server I have deleted the ENTIRE directory, waited overnight, then reinstalled. This is a very weird problem and I don't have the knowledge to solve it myself. Looking for anyone's help. Please.

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

Re: 404 error for pdf reports after upgrade

You might be missing the font files....