category:

Setting up and getting DOMpdf to work in XAMPP on Windows

Setting up the Dompdf (a pdf generation package in php) in XAMPP in windows environment can sometimes be an issue.
After we have set up the package in the htdocs and go for testing the examples in the packages , error is encountered which is as follows-

A PHP Error was encountered
Severity: Warning
Message: domdocument::domdocument() expects at least 1 parameter, 0 given
Filename: include/dompdf.cls.php
Line Number: 165
Fatal error: Call to undefined method domdocument::loadHTML() in C:xampphtdocsbambooinvoicebamboo_system_filespluginsdompdfincludedompdf.cls.php on line 284


The error message is caused due to a conflict between DomDocument and DomXML extentions , so the first thing we did was to disable the domdocument extention in php.ini.
extension = php_domxml.dll


The error message is caused due to a conflict between DomDocument and DomXML extentions , so the first thing we did was to disable the domdocument extention in php.ini.
extension = php_domxml.dll

So what we did was to comment out the PDFLib extension extension=php_pdf.dll in the php.ini file. After the modifications we restarted the apache and then the examples could be run on the XAMPP environment.

Share
Comments (5)

5 responses to “Setting up and getting DOMpdf to work in XAMPP on Windows”

  1. Vikram says:

    Oh man !!!!! Thanks a ton. I was breaking my head for around 3 hours.. that too all night from 2am to 5am.. its 6am already and i hit upon your blog just now. Removed the php_pdf.dll extension and everything works now!

    Yabadabadoooooo…. Thanks again 🙂

  2. Ferdinan says:

    Oooouuch… Finally I can solve it…
    I have spent my time all day just to solve it..
    Thanks bro.. 🙂

  3. Mandy says:

    Thanks for the hint. It helps me a lot. I was using curllib and had the same error. Very helpful!!

  4. nasim says:

    Fatal error: Call to undefined method domdocument::loadHTML() in D:xampphtdocsdompdfincludedompdf.cls.php on line 483

Leave a Reply

Your email address will not be published. Required fields are marked *

+ 26 = 33

Related:

Stay Updated

Please enter your details below to get
A Free Trial
x + x* =