compile php5 with DOM

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
harrym
Forum Newbie
Posts: 7
Joined: Thu Oct 29, 2009 11:01 am

compile php5 with DOM

Post by harrym »

Hi,

I can't manage to compile php 5.3.0 from source on Windows to include DOM,
in spite of the documentation saying that DOM is built into PHP5.

I'm compiling php 5.3.0 using the following minimalistic options:

configure.js --without-sqlite --enable-cli --enable-debug --disable-ipv6 --enable-pdo

However, my compiled PHP can't pass even the following test for DOM:

<?php
$doc = new DOMDocument();
?>

where I'm getting the following error message:

PHP Fatal error: Class 'DOMDocument' not found in C:\Inetpub\wwwroot\test.php on line 2

Does somebody know what I'm doing wrong?

Thanks in advance for your help.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: compile php5 with DOM

Post by requinix »

It probably doesn't know where libxml2 is.

Code: Select all

--with-libxml-dir=
harrym
Forum Newbie
Posts: 7
Joined: Thu Oct 29, 2009 11:01 am

Re: compile php5 with DOM

Post by harrym »

Thanks for your answer.
While this parameter doesn't exist any more, you were totally correct that libxml2 and others were missing from my environment.

For future readers, the full answer is at Compile your own PHP on Windows on http://forums.clantemplates.com/showthread.php?t=145099.
Post Reply