Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOMDocument errors (start tag expected, param 2 long)

Status
Not open for further replies.

lijil

Programmer
Jun 9, 2004
16
CA
I am running PHP 4.3.11 on Windows 2000.

I am unable to create a new DOMDocument object. I receive one or more of the following errors:

domdocument() expects at least 1 parameter, 0 given in

domdocument(): Start tag expected, '<' not found in

domdocument() expects parameter 2 to be long, string given in

Am I missing something here? I have set the extension_dir and extension=php_domxml.dll lines in php.ini, as well as copied the iconv.dll file into my php directory.
 
Code sample:

$foo = new DOMDocument;

It doesn't get more simple than that. This is apparently valid since it is used in various code examples for the object on php.net.

Also, php is running via php.exe not ISAPI.
 
Check in the phpinfo() output if DOMXML or the much newer DOM functions are compiled.
 
Also, try:
Code:
$doc = domxml_new_doc('1.0');
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top