php-windows Digest 10 Jan 2002 05:37:56 -0000 Issue 945

Topics (messages 11361 through 11364):

php & sockets! helpp
        11361 by: Sandeep Murphy

Re: gettext() problems
        11362 by: Nicole Amashta

Re: Browser problem
        11363 by: Nicole Amashta

socket_set_timeout() is not supported
        11364 by: Greg

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---

Hi,

I am opening a socket on a remote server(weblogic) and sending my username
and psswd to authentify them...

I figure my php is opening the socket as no errors r being trapped.. However
the response is a blank page instead of an xml formatted response...why???
how can i rectify this??

Please helpp!!!

TIA,
sands
my code is as below:


<?php

$uname = "username";
$password = "password";

?>



<?php

$Destination = "http://srv157:7001/communicatorServlet";;
$Request = "username=$uname&password=$password";
$cfgTimeOut    = 20;

        $theURL = parse_url($Destination);
        $host = $theURL["host"];
        $path = $theURL["path"];
        $port = $theURL["port"]; if ($port=="") $port=80;
        $header  = "GET ".$path." HTTP/1.0\r\n";
        $header .= "Host: ".$host."\r\n";
        $header .= "Accept: */*\r\n";
        $header .= "Accept-Language: en\r\n";
        $header .= "User-Agent: PHP/4.0.6 (Apache/1.3.20)\r\n\r\n";
        $header .= "Content-Type: text/xml\r\n";
        $header .= "Content-Length: ".strlen($Request)."\r\n";
        $header .= "Content: \r\n\r\n";
        $msg = $header . $Request;
        $Response = "";
        
        
        
        // open a socket
if(!$cfgTimeOut)
    // without timeout
    $fp = fsockopen($host,$port);
else
         // with timeout
    $fp = fsockopen($host,$port, &$errno, &$errstr, $cfgTimeOut);
        
                
        if ($fp) {
                  if (!fputs($fp,$msg,strlen($msg))) { return false; }  // S
E N D
                  
                  while (!feof($fp)) {$Response .= fgets($fp,32768);} 
                  
fclose($fp); // R E C E I V E

                  } else 
                  {
                  echo "Unable to access servlet (".$Destination.").<br>";
                  
                                  echo "<a
href=\"javascript:history.go(-1)\">Try another</a>";}

                                  print "$response\n";
                                  
                                  print "hello";
?>
--- End Message ---
--- Begin Message ---
Make sure you have the extension path set correctly in your php.ini. I
believe it defaults to:    .

If your extensions (.dll's) are in c:\php\extensions, then make sure the
path in your php.ini reflects that path.

Nicole Amashta
www.aeontrek.com
=============

"Alan McFarlane" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm having problems accessing the gettext library with PHP 4.1.0 running
on
> Apache 1.3.22 (Win32).
>
> After enabling the gettext extension by altering php.ini to read:
>
> ...
> extension=php_gettext.dll
> ...
>
> and restarting Apache, I get the following error message.
>
> Unable to load dynamic library 'c:\php\extensions/php_gettext.dll' - One
of
> the library files needed to run this application cannot be found.
>
> I've checked that the file does indeed exist, and have verified that it
was
> as supplied in the 4.1.0 binary distribution from PHP.net.
>
> Anyone got any clues as to how to fix this one?
>
> --
> --
> Alan McFarlane
> [EMAIL PROTECTED]
> ICQ: 20787656
>
>


--- End Message ---
--- Begin Message ---
Can you specify what your PHP script is doing? Does it have a login form or
something?


"Sichta Daniel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> cfg:w2k,IIS, php4.06.
> When I'm using IE as a web browser on my developing sites everything is
OK.
> But when I try to use NN or Opera it always want's from me user name and
> password. Does anybody know what's problem ?
>
> Dan
>
> IMHO: I think it's in IIS cfg, but not for sure !!!
>


--- End Message ---
--- Begin Message ---
Hi!


Please help me.
"Warning: socket_set_timeout() is not supported in this PHP build in ....."



Can I use function socket_set_timeout() on win32?

Or may it be something in php.ini...and if not is there another way to get
around it?



Thanks,






--- End Message ---

Reply via email to