SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Consuming Web Services with PHP.

    The devil is in the details:

    I found a minor error in

    20.php

    in the Object Oriented PHP solutions volume II chater 2 section

    "How do I build a SOAP server with PHP"?

    Line 20 is:
    require_once('ExampleApps/SOAPArticleserver.php');

    It shall be:
    require_once('ExampleApps/SOAPArticleServer.php');

    Then 20.php and 21.php function fine. This is excellent. It is the future:

    Look on OopSchool in my signature for more information on Web Services. There you will also find links to important web services providers.

    SOAP is the preferred method, but I found some errors in the other example files in chapter 2 stareting with 4.php. I get the following error:

    Fatal error: Call to undefined function domxml_open_file() in /usr/home/web/wno134614/XML/4.php on line 6

    That does not function on my test server PHP 5.0 or on my webserver PHP 5.14

    When I Google:

    domxml_open_file site:www.sitepoint.com

    I find this thread that indicates:

    "It's because the version of PHP you are running does not support DOMXML. Not many versions did or do".

    and

    "DOMXML is an extension of PHP4. Depending on your system it can be added via .dll's and changing the php.ini in Windows or recompiling PHP and editing the php.ini on unix/linux systems.

    It's great if it's installed but not many distributions have it. For a long time it was considered experimental and now although it is a mature extension it will not continue into later versions of PHP; ie: PHP5".

    Does anybody know of a fix to these errors?

  2. #2
    Non-Member I87's Avatar
    Join Date
    Mar 2006
    Location
    UK
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://us3.php.net/domxml_open_file

    PHP 4 >= 4.2.1, PECL

    I think that means it's only been on those versions, if so abandend the script completely and look for another one. There will be a good reason why they've removed it, lol



    if you're not on shared hosting though I'm sure you can install the extension onto the latest PHP version...

  3. #3
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So it means that the function(s) have been moved to PECL. I am on a shared hosting.

    "The DOM XML extension has been overhauled in PHP 4.3.0 to better comply with the DOM standard. The extension still contains many old functions, but they should no longer be used. In particular, functions that are not object-oriented should be avoided".

    My underline.

    Related thread: Zend internal debugger and xml

    I think I stop here since I got the SOAP server to function.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •