Troubles in XML Tree (pear paggage)
| From: | Salapuro Veli-Matti | Date: | Wed, 03 Sep 2003 13:36:59 +0000 |
| Subject: | Troubles in XML Tree (pear paggage) | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-7562@lists.php.net to get a copy of this message | ||
Hi there !
I have installed Apache 2, PHP 4.3.4 and MySQL on my WinXP (+
SP-1) -machine.
Now I am trying to install XML Tree with then help of Dev Shed:
Building XML Trees With PHP by icarus.
My PHP in a module of Apache, not an EXE-file. Is all the needed
with my PHP installation ? I have c:\php\pear\Tree folder.
I have there Tree.php-file. I have also Parse.php-file there.
My Include paths are c:\php\includes and c:\php\pear
I still get then error: PHP Fatal error: Cannot instantiate
non-existent class: xml_tree in C:\Apache\Apache2\htdocs.....
I can include files from the path, Tree.php can echo me "hello" to
the screen, but I can't get anything like in the icarus's tutorial:
<?php
include("Tree/Tree.php");
$tree = new XML_Tree();
$root =& $tree->addRoot("superhero");
$name =& $root->addChild("name", "Peter Parker aka Spiderman"); $age
=&
$root->addChild("age", 21);
$tree->dump();
?>
this should produce:
<?xml version="1.0"?>
<superhero>
<name>Peter Parker aka Spiderman</name>
<age>21</age>
</superhero>
... only I get is the error above in the error_log of Apache. ...
I am not familied with PEAR yet, PHP for one year. I think I need
some help now !
I would be wery greatfull if I could get some help. I can't go
forward any more.....
... and when I changed 3. row to: $tree = new Tree();
I got the error message: Call to undefined function: addroot() in
C:\Apache\Apache2\htdocs\XMLte...
I can't find those modules; addRoot, addChild at all ? Where are
they ? Is it so that I must have a exe-version of PHP and
not Apache module version ? I thin now I'm lost ...... I have
done installation again and again, but nothing helps ...
Veli-Matti Salapuro
###########################################
This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/