ImageTakers Posted February 2, 2007 Share Posted February 2, 2007 I had this working in PHP4.3 with register_globals on and safe_mode off. I've got it working on my test server running windows and PHP5.2 with register_globals off and safe_mode on. I've had a few problems getting my live site to work with the default security settings of the later version of PHP, but finally I've got everything working except the above contribution. When I click on the little pdf symbol I get the following error: Warning: getimagesize() [function.getimagesize]: Read error! in /home/www/pdf/pdf_datasheet_functions.php on line 384 Warning: getimagesize() [function.getimagesize]: Read error! in /home/www/pdf/pdf_datasheet_functions.php on line 209 FPDF error: Image file has no extension and no type was specified: images/ And the plot thickens. The above error is valid for Firefox only. in IE and Opera I get an extra error after the previous two, thus: Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0 So working on the assumption that this contrib is relying on register_globals providing the necessary data for pdf_datasheet_functions.php to work I changed pdf_datasheet.php to look like this: require('includes/application_top.php'); $products_id = (isset($_GET['products_id']) ? $_GET['products_id'] : ''); if (tep_not_null($products_id)) { require('pdf/pdf_datasheet_functions.php'); } Hey presto. It works a treat in Firefox and Opera, but I'm getting a blank page in IE7 with an 'Object expected' error: I'm sure I'm missing something obvious and that this is purely IE based, but I'm quite drained now after burning the midnight oil getting the rest of the site working, so has anyone got any ideas about what might be causing this please? Quote Link to comment Share on other sites More sharing options...
TheExterminator Posted February 23, 2007 Share Posted February 23, 2007 I get this error: Warning: Division by zero in /www/the-exterminator.dk/pdf/pdf_datasheet_functions.php on line 274 Warning: Division by zero in /www/the-exterminator.dk/pdf/pdf_datasheet_functions.php on line 278 FPDF error: Some data has already been output, can't send PDF file line 274 : $factor = $heightwidth[0]/$heightwidth[1]; line 278 : $data_array[1]=$data_array[0]/$factor; You can se it here on the demoshop : www.the-exterminator.dk Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.