syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in ...public_html/sites/all/modules/pdfview/tcpdf/tcpdf.php on line 1325

I am using pdfview-5.x-1.x-dev.tar.gz on PHP 4.4.4.
The tcpdf library is tcpdf_1_53_0_TC028_php4.tgz

Any idea?

CommentFileSizeAuthor
#2 pdfview_5.1.1_complete.tgz_.patch411.69 KBdrupalnesia

Comments

drupalnesia’s picture

It's look like this problem only on PHP 4. I try PHP 5 on my localhost and everything is fine.
But I still need to solve this problem since my hosting is PHP 4.

drupalnesia’s picture

Status: Active » Fixed
StatusFileSize
new411.69 KB

After upgrade to tcpdf_1_53_0_TC030 that contain bug fix for PHP 4 then above error fixed!

Also, I attach my edited version:
1. including reduced version of tcpdf from 6.5 MB to 400 KB only
2. including tcpdf config that using Drupal variable, mean you don't need to edit K_PATH_MAIN and K_URL_MAIN anymore

The code for #2 is:
$path = drupal_get_path('module', 'pdfview') .'/tcpdf';
define ("K_PATH_MAIN", realpath($path) .'/');

$path = drupal_get_path('module', 'pdfview') .'/tcpdf';
define ("K_PATH_MAIN", realpath($path) .'/');

Regards.

Anonymous’s picture

Status: Fixed » Closed (fixed)