I'm trying to open an https url with the fopen() function. For this I use the php_openssl.dll extension which I load with the dl() function.

When I run the script I get an "No such file or directory in" error on the line where the fopen() is.

Some info:
Windows 2000 Professional + SP3 (server)
Internet Information Services
PHP version 4.2.1

Does anyone know what it wrong?

tia/

    Hi,

    could you post your source code here ?

    Hervé.

      Here ya go:

      <?
      require("xmldom.inc");
      
      dl("php_openssl.dll");
      
      $url = "https://www.black2lip.com/dump/code.xml";
      
      $fp = fopen($url,'r');
      $data = fread($fp,"4096");
      fclose($fp);
      
      $dom = new xmldom($data);
      
      if ($error = $dom->get_child("ERRORLIST")) {
        for ($i=0;$i<count($error->childs);$i++) {
          echo "<b>action aborted</b><br>";
          echo "Error: ".$error->childs[$i]->attrs[MSG]."<br>\n";
        }
      } else if( $child = $dom->get_child("ID") ) {
        $pci = $child->attrs[VALUE];
      
        $sql = "UPDATE link_pci SET pci='".intval($pci)."', status='STARTED'  WHERE id='".intval($id)."';";
        $res = mysql_query($sql,$con);
      
        if (mysql_affected_rows($con) == "0") {
          echo "<b>action aborted</b><br>unable to modify record # ".intval($id);
        }
      } else {
        echo "<b>action aborted</b><br>no XML data returned, please contact the administator: ".ltrim(rtrim(strtolower($ADM_EMAIL)))."";
        AdminMail("Error: No XML data returned",$user,$id,$url,getenv("SCRIPT_NAME"));
      }
      ?>

        The dl() function does NOT properly work in multithreaded
        servers, such as IIS or Zeus, and is automatically disabled
        on them.

        May be setting :

        enable_dl = On

        in your php.ini will be enough ?

        Hervé.

          Its allready on:

          enable_dl = On

          I also tried loading the php_openssl.dll in the php.ini instead of the script itself but got the same error 🙁

            well, may be it's not an option, but the solution seems
            to go to Apache ...

            here :

            http://www.php.net/manual/en/ref.openssl.php

            in the first user's comment, there's a lot of good advice
            on how to set up Apache + OpenSSL + PHP on Win32
            platform.

            Hervé.

              Gonna try to find another solution first, the Apache solutions isn't the most wishable solution.

              Thnxs for your time m8

                Write a Reply...