You are here: Re: Call to undefined function: domxml_open_file() « PHP Programming Language « IT news, forums, messages
Re: Call to undefined function: domxml_open_file()

Posted by Gordon Burditt on 07/21/05 04:15

>I'm using PHP 4.3.9 with Apache 2.0, and keep getting the error
>
>"[client 127.0.0.1] PHP Fatal error: Call to undefined function:
>domxml_open_file() in /var/www/html/php/domtest.php on line 8" (from
>the Apache error log).

The extension you are trying to use is not configured or not installed.

>Here's the page itself:-
>
><html>
><head><title>TEST</title></head>
><body>
><?php
> $foo = domxml_open_file("test.xml");
> echo "LOOKS LIKE IT WORKED";
>?>
></body>
></html>
>
>Calling domxml_new_doc() instead fails similarly.

In order to run an extension, you need (path names are
for FreeBSD, yours may vary for Linux):
(a) The extension PHP module (in this case, xml.so)
in /usr/local/lib/php/20020429/
(b) A line in /usr/local/etc/php/extensions.ini containing
a line for the extension: extensions=xml.so
and it must not have a semicolon in front of it.
(c) Any library/libraries required by the extension, in
this case: /usr/local/lib/libxml2.so

After you have fixed any of these, stop and restart Apache.

>I've checked the version of libxml2 (libxml2.so.2.6.14, which should
>work; the PHP docs mention "libxml", not "libxml2", but references
>elsewhere imply that they meant libxml2). I'm running the whole
>caboodle under Fedora Core 3 Linux.
>
>(And yes, I know that DOM XML is deprecated; but (a) I'm running PHP4,
>not 5, and more importantly (b) The person I'm developing for wants it
>to run under PHP4).
>
>Perhaps I've missed something particularly obvious, but this is really
>doing my head in, and I'd appreciate some pointers. Thanks!

Gordon L. Burditt

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация