Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 Internal Server Error #335

Closed
PhenX opened this issue Dec 6, 2012 · 11 comments
Closed

500 Internal Server Error #335

PhenX opened this issue Dec 6, 2012 · 11 comments

Comments

@PhenX
Copy link
Member

PhenX commented Dec 6, 2012

Original author: binarys...@gmail.com (July 29, 2011 21:32:55)

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: http://code.google.com/p/dompdf/issues/detail?id=329

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From fabien.menager on July 31, 2011 13:36:59
Hello, which version of dompdf ?

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From binarys...@gmail.com on July 31, 2011 13:56:11
We tried using both version of dompdf and they both output 500 internal server error.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From eclecticgeek on August 02, 2011 01:52:48
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?

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From joshua.f...@gmail.com on November 07, 2011 22:12:37
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

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From joshua.f...@gmail.com on November 07, 2011 22:14:35
Re comment 4. I should mention that I'm on Green Geeks shared hosting with a 512mb Memory Limit -- not GoDaddy.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From eclecticgeek on November 08, 2011 01:54:06
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.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From joshua.f...@gmail.com on November 08, 2011 23:08:32
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.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From eclecticgeek on November 09, 2011 19:36:17
Glad you were able to work out that particular issue. Hopefully you won't run into any others.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From gopal.sa...@bminfotech.in on March 02, 2012 06:39:41
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

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From eclecticgeek on March 03, 2012 03:39:02
@Gopal please post to the discussion forum so we can better help you with your problem.
https://groups.google.com/forum/#!forum/dompdf

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From rashid...@gmail.com on March 13, 2012 21:38:41
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!

@PhenX PhenX closed this as completed Dec 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant