473,396 Members | 1,929 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,396 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 18556
>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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.