The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Mon Mar 24, 2008 11:08 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Mar 24, 2008 11:02 pm
Posts: 6
Quote:
Warning: Wrong parameter count for class_exists() in /home/sites/mydomain.org/public_html/libraries/tcpdf/tcpdf.php on line 96

I get this error when I hit a pdf creation icon in any article - followed by garbage text in the pdf window which seems to start with a pdf header as follows:

Quote:
%PDF-1.5 3 0 obj <> endobj 4 0 obj <> stream xœTÁnÛ0 å9_ÁÛ6 PeÅŠã64‚


It was working fine in 1.5.0

I upgraded from 1.5.0 to 1.5.2 recently. I since uploaded as a 'patch' set of 'clean' 1.5.2 files (to see if I had a dodgy file in there) - still the same error persists

Everything else is working OK

Only addons are:
JCE editor
FCK editor

Any help or insight would be very welcome

Cheers

Jim


Last edited by jimlad on Mon Mar 24, 2008 11:47 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Mar 24, 2008 11:24 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Mar 24, 2008 11:02 pm
Posts: 6
Has this anything to do with it?

I also got an image error, similar to that described in the article referenced below

http://www.thomassteven.com/joomla/53-j ... 5-pdf.html

He suggests some issues with the library version used in the 1.5.x releases - but I see that the i.5.2 library set is very recent...

My error is

Quote:
Warning: getimagesize(http://www.mydomain.org/images/stories/red.jpg) [function.getimagesize]: failed to open stream: Connection refused in /home/sites/mydomain.org/public_html/libraries/tcpdf/tcpdf.php on line 3672
TCPDF error: Missing or incorrect image file: http://www.mydomain.org/images/stories/red.jpg

Trust me, the image is there...


Last edited by jimlad on Mon Mar 24, 2008 11:43 pm, edited 2 times in total.

Top
 Profile  
 
PostPosted: Mon Mar 24, 2008 11:28 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Dec 05, 2006 11:01 pm
Posts: 28
Same exact error here. Sorry I don;t have any better input other than to say you aren't alone!


Top
 Profile  
 
PostPosted: Tue Mar 25, 2008 12:18 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Mar 24, 2008 11:02 pm
Posts: 6
I went back and checked a 1.5.0 version of my site (was migrated from 1.x) and it is doing intermittent pdf errors - only saw this by trying a pdf of everything on the site...

Plain text - generally OK

GIF images on page - more get errors

Here are some errors generated in the pdf popup window after clicking the pdf icon in an article, off a text-only page in an otherwise fine version of a 1.5.0 site

Quote:
Warning: addfont(/home/sites/mydomain.org/public_html/language/pdf_fonts/arial.php) [function.addfont]: failed to open stream: No such file or directory in /home/sites/mydomain.org/public_html/libraries/tcpdf/tcpdf.php on line 1661

Warning: addfont(/home/sites/mydomain.org/public_html/language/pdf_fonts/arial.php) [function.addfont]: failed to open stream: No such file or directory in /home/sites/mydomain.org/public_html/libraries/tcpdf/tcpdf.php on line 1661

Warning: addfont() [function.include]: Failed opening '/home/sites/mydomain.org/public_html/language/pdf_fonts/arial.php' for inclusion (include_path='.:/usr/share/pear') in /home/sites/mydomain.org/public_html/libraries/tcpdf/tcpdf.php on line 1661
TCPDF error: Could not include font definition file


I checked in ../languages/pdf_fonts/arial.php in the distribution 1.5.0 and 1.5.2 packages and the file arial.php is not there in the distribution.

What is referencing arial.php?

Now really unsure about what is going on here


Top
 Profile  
 
PostPosted: Tue Mar 25, 2008 12:26 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Dec 05, 2006 11:01 pm
Posts: 28
My specific error:
Quote:
Warning: Wrong parameter count for class_exists() in /libraries/tcpdf/tcpdf.php on line 96

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 2949120 bytes) in /libraries/tcpdf/unicode_data.php on line 16467


The memory size thing is pretty odd. I haven't seen that one before.


Top
 Profile  
 
PostPosted: Tue Mar 25, 2008 12:32 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Mar 24, 2008 11:02 pm
Posts: 6
Make a php.ini file and put the following in it, and place it in the joomla directory

memory_limit=16M

This usually sorts out the memory problem on many hosts/servers eg when installing a component with FTP off.


Top
 Profile  
 
PostPosted: Tue Mar 25, 2008 12:51 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Dec 05, 2006 11:01 pm
Posts: 28
Thank you jimlad! I really thought I already had done that for this site. I appreciate your help :)

So now it just gives me the other error with a whole bunch of strange characters below it.


Top
 Profile  
 
PostPosted: Wed Mar 26, 2008 9:10 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Mar 26, 2008 9:03 pm
Posts: 2
I'm receiving the same "tcpdf.php on line 96" error followed by lines of symbols beginning with "%PDF-1.5 3 0 obj <> endobj 4 0 obj <> stream". This happens on all pages regardless of font or graphics (or lack thereof).

I'm currently running 1.5.2. Anyone have any luck backing down to a previous version?


Top
 Profile  
 
PostPosted: Thu Mar 27, 2008 2:47 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 27, 2008 1:48 pm
Posts: 5
I am also having this same problem...

This is what my page look like after trying to create a PDF:
Quote:
Warning: Wrong parameter count for class_exists() in /home/eosdesig/public_html/cms/libraries/tcpdf/tcpdf.php on line 96
%PDF-1.5 3 0 obj <> endobj 4 0 obj <> stream x��X�o�F���ۧ�RL 6��T]�wm�^u��ԇ��A1�'���w�YX�(��3��|���j�s}��|1��g���e�o?����X/�����V��m�iqz�P/����2����R�ڪX�TAwZ�N��4O�*R?��^>�,���


I looked into the tcpdf/tcpdf.php file on line 96 and this got me to look into the tcpdf/config/tcpdf_config.php file, and it appears that file is not correctly configured.

I am going to play with it a little bit and see what I get.


Top
 Profile  
 
PostPosted: Thu Mar 27, 2008 3:03 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 27, 2008 1:48 pm
Posts: 5
Ok, by setting up the correct paths in the tcpdf/config/tcpdf_config.php file, I am still getting the error.

I now believe this may have something to do with fonts, as there is no fonts directory located in the tcpdf/ archive.

The tcpdf_config.php references a fonts/ archive that should be present, since it is not there, I am assuming that is a problem.

I have seen posts indicating the the 1.5.0 Joomla! worked correctly, but I do not have these files. If someone with the 1.5.0 build files could verify my assumptions that would be fantastic.


Top
 Profile  
 
PostPosted: Thu Mar 27, 2008 3:32 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 27, 2008 1:48 pm
Posts: 5
Well... All of this has gotten me nowhere. I added the needed fonts archive and still no luck.

So, I am now changing my theory to PHP problems.

It looks like the script is actually a class for PHP 5 - meaning that those of us with 4.4 .4 may be out of luck.

Can anyone with Joomla! confirm this please?

I have looked into the creator of the class and it appears there is a version for PHP 4 - I am going to work with that now and report my success (or lack thereof).


Top
 Profile  
 
PostPosted: Thu Mar 27, 2008 3:45 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Dec 05, 2006 11:01 pm
Posts: 28
Thank you Zacheos for trying. This is really frustrating!


Top
 Profile  
 
PostPosted: Thu Mar 27, 2008 3:47 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 27, 2008 1:48 pm
Posts: 5
BINGO BANGO BONGO

PROBLEM SOLVED...

If you are running PHP 4 - the packaged PDF conversion classes will not work in Joomla! 1.5.2

To solve this problem:

1.) Visit: http://sourceforge.net/projects/tcpdf/
2.) Download the class package for PDF 4
3.) Delete the existing files and sub folders in /libraries/tcpdf/ of your Joomla! installation
4.) Upload the version 4 class files that you got from SourceForge in the /libraries/tcpdf/ folder on your server
5.) Edit the tcpdf_config.php file in the /libraries/tcpdf/config/ folder on your server
5.a.) You will need to change the root path to the /tcpdf/ folder as well as the URL path to this folder

6.) Sit back and have a beer, life just got a whole lot better 8)


Top
 Profile  
 
PostPosted: Fri Mar 28, 2008 5:11 am 
Joomla! Intern
Joomla! Intern

Joined: Sat Jan 05, 2008 3:23 am
Posts: 76
Hello

We are getting closer to a fix for this issues.

I found this step not necessary
5.a.) You will need to change the root path to the /tcpdf/ folder as well as the URL path to this folder

FF and Safari works in ie7 does not - still need to right click and open in a new tab. :'(

PS I am still the same after doing the above by just removing Wrong parameter count for class_exists() without having to upload all those files.

Also they are all going to get overwritten I presume on the next patch upgrade and we should get this logged as bug so the developers can fix it.

This may be a duplicate as there is so many bugs listed for pdf issues

[#10377] 1.5.2 upgrade viewing a pdf class error tcpdf.php on line 96

[#10324] TCPDF broke on PHP4 in 1.5.2

[#10271] Useless code in libraries\joomla\document\pdf\pdf.php


Top
 Profile  
 
PostPosted: Fri Mar 28, 2008 8:26 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Jan 05, 2008 3:23 am
Posts: 76
Trying to find orig bug number as you get non helpful reply like below.

You would think they would actually tell you the bug number so you could look it up???
(search is not helpful and honestly causes duplicates as it simply one of the worst search there is.)

Quote:
Submitted By: Elin Waring
Adddate: 2008-03-29 02:37:21
This is a duplicate of two previous confirmed reports. Please search prior to
submitting a new issue.


Top
 Profile  
 
PostPosted: Fri Mar 28, 2008 8:45 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Jan 05, 2008 3:23 am
Posts: 76
After spending rather large amount of time on http://joomlacode.org/gf/search/

There is this confirmed bug

[#10323] Wrong parameter count for class_exists()


Top
 Profile  
 
PostPosted: Sat Mar 29, 2008 11:41 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Feb 01, 2007 2:39 pm
Posts: 6
De oplossing voor deze bug is eenvoudig, verander lijn 96 in
libraries/tcpdf/tcpdf.php van :

Code:
   if(!class_exists(`TCPDF', false)) {


naar

Code:
   if(!class_exists(`TCPDF')) {


Dit lost je probleem op in PHP4.


Thanks to Johan Janssens ;)


Top
 Profile  
 
PostPosted: Sat Mar 29, 2008 7:44 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Jan 05, 2008 3:23 am
Posts: 76
That fix does not work Im afraid.

There is more to it that the class issue.


Top
 Profile  
 
PostPosted: Sat Mar 29, 2008 7:57 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Jan 05, 2008 3:23 am
Posts: 76
I have updated bug [#10323] Wrong parameter count for class_exists() still as not working.

http://joomlacode.org/gf/project/joomla ... m_id=10323

If the changes in the bug and highlighted above are made

Code:
Parse error: parse error, unexpected '=', expecting '}' in /libraries/tcpdf/tcpdf.php on line 923


Top
 Profile  
 
PostPosted: Fri Apr 18, 2008 5:42 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Sep 20, 2005 11:30 pm
Posts: 218
Location: Oregon
I have two sites running 1.5.2. One gets the class error on pdf generation, the other does not.

Server where pdf generation works:

PHP Built on: Linux music.mediacampus.com 2.6.9-67.0.4.EL #1 Sun Feb 3 06:50:13 EST 2008 x86_64
Database Version: 4.1.20-log
Database Collation: utf8_general_ci
PHP Version: 4.3.9
Web Server: Apache/2.0.52 (CentOS)
Web Server to PHP interface: apache2handler
Joomla! Version: Joomla! 1.5.2 Production/Stable [ Woi ] 22-March-2008 22:00 GMT
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14

Server were pdf throws up the count class error:

PHP Built on: Linux infong 2.4 #1 SMP Wed Sep 26 00:19:50 CEST 2007 i686 GNU/Linux
Database Version: 5.0.51-log
Database Collation: utf8_general_ci
PHP Version: 4.4.8
Web Server: Apache/1.3.34 Ben-SSL/1.55
Web Server to PHP interface: cgi
Joomla! Version: Joomla! 1.5.2 Production/Stable [ Woi ] 22-March-2008 22:00 GMT
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14

_________________
Author of component Joomla Bible Study:
http://www.JoomlaBibleStudy.org


Top
 Profile  
 
PostPosted: Mon Apr 21, 2008 5:24 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Feb 27, 2006 9:50 pm
Posts: 19
Same problem here. Just trying to keep the post fresh.

PHP Built on: Linux gator194.hostgator.com 2.6.24.3-grsec #5 SMP Thu Mar 13 00:20:19 CDT 2008 i686
Database Version: 4.1.22-standard
Database Collation: utf8_general_ci
PHP Version: 4.4.4
Web Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
Web Server to PHP interface: cgi
Joomla! Version: Joomla! 1.5.2 Production/Stable [ Woi ] 22-March-2008 22:00 GMT
User Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14

_________________
I searched first, I swear I did...

J2.5.7 Stable / PHP Version 1.5.17 / Apache 2.2.20 (Unix)
/G\


Top
 Profile  
 
PostPosted: Mon Apr 21, 2008 6:04 pm 
Joomla! Intern
Joomla! Intern

Joined: Sat Jan 05, 2008 3:23 am
Posts: 76
Me too

I do notice that I included run on php vers 4

I have other issues with some ext and those developers said sorry only support php vers 5

I'm waiting on my host to upgrade to php vers 5

Is this then a php 4 issue?? and we need to upgrade to php vers 5??


Top
 Profile  
 
PostPosted: Mon Apr 21, 2008 6:38 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Sep 20, 2005 11:30 pm
Posts: 218
Location: Oregon
I'm not sure its just a php versioning problem. I have two sites, both using a version of php 4x - on one of them the pdf generation works, on the other it doesn't.

_________________
Author of component Joomla Bible Study:
http://www.JoomlaBibleStudy.org


Top
 Profile  
 
PostPosted: Wed Apr 23, 2008 5:33 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Apr 02, 2008 6:26 am
Posts: 11
Glad I'm not the only one with this problem.


Top
 Profile  
 
PostPosted: Thu Apr 24, 2008 8:17 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Apr 15, 2008 2:33 am
Posts: 8
I would submit its not a php version issue.
I'm now using php5 and the error is still occuring, therefore it appears it's the pdf ver / code.

the post above might be the fix (at least short until update / patch) I'll post back after with my result.

_________________
John

you know your in trouble when you have more q's than a's


Top
 Profile  
 
PostPosted: Fri Apr 25, 2008 6:08 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Apr 02, 2008 6:26 am
Posts: 11
Sweet!
Just installed the new 1.5.3 and it fixed the PDF problem immediately!
Nicely done Joomla programmers!
Thanks!


Top
 Profile  
 
PostPosted: Fri Apr 25, 2008 3:31 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Sep 20, 2005 11:30 pm
Posts: 218
Location: Oregon
1.5.3 does seem to have fixed the pdf problem. Awesome guys!

_________________
Author of component Joomla Bible Study:
http://www.JoomlaBibleStudy.org


Top
 Profile  
 
PostPosted: Fri Apr 25, 2008 10:18 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Nov 11, 2006 11:55 am
Posts: 10
Unfortunately the pdf problem hasn't been fixed for me in J!1.5.3

I click on the pdf link/icon and a duplicate page opens in a new browser window. :(

Anybody got any ideas?

Thanks,

Ej


Top
 Profile  
 
PostPosted: Fri Apr 25, 2008 10:30 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Sep 20, 2005 11:30 pm
Posts: 218
Location: Oregon
I did notice that the pdf opens in a new FireFox tab, rather than a new window but it does appear correctly in pdf format now.

_________________
Author of component Joomla Bible Study:
http://www.JoomlaBibleStudy.org


Top
 Profile  
 
PostPosted: Mon Apr 28, 2008 9:15 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Apr 16, 2008 8:17 pm
Posts: 15
Hi,

I am running the same site on Xaamp locally and on live server with J1.5.2. On local the PDF button works perfectly.

However, on the live server I egt the same error msgs as everyone above. I have also tried the proposed solution but it did not work.

The live server runs PHP 4.4, the local PHP5.2.5.

How can this be fixed? Shall I wait for a fix in J1.5.3?

Tahnks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group