Page 1 of 1
Parse error: syntax error with phocapdf
Posted: 27 Mar 2009, 17:07
by michael_wds
Hi,
I have a local installation Joomla 1.5.9 with Phocapdf for generating the pdf´s. On the local installation everything works fine. I have uploaded the joomla page to an webserver and when I push on a pdf icon it shows the following error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/21/.../administrator/components/com_phocapdf/helpers/phocapdfcontenttcpdf.php on line 18
Everything was correct with upload, because I downloaded the webspace and also the database and tried it local on Xampp then everything was ok again. The pdf where shown correct.
Maybe it is a problem with the provider, I use a Mysql 5 database on these website.
Thank you in advance for helping.
Michael
Re: Parse error: syntax error with phocapdf
Posted: 27 Mar 2009, 17:29
by Jan
Hi, on line 18 there is:
protected $pluginP = null;
do you use PHP5 which is required for this component (see:
https://www.phoca.cz/phocapdf )?
Jan
Re: Parse error: syntax error with phocapdf
Posted: 28 Mar 2009, 00:59
by michael_wds
Hi Jan,
wow that was a fast reply. Thank you for that.
I checked with the provider and the PHP Version was PHP 4, so I changed it to PHP 5 and it works.
But now I have another problem with creating pdf´s with pics. Please take a look in my
other post
Thank you
Re: Parse error: syntax error with phocapdf
Posted: 29 Mar 2009, 15:46
by silberfuchs
I have the same mistake -I checked the PHP-Version.....it is 4.4.9
How did you change it, because my provider is 1&1 ....???? I copied now a htaccess file into root with the following code
"AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php"
Now the pdf component/plugin is working, but my gallery not ......
Re: Parse error: syntax error with phocapdf
Posted: 30 Mar 2009, 20:15
by michael_wds
Hi Silberfuchs,
If you change the htaccess file with these code every php file get parsed to Version php 5.
You can change the file extension from .php to .php5 of the specificated files and the 1und1 server takes only for these .php5 files PHP Version 5 and all other files takes PHP Version 4.
But note you have to remove the entry in the htaccess file.
Re: Parse error: syntax error with phocapdf
Posted: 30 Mar 2009, 20:27
by silberfuchs
Hi Michael_WDS,
thanks for your reply - ok so far it is clear. Do you know what php files I have to adapt for usage of the phocapdf component? Would it be easier to change all files except the gallerie ones? Whichone?
Thanks
Silberfuchs
Re: Parse error: syntax error with phocapdf
Posted: 06 Apr 2009, 20:30
by michael_wds
Hi Silberfuchs,
I don´t really know, but I would change all php files which are responsible phocapdf.
There are a files for phocapdf in :
/administrator/components/phocapdf
/compontents/phocapdf
/libraries/joomla/document/phocapdf
/plugins/system
I think thats it, Jan knows, more.
Re: Parse error: syntax error with phocapdf
Posted: 08 Apr 2009, 18:27
by silberfuchs
I made the following experience:
I copied the htaccess file for php5 usage into the root directory of the server. The I had to change the link of the gallery from category view (all categories) to list one category. Then the error didn't occur anymore. So it really depends with php5 on how to integrate the gallery link. Phocapdf is now working .....