473,387 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

I can't understand or fix this problem

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 .....

6 4552
johny10151981
1,059 1GB
try sending absolute path
Apr 18 '12 #2
Sorry didnt understand your answer.
Apr 18 '12 #3
johny10151981
1,059 1GB
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
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
johny10151981
1,059 1GB
thats what i said about .....
Apr 19 '12 #6
Should i emty the line in bold?or give another place?
Apr 19 '12 #7

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

Similar topics

2
by: SAN CAZIANO | last post by:
can you help me please because I can't understand why the code doesn't seems to function very well: in onkeypress it must verify if insert number or string value in the fiels, but it doesn't...
3
by: siliconmike | last post by:
I've scoured over manual page for flock on http://in2.php.net/flock but I can't understand a few things: 1. will flock wait until a different process releases the lock ? 2. please clarify this...
10
by: forgotten field | last post by:
Hi,how are you? I have been studying C++ by myself, but recently I am having a real problem. I am learning about the basic usage of a doubly linked list using polymorphism. However, I have got the...
2
by: Carlos Martinez Garcia | last post by:
Hi all: I have a problem compiling a file and I can't understand why. Here is my code: class Base { public: virtual void foo()=0; virtual void foo(int i) {
6
by: Bilbo | last post by:
Hi, I am a long time matlab user, now I am learning C but canīt understand the following: 1)If I define a variable, without giveing a value to it, the compiler gives any value to it. 2) when I...
2
by: DC | last post by:
Hi, I need to asynchronously read from a network (TCP) stream, and I am having trouble with retrieving whole blocks; I get a break in the data block every 1460 bytes which relates to network...
5
by: Frederick Dean | last post by:
Hi,guys! I'm reading Stephen Dewhurst's book "C++ Gotchas"ĢŽin gothca #7, I meet a weird case: bool Postorder::next() { switch (pc) case START: while (true) if (!child()) { pc = LEAF; return...
4
by: chris | last post by:
can anybody have some ideas?
4
by: saunakinju | last post by:
I can't Understand that if i add menu in my VB.Net Application with the use of Javascript,thn how can i open a perticular form on click of submenu item of that menu.Because menu will be appear when i...
4
by: hirsh.dan | last post by:
i have a functions that writes information to a file. inside that function i have a line in which i call another function. if this line is executed, nothing is written to the file, but if i remark...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.