Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PDF-Catalog Problem


Jenpet

Recommended Posts

after spending a lot of time with it, i am able to create the pdf catalog from the admin. this goes ok, and looks good.

 

but when clicking the link from the store, to watch the catalog, it gives me a blank page with the following error:

 

Fatal error: Cannot redeclare _sess_open() (previously declared in /home/virtual/siteXX/fst/var/www/html/shop/catalog/includes/functions/sessions.php:18) in /home/virtual/siteXX/fst/var/www/html/shop/catalog/includes/functions/sessions.php on line 18

 

where siteXX is my account on the server.

 

and idea what this could be?

 

Ropey

Link to comment
Share on other sites

  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

Fatal error: Cannot redeclare _sess_open() (previously declared in /home/virtual/siteXX/fst/var/www/html/shop/catalog/includes/functions/sessions.php:18) in /home/virtual/siteXX/fst/var/www/html/shop/catalog/includes/functions/sessions.php on line 18

 

where siteXX is my account on the server.

 

and idea what this could be?

 

You are declaring the function _sess_open() twice. This has happened to me when I have accidentally uploaded the actual page file to the language directory instead of the language file of the same name. It's an easy mistake to make if you're not double-checking the directories in your FTP program.

 

This fuction is in includes/functions/sessions.php. Most likely you uploaded the pdf catalog page to the language directory by mistake, and so now when it calls it's language file, it's accidentally calling application_top again and giving you this error. Just re-upload your language file and I'll bet it goes away.

Link to comment
Share on other sites

  • 2 weeks later...

Ok, I have a slightly different issue, but may be along the same lines. I'm using ver 1.4, all .png images and have chmod 777 on all dirs. If I remove the images from the PDF it creates it fine. When I request images on the PDF I get:

Warning: getimagesize(C:/Program Files/Apache Group/Apache2/htdocs/osc/catalog/images/Array) [function.getimagesize]: failed to create stream: Permission denied in C:Program FilesApache GroupApache2htdocsoscadminpdf_catalogue.php on line 379



FPDF error: Image file has no extension and no type was specified: C:/Program Files/Apache Group/Apache2/htdocs/osc/catalog/images/Array

2 things going on here.

 

1. I'm not sure why I'm getting a permission denied on the getimagesize, nor why its trying to create the /Array folder, or what thats all about.

The line it is failing on is:

$heightwidth=getimagesize($data_array[12]);

	 $data_array[0]=$heightwidth[0]*PDF_TO_MM_FACTOR;

     $data_array[1]=$heightwidth[1]*PDF_TO_MM_FACTOR;

I don't want to set a static image size so I do need to generate that.

 

2. I don't know what image file has no extension in the FPDF error

I would appreciate any help anyone has.

Link to comment
Share on other sites

Ok, got part of it. The array was trying to use the variable [12] for the file name, but it should have been [11]. Not sure why that was, but I am still getting an error:

Warning: getimagesize(en) [function.getimagesize]: failed to create stream: No such file or directory in ..adminpdf_catalogue.php on line 379



FPDF error: Image file has no extension and no type was specified: ../catalog/images/Array

Link to comment
Share on other sites

  • 2 months later...

Has anyone found a solution for this same error that sirkyle is getting?

 

Warning: getimagesize(en) [function.getimagesize]: failed to create stream: No such file or directory in ..\admin\pdf_catalogue.php on line 379

 

I would really appreciate some advice!

 

Thanks,

Ryan

Link to comment
Share on other sites

  • 4 weeks later...

Hello,

 

I did some modifications yesterday to the pdf_catalog v1.4 and they can be useful for you.

 

1. In case it gives an error because of an unsupported image file type, this is the code to display an empty frame : change pdf_catalogue.php line 200 (at end of function ShowImage) -> replace the code after the "else" by this :

...

else

{

$pos=strrpos($path,'.');

$type=substr($path,$pos+1);

if($type=='jpg' or $type=='jpeg' or $type=='png')

{

$this->SetLineWidth(1);

$this->Cell($width,$height,"",1,0);

$this->SetLineWidth(0.2);

$this->Image($path,($this->GetX()-$width), $this->GetY(), $width, $height,'',$link);

$this->SetFont('Arial','',8);

}

else

{

$this->SetLineWidth(1);

$this->Cell($width,$height,'No image',1,0,C);

$this->SetLineWidth(0.2);

$this->SetFont('Arial','',8);

}

}

 

I used some code from pdf_datasheet that manage gif files for example !

 

2. If you want to know what file is not supported, change this code in fpdf.php line 923. I added just the filename so you know what is causing trouble. Line must be :

 

$this->Error('Unsupported image file type: ' . $type . '<br>file : ' . $file);

 

3. I didn't like the catalogues being numbered for each language so I changed the language ID by the language code. Change line at the very end of pdf_catalogue.php just before the final echo :

 

$pdf->Output(DIR_FS_CATALOG."catalogues/catalog_".$languages[$i]['code'].".pdf",false);

 

Voil?, hope these small modifications are useful.

 

Didier.

Link to comment
Share on other sites

  • 3 weeks later...

Hello :(

I have install the PDF-Catalog module... and when i entering to:

pdf_catalogue_info.php , i am geting the error:

Warning: filesize(): Stat failed for ./catalogues/catalog_4.pdf (errno=2 - No such file or directory) in /home/httpd/vhosts/domain/httpsdocs/pdf_catalogue_info.php on line 56

and i didn't find the answer for this problem.... how can i please fix it?

Link to comment
Share on other sites

Oooooooopsssssssss !!!!

I'm sorry but it`s work !!

:) :)

but i still have some questions :(

1. how can i "command" the osc that every time that i add a product to the shop the osc will create a new pdf catalog?

2. how can i change the font in the pdf catalog?

3. how can i change the pdf catalog form "left to right" to "right to left"?

 

Please help me ;) :huh: :)

Link to comment
Share on other sites

I have found several references to "SetFont" in pdf/pdf_datasheet_functions.php which is the general file that builds the pdf file. Try to change the fonts directly in this file.

 

For the other point I really do not know. I do not know the pdf language (similar to postscript) but I will also have to change it as I would like to change the PDF form.

 

Didier.

Link to comment
Share on other sites

Sorry to post this again.. .but I'm getting this error...

 

FPDF error: Image file has no extension and no type was specified: /home/beadand/public_html/images/

 

I have tried to make the changes suggested a couple of pages before and its still not working.

 

All the product images are .jpg but I'm using the 3 images contribution so I have three images for each product, could this be a problem.

 

Thank you for your help.

 

Angie

Link to comment
Share on other sites

possible..look at the path..it tries to look for images under the /public_html folder and not under /catalog/images. Check your admin/pdf_config.php for the correct setting of variable DIR_CATALOG (default: /catalog/). Is also your admin/includes/confige.php correctly set ?

 

:unsure:

 

Didier.

Edited by Spaceboy
Link to comment
Share on other sites

  • 3 weeks later...

Hi all ,

 

I have a problem with a customer who has uploaded lots of images created by a tool I don?t know , but the images haves ".JPG" as their endings ( in capital letters)

so I get tons of errors when creating a pdf.

Any idea how to solve it without changing all the images because he has them in 3 folders ( normal , medium , large ) ?

 

thank you in advance

 

Michael

-------------------

Surf-Timer

Internet Kiosk Software

www.surf-timer.com

Link to comment
Share on other sites

  • 3 months later...

hello, I'm getting this error after the mods Spaceboy suggested, (before the mods I had the error of filesize and extension)

 

Warning: fopen(/www/htdocs/xxxxx/catalog/catalogues/catalog_es.pdf): failed to open stream: Permission denied in /usr/www/htdocs/xxxxx/catalog/admin/fpdf.php on line 1024

FPDF error: Unable to create output file: /www/htdocs/xxxxx/catalog/catalogues/catalog_es.pdf

 

can someone help me?

Thank you

Link to comment
Share on other sites

  • 2 weeks later...

I am running into another problem.

 

Irrespective of the image format, when I'm trying to create a PDF catalogue within admin, I get an error since imagecreatefrompng & imagecreatefromjpg functions that are called within php_catalogue.php do not exist.

 

Any ideas?

Link to comment
Share on other sites

  • 4 months later...
I am getting this error

 

Maximum execution time of 30 seconds exceeded in public_html/admin/pdf_gif.php on line 209

 

"readme" says...php.ini needs to be modified. where can i find this file?

 

thanks in anticipation

root@router:~# locate php.ini

/etc/apache/php.ini-recommended

/etc/apache/php.ini-dist

/etc/apache/php.ini

 

On windows I dont know

Link to comment
Share on other sites

Hello,

Im using v 1.51 .. I can generate the pdf out of my products in the catalog. The only problem is that in the pdf, I get the EURO sign added behind the base currency.

 

F.ex.

 

1599.00USD?

 

Please help.

 

Thanks,

Alex

Link to comment
Share on other sites

I am using 1.51 and I can create the PDF fine when I'm not showing the images, but when I turn that option back on I get ...

Fatal error: Call to a member function on a non-object in /hsphere/local/home/xxxxxx/xxxxxx.com/admin/pdf_fpdf.php on line 1592

 

What's up with this?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...