How do I install domxml with PHP4?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bissatch@yahoo.co.uk

    How do I install domxml with PHP4?

    Hi,

    I have recently installed PHP4 with Apache2. Currently I am trying to
    install the DOMXML extension. According to what I have read, if I
    uncomment the extension=php_d omxml.dll line in php.ini (ensuring that
    extension_dir is correct and that the file is definitely in that
    folder) and then restart apache this should install domxml in PHP.

    Now! when I do phpinfo() it tells me that domxml is enabled (good).
    Unfortunetely, when I try the following:


    domxml_open_fil e('xml/menu.xml');


    ....I get the following error:


    Warning: domxml_open_fil e(): I/O in C:\Program
    Files\Apache\Ap ache2\htdocs\cs p\home\index.ph p on line 28

    Warning: domxml_open_fil e(): warning : in C:\Program
    Files\Apache\Ap ache2\htdocs\cs p\home\index.ph p on line 28

    Warning: domxml_open_fil e(): failed to load external entity
    "../xml/menu.xml" in C:\Program
    Files\Apache\Ap ache2\htdocs\cs p\home\index.ph p on line 28


    Is there any reason why PHP4 would struggle with this line? Is there
    anything else that I need to do to install domxml? Cheers

    Burnsy

  • bissatch@yahoo.co.uk

    #2
    Re: How do I install domxml with PHP4?

    Well, anyone?

    Comment

    • Dave

      #3
      Re: How do I install domxml with PHP4?

      (bissatch@yahoo .co.uk) decided we needed to hear...
      <snip>[color=blue]
      > Warning: domxml_open_fil e(): I/O in C:\Program
      > Files\Apache\Ap ache2\htdocs\cs p\home\index.ph p on line 28
      >
      > Warning: domxml_open_fil e(): warning : in C:\Program
      > Files\Apache\Ap ache2\htdocs\cs p\home\index.ph p on line 28
      >
      > Warning: domxml_open_fil e(): failed to load external entity
      > "../xml/menu.xml" in C:\Program
      > Files\Apache\Ap ache2\htdocs\cs p\home\index.ph p on line 28
      >
      >
      > Is there any reason why PHP4 would struggle with this line? Is there
      > anything else that I need to do to install domxml? Cheers
      >
      > Burnsy[/color]

      Try using a full path to the xml file. Read the manual page for
      more info...
      PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.

      --
      Dave <dave@REMOVEbun dook.com>
      (Remove REMOVE for email address)

      Comment

      • bissatch@yahoo.co.uk

        #4
        Re: How do I install domxml with PHP4?

        Instead, I used the following (taken from the manual):

        $showfile = file_get_conten ts($path . "/" . $fileName);

        if(!$domDoc = domxml_open_mem ($showfile)) {
        echo "Couldn't load xml...";
        exit;
        }

        It still allows me to use relative paths. Cheers

        Burnsy

        Comment

        Working...