MaheswariRamachandran / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Internal Server Error on PHP 5.2.8 #37

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
An internal server error is produced when am trying to generate the PDF .
This error occurred when my host upgraded from php 5.2.6 to php 5.2.8 

I tried searching the net for a solution , but it looks like it is a common
bug . Please help me finding a solution to this as it is an important
requirement in our web applications

Am using Linux shared host

Original issue reported on code.google.com by shouvikf...@gmail.com on 5 Jul 2009 at 12:46

GoogleCodeExporter commented 9 years ago
Running on PHP 5.2.9 here, Linux VPS, no problems. Tell your host to upgrade to 
the
latest version of PHP first... IMO.

Original comment by read...@gmail.com on 6 Jul 2009 at 10:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
If you run DOMPDF from the command line you should see a segmentation fault. I 
have yet to track down the 
source, but I have found that some HTML documents that cause this issue can 
still present problems on updated 
systems (memory limit issues). May or may not be related.

Original comment by eclecticgeek on 14 Jul 2009 at 4:52

GoogleCodeExporter commented 9 years ago
I'm having the same issue.  Dompdf is working fine on my localhost but when I 
run the script on my server (Linux shared hosting from GoDaddy) I get this 
error:
-------
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to 
complete your request.

Please contact the server administrator, support@supportwebsite.com and inform 
them of the time the error occurred, and anything you might have done that may 
have caused the error.

More information about this error may be available in the server error log.
-----------

GoDaddy says my version of PHP is 5.x

Original comment by Justin.B...@gmail.com on 6 Jul 2010 at 2:32

GoogleCodeExporter commented 9 years ago
Looking back at this error we'll need more information about what's going on. 
An internal server error could be due to something as simple as going over the 
allowable memory usage. If you look at the Apache/PHP error logs do you see any 
relevant information?

Original comment by eclecticgeek on 6 Jul 2010 at 5:31

GoogleCodeExporter commented 9 years ago
Having the same issue. Stuck on GoDaddy and I do not have the option to switch 
or upgrade PHP versions. I've upped the memory and time limits to no avail. 

Smaller PDF's are generated easily however the large PDF's that used to work 
fine, now result in a 500 internal server error after 15-20 seconds of 
processing time.

Everything runs smoothly until $dompdf->render(); is called.

Any ideas appreciated.

Original comment by inkwell....@gmail.com on 12 Jul 2010 at 9:48

GoogleCodeExporter commented 9 years ago
There does appear to be an issue with PHP 5.2.8 that does not appear in other 
releases. I haven't definitively identified the source (possible memory leak?).

Original comment by eclecticgeek on 15 Jul 2010 at 2:02

GoogleCodeExporter commented 9 years ago
I think the problem stems from the php evaluator class. On newer versions of 
PHP a segmentation fault occurs when using inline php. When disabling 
utf8_decode of the inline php the segmentation fault disappears.

Original comment by nicholas...@gtempaccount.com on 16 Jul 2010 at 10:35

GoogleCodeExporter commented 9 years ago
Same here with PHP 5.3.2
Seems that the proposed solution provided by #9 solves the problem.

Original comment by mma...@gmail.com on 19 Jul 2010 at 9:20

GoogleCodeExporter commented 9 years ago
Same here. PHP 5.3.2 (ubuntu with Suhosin)

Gives segfault when trying to convert pages from "Samples".
All the pages that fail have script type="text/php" in them.

Tried with both 0.6.0b1 and with 0.5.1

When php code is removed PDF generates successfully.

Original comment by german.r...@gmail.com on 27 Jul 2010 at 2:23

GoogleCodeExporter commented 9 years ago
Get this error when converting pages with tables. most samples work fine, have 
an issue with latin1.html. Gives Internal Server Error.

Not sure how to deal with it. Works well with my hostgator account. Godaddy 
server has an issue.

Any one can help?

Original comment by gary.huk...@gmail.com on 12 Aug 2010 at 6:24

GoogleCodeExporter commented 9 years ago
Issue 46 has been merged into this issue.

Original comment by eclecticgeek on 17 Aug 2010 at 5:40

GoogleCodeExporter commented 9 years ago
With PHP 5.1.6 I get this error on the latin1 example page as mentioned by #12 

It also happens on one of my scripts once a simple table is a certain way down 
the page inside a body element and after about 2 DIVs.

Original comment by MCF...@gmail.com on 10 Mar 2011 at 1:12

GoogleCodeExporter commented 9 years ago
Upgrading from PHP 5.1.6 to 5.3.5 solved the issue for me.

Original comment by MCF...@gmail.com on 11 Mar 2011 at 9:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have this same problem with script type="text/php" began after the updating 
of some packages (unfortunately I noticed not immediately) in March 2011. There 
were errors "segmentation fault"... Before all worked fine. WTF...
Earned today after the upgrade my Ubuntu from 10.04 to 10.10 :)

Original comment by mewl...@gmail.com on 16 Mar 2011 at 2:13

GoogleCodeExporter commented 9 years ago
I have same problem. Working one day and no working the next.  Removing 
php/text script allows to work without problems. Ubuntu 10.04, php -v 5.3.2.  
Has anyone found a work around for this.  I see one guy upgraded to 5.3.5, has 
that worked for anyone else?

Original comment by michael....@gmail.com on 6 Apr 2011 at 2:54

GoogleCodeExporter commented 9 years ago
Hello, what version of dompdf do you use?
Could you try something to know where this error comes from ?

 - Change the "type" attribute of the inline PHP script from "text/php" to "text/dompdf"
 - Replace "text/php" to "text/dompdf" in renderer.cls.php

and tell me if it works now.

Original comment by fabien.menager on 6 Apr 2011 at 6:04

GoogleCodeExporter commented 9 years ago
I am using PHP 5.2.14 on godaddy and it seems that there is a big issue with 
dompdf.
It generates one page pdf. But when we try to generate multipage pdf it show 
500 internal server error. This happens when render is called. I don't think 
it's an issue of PHP but for dompdf library itself.

Original comment by binarys...@gmail.com on 29 Jul 2011 at 9:29

GoogleCodeExporter commented 9 years ago
Do you use inline PHP script or long HTML tables ?

Original comment by fabien.menager on 31 Jul 2011 at 1:36

GoogleCodeExporter commented 9 years ago
I have a strange situation.
I have two sites, both on the same server, thus with the same configuration and 
both with the same version of dompdf (0.6 beta 2) and with the same PHP script.
So, everything works fine on one site, but on the other one I get "internal 
server error".
How is it possible?

This is the server configuration:
Apache version     2.2.17
PHP version     5.3.6
MySQL version     5.1.56
Architecture     i686
Operating system     linux
Kernel version 2.6.38.2-xxxx-std-ipv6-32

Thanks 

Original comment by rob.geno...@gmail.com on 4 Oct 2011 at 8:59

GoogleCodeExporter commented 9 years ago
Are you copying dompdf from one server to the other? Have you installed any 
fonts? A 500 error is a script error, so look in the PHP error log for hints as 
to what's going wrong.

Original comment by eclecticgeek on 4 Oct 2011 at 4:46

GoogleCodeExporter commented 9 years ago
Ubuntu 10.04 LTS (Lucid)
PHP Version 5.3.2-1ubuntu4.10

Pages with script type="text/php" failed. The page was a blank screen. The 
error logs showed a Segmentation Fault. Removing script tags allowed the PDFs 
to generate normally.

From comment #11 I attempted the text/dompdf fix. No help. Went back to text/php

From comment #9 removing utf8_decode fixes the problem.

dompdf/include/php_evaluator.cls.php

Old line 66:
eval(utf8_decode($code));

Changed to 66, 67:
// eval(utf8_decode($code)); 
eval($code);

Original comment by phils...@gmail.com on 7 Jan 2012 at 8:52

GoogleCodeExporter commented 9 years ago
No, still not working :(

Original comment by rashid...@gmail.com on 13 Mar 2012 at 2:45

GoogleCodeExporter commented 9 years ago
This happens for the memory limit of server and the maximun execution time.
There's that increase these, for example:

ini_set("memory_limit", "999M");
ini_set("max_execution_time", "999");

Do this before you instantiate the class, $dompdf = new DOMPDF();

Sorry for my English!

Original comment by rashid...@gmail.com on 13 Mar 2012 at 9:38

GoogleCodeExporter commented 9 years ago
I have similar problem in Ubuntu w/ php 5.3.2 

None of the above fixes work.  Nothing shows up on my Apache or PHP error logs. 
 Not sure how to debug.

Original comment by ke...@parkme.com on 26 Mar 2012 at 5:41

GoogleCodeExporter commented 9 years ago
A sample file that gives this (with all the CSS) would help.

Original comment by fabien.menager on 26 Mar 2012 at 6:09

GoogleCodeExporter commented 9 years ago
The next release of dompdf will modify the eval(utf8_decode($code)) line that 
appears to be causing some problems. If you're experiencing issues, and are 
using inline script, can you test this out on your own system?

Original comment by eclecticgeek on 16 Apr 2012 at 10:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00