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
Parse error: syntax error with phocapdf
-
- Phoca Newbie
- Posts: 7
- Joined: 27 Mar 2009, 16:50
Parse error: syntax error with phocapdf
Last edited by michael_wds on 28 Mar 2009, 01:04, edited 1 time in total.
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Parse error: syntax error with phocapdf
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
protected $pluginP = null;
do you use PHP5 which is required for this component (see: https://www.phoca.cz/phocapdf )?
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 7
- Joined: 27 Mar 2009, 16:50
Re: Parse error: syntax error with phocapdf
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
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
-
- Phoca Newbie
- Posts: 7
- Joined: 29 Mar 2009, 07:49
Re: Parse error: syntax error with phocapdf
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 ......
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 ......
-
- Phoca Newbie
- Posts: 7
- Joined: 27 Mar 2009, 16:50
Re: Parse error: syntax error with phocapdf
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.
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.
-
- Phoca Newbie
- Posts: 7
- Joined: 29 Mar 2009, 07:49
Re: Parse error: syntax error with phocapdf
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
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
-
- Phoca Newbie
- Posts: 7
- Joined: 27 Mar 2009, 16:50
Re: Parse error: syntax error with phocapdf
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.
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.
-
- Phoca Newbie
- Posts: 7
- Joined: 29 Mar 2009, 07:49
Re: Parse error: syntax error with phocapdf
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 .....
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 .....