vikrambalye / dompdf

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

500 Internal Server Error #329

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try creating multipage PDF.

What is the expected output? What do you see instead?
500 Internal Server Error

What version of the product are you using? On what operating system?
PHP 5.2.14 on Godaddy Linux Shared Hosting. I have set 
ini_set("memory_limit","512M");

Please provide any additional information below.
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 function is called. I don't 
think it's an issue of PHP but for dompdf library itself. It even don't make a 
log when this error occurs.

Original issue reported on code.google.com by binarys...@gmail.com on 29 Jul 2011 at 9:32

GoogleCodeExporter commented 9 years ago
Hello, which version of dompdf ?

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

GoogleCodeExporter commented 9 years ago
We tried using both version of dompdf and they both output 500 internal server 
error.

Original comment by binarys...@gmail.com on 31 Jul 2011 at 1:56

GoogleCodeExporter commented 9 years ago
I have encountered some situation where PHP will die and result in a memory 
dump on Dreamhost. I think when the script consumes more memory than allowed it 
just gets killed by a process watcher. Since you're not seeing any errors, this 
could be a similar type of issue.

At any rate it could, in fact, be something related to DOMPDF, but we wouldn't 
be able to tell without more details. Can you provide a sample document?

Original comment by eclecticgeek on 2 Aug 2011 at 1:52

GoogleCodeExporter commented 9 years ago
This happens to me as well with dompdf 0.6b2. It works great for 1 or 2 page 
documents but throws a 500 Internal Server Error when attempting longer 
documents. I should note that it works intermittently. Last week, I was able to 
get it to work by displaying fewer table rows per page. This week, without 
changing anything, it will error out 100% of the time.

I attempted changing the script type text/php to text/dompdf as mentioned in 
similar report, but that didn't help the situation.

Here's the output from setup.php, and I've attached a sample of the HTML that's 
giving me trouble:

PHP Version 5.0  5.2.17
DOMDocument extension   Yes  20031129
PCRE    Yes  Yes
Zlib    Yes  1.1
MBString extension  Yes  Yes
GD  Yes Yes
APC Yes No. Recommended for better performances

Original comment by joshua.f...@gmail.com on 7 Nov 2011 at 10:12

Attachments:

GoogleCodeExporter commented 9 years ago
Re comment 4. I should mention that I'm on Green Geeks shared hosting with a 
512mb Memory Limit -- not GoDaddy.

Original comment by joshua.f...@gmail.com on 7 Nov 2011 at 10:14

GoogleCodeExporter commented 9 years ago
500 errors typically mean that PHP reported an error. If that's the case you're 
seeing the generic 500 message because error display is turned off. If you have 
error logging enabled you can find out the specific error there. Knowing what 
that error is will help isolate the problem.

That being said, it sounds like you're probably running into memory issues. The 
easiest fix is to increase the PHP memory limit. If that's not possible, you 
could try modifying your HTML to use fewer tables (dompdf is still in need of 
quite a bit of optimization related to table rendering).

FYI, I was able to render your document without any issues.

Original comment by eclecticgeek on 8 Nov 2011 at 1:54

GoogleCodeExporter commented 9 years ago
You're right on, eclectic.

Green Geeks is ridiculously stingy with resource usage--they'll limit your 
limits and not be able to tell you when or why or how you exceeded them.

Anyway, in the script, I upped the PHP memory_limit to 128M, and it rendered 
without a 500 error.

So now I begin the resource limit dance with the host.

Original comment by joshua.f...@gmail.com on 8 Nov 2011 at 11:08

GoogleCodeExporter commented 9 years ago
Glad you were able to work out that particular issue. Hopefully you won't run 
into any others.

Original comment by eclecticgeek on 9 Nov 2011 at 7:36

GoogleCodeExporter commented 9 years ago
HELLO every one, I cann't remove error "500 internal server error",
I think it is the problem of dompdf library,

Please help me.

Thanks
Gopal

Original comment by gopal.sa...@bminfotech.in on 2 Mar 2012 at 6:39

GoogleCodeExporter commented 9 years ago
@gopal please post to the discussion forum so we can better help you with your 
problem.
https://groups.google.com/forum/#!forum/dompdf

Original comment by eclecticgeek on 3 Mar 2012 at 3:39

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

Original comment by eclecticgeek on 30 May 2013 at 5:16