php-windows Digest 2 Jan 2003 08:04:06 -0000 Issue 1514

Topics (messages 17609 through 17614):

How to use SQLServer in PHP?
        17609 by: Nguyen Le Vinh

Re: Bundled GD - Gif support?
        17610 by: Christoph Petersen

Re: Subject: How to use SQLServer in PHP?
        17611 by: Neil Smith

UDP packet
        17612 by: Torben Dehn
        17613 by: Torben Dehn

Re: Win 2K and SP 3
        17614 by: Leon

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 all,

I want to program some PHP pages in WinXP but I can't connect to SQLServer.
Can you help me?

VINHNL, [EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
Brian Weil wrote:
> I'm trying to use imagecreatefromgif() on WIN 2000 / php4.3 /
> php_gd2.dll,
> but I get the error:
> Fatal error: Call to undefined function: imagecreatefromgif()

The Gif support isn't longer available.
So you have to use *.png.

Regards Christoph

--
Liebe ist es auch nach einem BlueScreen zu behaupten, es gbe keine
Alternative.

Christoph Petersen
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
At 12:38 01/01/2003 +0000, you wrote:
Message-ID: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
From: "Nguyen Le Vinh" <[EMAIL PROTECTED]>
Date: Wed, 1 Jan 2003 19:35:51 +0700
Subject: How to use SQLServer in PHP?

Hi all,

I want to program some PHP pages in WinXP but I can't connect to SQLServer.
Can you help me?
Realistically, no, not without more information about what problem you are having and what you have tried so far :-P
--- End Message ---
--- Begin Message ---
Hello !

I am very new to PHP so please don't laugh if my code really sucks ;=)

What i am trying to do is :

1) Opening an UDP connectin to a server (That works allright)
2) Making a query to the server (That works allright)
3) Recieve an unknow number of UDP packets with an unknown packet size (This
is my problem)

I don't know the packet size and i don't know how many packets the server
will return...
Take a look at the WHILE loop because thats where it "hangs".
If i remove the WHILE loop and just make a fread($socket,1024) it will
return some data.

My questions  are as follow :
1) How can i make sure that ALL data has been recieved ?
2) Is it possible to read each UDP packet into it's own variable (array) ???

I would be very happy if someone could answer one or all question.


<?
$ip      = "192.246.40.65";
$port    = 27950;
$command = "getservers 60 empty full";
$data    = '';

Echo "Connecting to Master Server : $ip:$port<br>";
$socket = fsockopen("udp://$ip",$port,$errno,$errstr,2);
if (!$socket)
 {
   echo "There was an error connecting to the Master Server<br>";
   echo "Error returned was : $errorno and $errostr";
   exit;
 }  //Socket error
 else
 {
   echo "Connection established ..<br>";
   If (!fwrite($socket,$command))
  {
    echo "There was an error querying the master server ..";
    exit;
  } //Fwrite error
 echo "Query complete ..<br>";

while (!feof($socket))
 {
    echo "Reading data ..<br>";
    $data .= fread($socket,4096);
  }  //End of read section

  echo "$data<br>";

   fclose($socket);
   echo "Connection closed ..<br>";
 } //End of main loop

?>


--- End Message ---
--- Begin Message ---
I forgot to include some data  :
This is how a "packet" of data looks like, but the number of bytes may be
diffrent for each packet

getserversResponse\ƥ\m8\٬q
\±}%m:\2$m8\@$:m9\<Q?[m8\BvEzmN\.=m9\1"m8\@#Zm8\im8\ݮq#\'
j2\B-#m8\B\?m=\QR m8\f`9\(xm8\JSHm8\'+"m8\P
m8\?zm8\>J]m8\6m<\?1mN\>J m8\m[SN \̝Sm8\?zm9\عbm8\ݰ(q
\ݰ(q"\BvEzmD\Pom8\ݮq"\Ѫ[ k\ݮq \? m\'
'i?\Pfm8\>Pmmt\,Q\ +` m:\B-j u&\ Q1m.\
ƪm=\?z4m8\?FV\>[em:\4 u&\m\m8\^?m9\@mD\'j9\@
?Jma\BSYm9\uSm9\?m8\- \ݥq%\m8\ݥq#\#Dm8\>J\C':Bm8\>
Pohm?\@ m8\B-m8\uSm8\Q"iO\bmL\>0i?\>]Fiy\B-llm8\Zm8\ݯ,q
\ͱ *m8\>]Fi?\BSYm8\@^ "u&\N,m=\̝ m8\Aqvau\qai>\+m9\±|xm9\
m8\.=m<\,[m:\@^ Ju&\@Q4m8\̝Jm8\B-li\>Ppm~\Gm8\(+m8\[-m8\H
Nm8\N\̝ m8\B-m8\Ѫ} k\,3mB\uSm:\?zm8\~|nl\EOT


--- End Message ---
--- Begin Message ---
Hi Todd

I have to disagree with you.... I have 4 Win2K servers running Apache
2.0.43 and PHP 4.2.3.
Ask yourself the following questions (and more :))
1. Do I use FAT or NTFS
2. Am I using the correct file permissions on the php.ini and the
php.exe(CGI)
3. Is the php.ini available to All Users
4. Have I included the app handle in the httpd.conf
5. DO I GET AN ERROR...if so what?
6. Have I included the dlls in the Systemroot\system32 dir

These questions should help you towards the solution. For all you know you
SP3 machine might use NTFS and the other uses FAT... Then check file
permissions, etc etc....

Hope this helps
Cheers

Todd Cary wrote:

>   After wasting a day on trying to get Apache to load PHP, I discovered
> what I believe to be the probllem, but no solution: M$!!!
>
> I have another box that has Win 2K running on it *AND* it does not have
> SP 3!  Apache loads like a dream and so does PHP!!!!
>
> So, there is something in the new security of XP and Win 2K SP 3 that
> does not let the dll load and run.  Ever since I loaded SP 3 I have had
> problems - like many others!
>
> Now to figure why it will not let Apache load and run the dll?
>
> Todd
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--
Leon Jansen van Nieuwenhuizen
Personal Computing Services
Information & Communication Technology Services
University of Cape Town
Email: [EMAIL PROTECTED]
__________________________
__________________________


--- End Message ---

Reply via email to