Hi.

I will be needing to use SOAP in the very near future, to test if it was installed I copied and pasted the following code; http://scripts.incutio.com/google/ I would have expected google to give an error if it had existed, or a PHP error if not.

It gave the following error;

Warning: main(SOAP/Client.php): failed to open stream: No such file or directory in D:..........\test.php on line 19

Warning: main(): Failed opening 'SOAP/Client.php' for inclusion (include_path='.;c:\php4\pear') in D:................\test.php on line 19

Fatal error: Cannot instantiate non-existent class: soap_client in D:................\test.php on line 27

Great - it's not installed... Untill someone told me it must be installed, because it comes with all new PHP versions, and the include path is preset as c:\php4\pear

The problem is with this line;

include("SOAP/Client.php");

I guess the file doesnt exist, perhaps the include path is wrong?

I have searched, the phpinfo() page and found nothing relating to SOAP, the only thing relating to PEAR was the include path.

Do you think it needs to be installed, settings incorrect, or my mistake?

Thanks!

    Kold wrote:

    I guess the file doesnt exist, perhaps the include path is wrong?

    Why don't you look for a file called c:\php4\pear\soap\client.php?
    if the path starts with c:\ it almost for sure is your local drive... 😉

    btw:

    phpinfo();

    shows you the name of the php.ini file uesed
    there you can change the include path (i suppose it's something on drive d: as that's how the error message continues...)

      If you make any changes to your php.ini file reboot your server.

      Just my 5 cents

        Its a windows 2000 server, I dont have direct access to it, just FTP to IIS /www/ directory.

        Anything else?
        Thanks!

          Just a quick question;

          include("SOAP/Client.php"); 

          I dont have that file in my webspace, am I correct in assuming it needs to be in the include directory (c:\php\pear)?

          Thanks

            You are correct!

            The SOAP package can be downloaded from the Pear site .

            Download all of the files and copy them into c:\php\pear

            Or better still get the PEAR installer working. That will check for dependancies and such.

              Thanks!

              I checked with the webhosts and the include path is wrong. They told me the proper one, but haven't changed the include path!

              Is it possible to use the path given to me? i.e. c:........\pear I will ask them to change the include path anyway, but it would be very handy to know, because they'll probably mess it up! :-p

              Thanks for the help!!
              K.

              [EDIT]
              Yup, they did mess up :rolleyes:
              I am able to change it using ini_set() so it doesnt matter.

                The second problem I have is that SOAP/Client.php seems to include other files. I receive the following error;

                Warning: main(HTTP/Request.php): failed to open stream: No such file or directory in 27

                I'm pretty sure I know the answer to this one. I'm only asking because I dont want to make a fool of myself on the phone to the webhosts :-p

                I need them to install the HTTP Request package from here; http://pear.php.net/package/HTTP_Request ??

                I am still very unsure about all this stuff. It would have made sense to include the above file with SOAP/Client.php ;-)

                  Thats what I was talking about previously with the PEAR installer.

                  Within PEAR, packages are dependant on other packages. With some of them there could be quite a lot of dependancies. For example if you install the HTTP package it is more than likely dependant on something else.

                  The GO-PEAR package manager will check all of this and install all dependancies for you.

                  The PEAR manual shows how to setup the manager.

                  This is the easiest way to install PEAR packages.

                    Write a Reply...