473,225 Members | 1,329 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,225 software developers and data experts.

Call to undefined function: domxml_open_file()

Hi,

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).

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.

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!

- MS

Jul 21 '05 #1
2 18547
>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
Jul 21 '05 #2
Whilst your setup seems to be somewhat different from mine (I'm
actually in the process of learning FreeBSD, but still don't know
enough to use it for development); e.g. I don't have extensions.ini,
although there seems to be a section in php.ini to do the same thing;
basically, though, you hit the nail on the head:-

I had to install the **** thing... the RPM was even on the FC3 install
disks. Can't believe I wasted so much time over it >:-(

Two things threw me; firstly that phpinfo() indicated that it had been
compiled with domxml support, and the documentation seemed to imply
that this extension should be included as standard in PHP4. Perhaps I
misparsed it. Who knows....

Anyway, thanks!

- MS

Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Netocrat | last post by:
Any comments on the correctness of the statements 1, 2a, 2b, 3 and 4 in the code below? If they are correct, then the definition of an object as well as that of an lvalue is broken in C99 by the...
3
by: Cong Wang | last post by:
Hi,all! I found an interesting problem,it is that how to implement a C function which can be called once and return twice? Just like the POSIX function fork() or the library function...
7
by: Rafał Maj Raf256 | last post by:
There was a way to trinck program to call purly abstract non-existing method (causing undefined behaviour), I would like to try that for curiosity (how different compilers/platforms react), how to...
8
by: Cruella DeVille | last post by:
I'm writing a class to handle reading/writing from/to files like this (shortened) lass FileIO{ private $filename; private $mode; private $filePointer; private $dictionary; public function...
1
by: Paul | last post by:
alllow_url_fopen if set to off. For some reason I can not access domxml_open_file(). And I need to read an xml feed. I can access the feed using cURL: $feed =...
20
by: sam_cit | last post by:
Hi Everyone, I have the following code, int main() { int p = {10,20,30,40,50}; int *i = &p; printf("before : %p\n",(void*)i); printf("1 %d %d\n",*++i,*i++);
11
by: Felix Kater | last post by:
Hi, I can compile and run this code (see below) which twice calls the function f, first with too less, second with too much arguments. But is it legal and free of memory leaks and other...
9
by: CryptiqueGuy | last post by:
Consider the variadic function with the following prototype: int foo(int num,...); Here 'num' specifies the number of arguments, and assume that all the arguments that should be passed to this...
9
by: Yannick | last post by:
Hi everyone - I am not quite sure to understand what is really going on when a function defined in one translation unit calls a function defined in a different translation unit without knowing...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.