By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,586 Members | 992 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,586 IT Pros & Developers. It's quick & easy.

I can't understand or fix this problem

P: 7
Warning: getimagesize(images/logo.jpeg) [function.getimagesize]: failed to open stream: No such file or directory in /home/s001898/public_html/loja/admin/fpdf/fpdf.php on line 1213
FPDF error: Missing or incorrect image file: images/logo.jpeg


Expand|Select|Wrap|Line Numbers
  1. function _parsejpg($file)
  2. {
  3.     // Extract info from a JPEG file
  4.     $a = getimagesize($file);
  5.     if(!$a)
  6.         $this->Error('Missing or incorrect image file: '.$file);
  7.     if($a[2]!=2)
  8.         $this->Error('Not a JPEG file: '.$file);
  9.     if(!isset($a['channels']) || $a['channels']==3)
  10.         $colspace = 'DeviceRGB';
  11.     elseif($a['channels']==4)
  12.         $colspace = 'DeviceCMYK';
  13.     else
  14.         $colspace = 'DeviceGray';
  15.     $bpc = isset($a['bits']) ? $a['bits'] : 8;
  16.     $data = file_get_contents($file);
  17.     return array('w'=>$a[0], 'h'=>$a[1], 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'DCTDecode', 'data'=>$data);
  18. }
  19.  
Apr 18 '12 #1

✓ answered by johny10151981

thats what i said about .....

Share this Question
Share on Google+
6 Replies


100+
P: 1,059
try sending absolute path
Apr 18 '12 #2

P: 7
Sorry didnt understand your answer.
Apr 18 '12 #3

100+
P: 1,059
say your index.php is in
/var/www/whatever/index.php

your image file is in
/var/www/whatever/images/logo.jpeg

you are sending to FPDF images/logo.jpeg
instead send /var/www/whatever/images/logo.jpeg

also make sure the extension is correct and its an actual jpeg file
Apr 19 '12 #4

P: 7
this is the DB line:
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES
('', 'Invoice Print Shop Logo on Invoice', 'PDF_INV_SHOW_LOGO', 'true', 'Should the Sop Logo be printed on the Invoice ? False = No, True = Yes', 7200, 1, NULL, now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'), ') ,
('', 'Invoice location of the shop logo', 'PDF_INV_STORE_LOGO', 'images/oscommerce.jpeg','Give the location of the ShopeLogo', 7200, 2, NULL, now(), NULL, NULL),

should i change the location line in bold?
Apr 19 '12 #5

100+
P: 1,059
thats what i said about .....
Apr 19 '12 #6

P: 7
Should i emty the line in bold?or give another place?
Apr 19 '12 #7

Post your reply

Sign in to post your reply or Sign up for a free account.