The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DOM XML with PHP 4.4.1? How?

Discussion in 'General Discussion' started by jols, Feb 21, 2006.

  1. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    DOM XML with PHP 4.4.1? How?

    I've got a hosted customer who needs this fast. We have PHP 4.4.1 installed, but I am not sure how to fully implement DOM XML. I've looked over the threads here for close to an hour now, and still can't find anything really useful.
     
  2. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Make sure libxslt-devel installed on your server. Then you'll need to re-compile Php manually, at the prompt.
     
  3. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    To be honest I am not sure how to re-compile php manually. I have always just used the Apache Update link in WHM when I need to do this.

    Also, does this have anything to do with the Dom XSLT option?

    Thanks again!
     
  4. camillemoussett

    Joined:
    Oct 19, 2004
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I am having a similar issue trying to install/enable XML DOM with PHP 4.4.2. I did run Apache Update in WHM with the options Dom XSLT and XML RPC checked, but without success.

    phpinfo() shows that the DOMXML extension is enabled but the following PHP code

    $doc = new domdocument('1.0');

    produces this error:

    Warning: domdocument(): Start tag expected, '<' not found in ... [file.php]


    running WHM 10.8.0 cPanel 10.8.1-S114

    thanks
     
  5. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    This error is a syntax related. For more information, read DOM XML functions, especially the user-notes, in the this document, very carefully and follow instructions: http://uk2.php.net/dom xml
     
  6. camillemoussett

    Joined:
    Oct 19, 2004
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Andy,

    I got it working with different DOM XML functions.

    $doc = domxml_open_file("file.xml")
     
  7. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38

    Okay, so all you did was rebuild apache via WHM with Dom XSLT and XML RPC checked?
     
  8. camillemoussett

    Joined:
    Oct 19, 2004
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    yes I updated Apache via WHM with the Dom XSLT and XML RPC checked.

    I later installed the libxslt-devel package (Install RPM), then reran Apache Update with the same options checked. Don't know if it helped or not.
     
  9. jackal

    jackal Well-Known Member
    PartnerNOC

    Joined:
    Feb 23, 2002
    Messages:
    708
    Likes Received:
    0
    Trophy Points:
    16
    Hello we are having a simliar issue with this, we have complied it into php and we have also install the rpms and we get the following errors.

    Warning: domxml_xslt_stylesheet_file(): Undefined variable in /home/username/public_html/include/main.inc on line 35

    Warning: domxml_xslt_stylesheet_file(): compilation error: file ../templates/library.xsl line 177 element a in /home/username/public_html/include/main.inc on line 35

    Warning: domxml_xslt_stylesheet_file(): Attribute template onclick: failed to compile $current-theme-title in /home/username/public_html/include/main.inc on line 35

    Fatal error: Call to a member function on a non-object in /home/username/public_html/include/main.inc on line 76

    The 2 lines are as follows


    35 & 36

    PHP:
    $stylesheet domxml_xslt_stylesheet_file($xslt);
    $xmlDoc $dynamicXML domxml_open_mem($xml) : domxml_open_file($xml);

    76 -79

    PHP:
            $result $stylesheet->process($xmlDoc$xsltParams);
            print(
    $stylesheet->result_dump_mem($result));
        }
    ?>

    Also noticed this in the htaccess file.

    RedirectMatch permanent ^/java/src/org/user/servlet/CacheFilter.java$ http://www.domain.org/work/java/

    RedirectMatch permanent ^/java/src/org/user/servlet/XSLTransformer.java$ http://www.domain.org/work/java/

    Any ideas?
     
Loading...

Share This Page