0

Warning: Illegal string offset 'hex' in /home/chriserw/public_html/quote/dompdf/include/style.cls.php on line 1150

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/chriserw/public_html/quote/dompdf/lib/class.pdf.php on line 4672

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/chriserw/public_html/quote/dompdf/lib/class.pdf.php on line 4677

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/chriserw/public_html/quote/dompdf/lib/class.pdf.php on line 4332

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/chriserw/public_html/quote/dompdf/lib/class.pdf.php on line 4348 Unable to stream pdf: headers already sent

i have successfully implemented creating pdf from database, its works fine on local host but when i tested on server it gives me above error.

  • deprecated warning is due to newer php version which has the function set_magic_quotes_runtime as deprecated. – Neo May 21 '14 at 18:33
  • so how to get rid of this warning – user2625307 May 21 '14 at 18:52
  • you need to upgrade the dompdf library you are using or check this: http://stackoverflow.com/questions/2217955/how-can-i-replace-the-deprecated-set-magic-quotes-runtime-in-php – Neo May 21 '14 at 18:59
  • Try updating to dompdf 0.6.1 if you're not already there. There was a patch in that version relating to [hex colors](https://github.com/dompdf/dompdf/issues/749). – BrianS May 21 '14 at 19:45
  • v0.6.1 also removes any reference to `set_magic_quotes_runtime()`. – BrianS May 21 '14 at 19:46
  • Also, those are just warning messages and won't prevent PDF generation. Try setting `display_errors` to 0 (or false or 'Off') to prevent warnings/notices going to the browser. – BrianS May 21 '14 at 19:49

0 Answers0