View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001067 | Main CAcert Website | misc | public | 2012-06-02 12:25 | 2013-07-16 17:14 |
Reporter | JonathanL | Assigned To | |||
Priority | low | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | Default | OS | any | OS Version | any |
Summary | 0001067: White screen error during forms generation with partially installed system (test jig setup, fix attached) | ||||
Description | If for any reason you don't have FPDF installed (for making PDF files) and you try to make a CAP form, you get white screen instead of correct error message. | ||||
Steps To Reproduce | Remove (or omit) the files /usr/share/fpdf/ and /usr/share/ufpdf/ Click on "CAP Forms" and then any form eg A4 WoT Form Blank page results. Correct behaviour would be an error message In a fully installed system, you get Save/View incoming PDF, per browser choice. | ||||
Additional Information | I'm documenting bugs which stop you setting up a test jig. The log should help you find the correct solution, which is to install the appropriate FPDF variants At least for test purposes you can do sudo apt-get install php-fpdf cd /usr/share/ sudo ln -s fpdf ufpdf Proper installation requires something like these wget http://acko.net/files/ufpdf/ufpdf.zip wget http://www.fpdf.org/download/japanese.zip | ||||
Tags | No tags attached. | ||||
Attached Files | cap.php.PATCH (1,005 bytes)
diff --git a/www/cap.php b/www/cap.php index 73380e1..573968f 100644 --- a/www/cap.php +++ b/www/cap.php @@ -15,14 +15,29 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + function existsordie($path) { + if (file_exists($path)) { + return; + } + trigger_error("required file missing ($path)", E_USER_WARNING); + include("../includes/account.php"); + showheader(_("CAcert.org Error")); + printf(_("Sorry, forms generation is temporarily unavailable")); + showfooter(); + exit; + } + if($_SESSION['_config']['language'] != "ja") { define('FPDF_FONTPATH','/usr/share/fpdf/font/'); + existsordie(FPDF_FONTPATH); + existsordie('/usr/share/ufpdf/fpdf.php'); require_once('/usr/share/ufpdf/fpdf.php'); class PDF2 extends FPDF { } } else { + existsordie('/usr/share/fpdf/japanese.php'); require('/usr/share/fpdf/japanese.php'); class PDF2 extends PDF_Japanese { | ||||
Reviewed by | |||||
Test Instructions | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2012-06-02 12:25 | JonathanL | New Issue | |
2012-06-02 12:25 | JonathanL | File Added: cap.php.PATCH | |
2012-06-02 12:29 | JonathanL | Additional Information Updated | |
2012-12-23 10:07 | Werner Dworak | Relationship added | related to 0001097 |
2013-05-01 09:23 | INOPIAE | Relationship added | related to 0000883 |
2013-07-16 17:14 | NEOatNHNG | Project | bugs.cacert.org => Main CAcert Website |