11
jdseymour
Re: Create PDF's on the fly

My path is set as:

/******/******/public_html/test

In dompdf_conf.inc.pdf. This should be the correct path to my test site root.

I can render /test/www/install.php, which shows the installation instructions. But when I click on the "Samples" or "demo" links on the page I get the following error:

Quote:
Parse error: parse error, unexpected ')', expecting '(' in /*******/********/public_html/test/www/examples.php on line 54


PS. Got to go to work. Will work with this later today.

12
jdseymour
Re: Create PDF's on the fly

I have worked on this for several hours trying to resolve this latest parse error. Any ideas?

For error see above post.

13
Mithrandir
Re: Create PDF's on the fly

Where is that examples file located? Is it part of the dompdf package?

What is on line 54 of the examples.php?

What have you done to test this? (XOOPS installation and dompdf installation - how did you do it?

14
rowdie
Re: Create PDF's on the fly
  • 2005/3/14 10:55

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


DOMPDF only works with PHP5. It was developed for the Zend PHP5 competition and makes use of features only available in PHP5... I was following the competition, that's where I came across it.

Quote from the DOMPDF site:

Quote:
Please note that dompdf works only with PHP 5. There are no plans for a PHP 4 port.


Sorry that you've spent so long trying to get it to work with PHP4, I've only just seen this post


Rowd

15
jdseymour
Re: Create PDF's on the fly

It states on the site that it should work with later versions of PHP 4.

I installed it in the root directory of my test site. Since it called for a /tmp directory I created one also in the root chmod 777. The demo and samples are included in the www directory along with the affected example.php.

Mith check your pm for URL to my test site.

16
Mithrandir
Re: Create PDF's on the fly

Quote:
Mith check your pm for URL to my test site.

Ok, there is a parse error in the examples.php file included with dompdf package - or it is an incompatibility due to changed syntax in PHP5

How did my code work? Your last comment to that was that you should read the instructions and then we have only heard of this parse error in the dompdf docs...

17
jdseymour
Re: Create PDF's on the fly

I think that your code works as expected. The problem is probably the PHP version that I am running.

I guess it will be best for me to install PHP 5 locally to test. I ran a debug on my local system with 4.3.10 also on example.php and got an error on the same line.

Here is line 54 in examples.php:
Quote:
foreach ( array_keys(CPDF_Adapter::$PAPER_SIZES) as $size )


Here is the full PHP snippet including that code:
Quote:
foreach ( array_keys(CPDF_Adapter::$PAPER_SIZES) as $size )
echo "\n";
?>

18
dompdf
Re: Create PDF's on the fly
  • 2005/3/23 6:52

  • dompdf

  • Just popping in

  • Posts: 1

  • Since: 2005/3/23


Hi, I'm the author of dompdf. Unfortunately rowdie is correct. There are no plans for a PHP4 port. dompdf is *PHP5 only*.

If you guys need help installing it or if you run into bugs, send me an email (dompdf at digitaljunkies dot ca) and I'll try and help. Suggestions for the website and documentation are welcome too (and perhaps needed given the confusion here ).


benj

Login

Who's Online

339 user(s) are online (273 user(s) are browsing Support Forums)


Members: 0


Guests: 339


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits