lists.netmrg.net lists.netmrg.net
NetMRG discussion and support
 
FAQ :: Search :: Memberlist :: Usergroups :: Register
Profile :: Log in to check your private messages :: Log in

source build XML problem

 
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support
Author Message
trevarthan
Beginner


Joined: 15 Nov 2004
Posts: 6

PostPosted: Mon Nov 15, 2004 3:38 am    Post subject: source build XML problem Reply with quote

Hello,

I'm trying to get a source tar.gz of NetMRG built and running on my Gentoo Linux machine so I can use it at work and make an ebuild for the Gentoo community.

netmrg-0.18.2 builds without blatant errors. Unfortunately, my /usr/local/etc/netmrg.xml file doesn't seem to be getting read properly. When I go to http://localhost/netmrg, I get the following error:

Warning: main(/webfiles/images/default/imagespec.php): failed to open stream: No such file or directory in /usr/local/var/www/netmrg/include/config.php on line 75

This, I believe, is being caused by the fact that my fileroot GLOBAL isn't being set properly at line 1289 (or close to that line. I may have modified that file in testing) in lib/processing.php:

$GLOBALS["netmrg"]["fileroot"] = $xmlconfig["NETMRG"][0]["PATHS"][0]["WEBFILEROOT"][0]["VALUE"];

I can code a little, and I've done some `print` testing at various points, and none of the .xml file config vars are getting populated correctly, but I receive no XML or PHP errors on the web page or in my apache2 logs.

Here is my software environment:

# uname -a
Linux isaac 2.6.9-gentoo-r1 #1 Sat Nov 13 01:59:09 EST 2004 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux

* net-www/apache
Latest version available: 2.0.52-r1
Latest version installed: 2.0.52-r1
Size of downloaded files: 6,779 kB
Homepage: http://www.apache.org/
Description: Apache Web Server, Version 2.0.x
License: Apache-2.0

* dev-php/php
Latest version available: 4.3.9
Latest version installed: 4.3.9
Size of downloaded files: 3,908 kB
Homepage: http://www.php.net/
Description: PHP Shell Interpreter
License: PHP-3

* dev-php/mod_php
Latest version available: 4.3.9
Latest version installed: 4.3.9
Size of downloaded files: 3,908 kB
Homepage: http://www.php.net/
Description: Apache module for PHP
License: PHP-3

* dev-libs/libxml2
Latest version available: 2.6.15-r1
Latest version installed: 2.6.15-r1
Size of downloaded files: 2,844 kB
Homepage: http://www.xmlsoft.org/
Description: Version 2 of the library to manipulate XML files
License: MIT

Any ideas??
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Mon Nov 15, 2004 3:26 pm    Post subject: Reply with quote

How modularized is PHP in Gentoo? I know on other distributions, we need a package similar to 'php-xml.' Does something like this exist for Gentoo as well?

-Doug
Back to top
trevarthan
Beginner


Joined: 15 Nov 2004
Posts: 6

PostPosted: Mon Nov 15, 2004 4:14 pm    Post subject: Reply with quote

No. There is a dev-php/phpxmlrpc, but that is not what we're looking for, I think.

I've watched the PHP build process on my Gentoo machine, and it configures with --with-xml.
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Mon Nov 15, 2004 8:15 pm    Post subject: Reply with quote

First order of business is to locate the include/config.php file and verify that the $prefix variable is correct, and that the $GLOBALS["netmrg"]["xmlfile"] points to the correct file with your configured prefix.

Next is to check the syntax of your xml config file. On my linux boxes, I have a command called xmlwf that will check if your xml file is 'well formed.' It's usually called something like the following:
Code:
$ xmlwf /usr/local/etc/netmrg.xml
$ echo $?

The command doesn't output anything, so the echo $? should echo '0' if there were no errors,

If that's fine, we'll need to see if we're even parsing your file correctly. In the 'lib/processing.php', locate the function GetXMLConfig(). After the line
Code:
$xmlconfig = GetXMLTree($GLOBALS["netmrg"]["xmlfile"]);

add,
Code:
var_dump($xmlconfig);

and refresh your browser. The output of this is potentially sensitive, so you will either want to edit the output before posting, or email it to me directly.

-Doug
Back to top
trevarthan
Beginner


Joined: 15 Nov 2004
Posts: 6

PostPosted: Tue Nov 16, 2004 4:29 am    Post subject: Reply with quote

1.) $prefix = "/usr/local";
2.) $GLOBALS["netmrg"]["xmlfile"] = "${prefix}/etc/netmrg.xml";
(and that is correct)

3.) # xmlwf /usr/local/etc/netmrg.xml
/usr/local/etc/netmrg.xml:23:14: not well-formed (invalid token)

BINGO! This should be in the install doc somewhere. I kept thinking this might be the problem last night, but I wasn't sure because I didn't know how to verify the xml file.

Thanks! It works now!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support All times are GMT
Page 1 of 1

 



smartBlue Style © 2002 Smartor
Powered by phpBB © 2001, 2002 phpBB Group