ID:               20894
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Verified
 Bug Type:         Sockets related
 Operating System: Win XP
 PHP Version:      4.3.0RC2
 New Comment:

Some more info:

When compiled in debug mode MS VC++ comes with the following debug
error:

"The value of ESP was not properly saved across a function call. This
is usually a result of calling a function declared with one calling
convention with a function pointer declared with a different calling
convention".

The error occurs in ext/sockets/sockets.c line 792.


Previous Comments:
------------------------------------------------------------------------

[2002-12-09 04:44:36] [EMAIL PROTECTED]

The example that does not depend on custom apps:

$socket = socket_create (AF_INET, SOCK_STREAM, 0);
if ($socket < 0) {
  echo "socket_create() failed: reason: " .
    socket_strerror ($socket) . "\n";
}

$result = socket_connect ($socket, "www.google.com", 80);
if ($result < 0) {
  echo "socket_connect() failed.\nReason: ($result) ".
socket_strerror($result) . "\n";}

$command = "HEAD / HTTP/1.0\r\n\r\n";
socket_write ($socket, $command, strlen($command));

while($data == ""){
  if (!($data = socket_read ($socket, 2048))) die("Socket disconnected
by the host.");
}

echo $data;
socket_close($socket);

------------------------------------------------------------------------

[2002-12-09 02:14:30] [EMAIL PROTECTED]

Hi,


I'm doing an web application which connects to a delphi app by using
sockets to transmit data. My delphi program will reply automatically
when it receive a data. However, after i upgraded to PHP 4.3.0RC2, it
doesn't work and came out this error-

PHP has encountered an Access Violation at 00000001

Below here are my codes that use to connect to the delphi program.

$add="180.10.0.1"; //ST8000 machine's ip address
$port="5000";
$rc_no=50;
global $chr;
$chr = "";
$changes=0;
$data = "";


$socket = socket_create (AF_INET, SOCK_STREAM, 0);
if ($socket < 0) {  echo "socket_create() failed: reason: " .
socket_strerror ($socket) . "\n";       }

@$result = socket_connect ($socket, $add, $port);
if ($result < 0) {  echo "socket_connect() failed.\nReason: ($result) "
. socket_strerror($result) . "\n";}

$Command = "..... data use to send to delphi......"
socket_write ($socket, $Command, strlen ($Command));

//----------starting from this line where the error occur
While($data == ""){ 
If (!($data = socket_read ($socket, 2048))) die("Socket disconnected by
the host.");   
}
                                                
echo $data;

socket_close($socket);


The code had no problem since it can be run on PHP 4.2.3, Win XP, mysql

------------------------------------------------------------------------

[2002-12-08 22:42:37] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.




------------------------------------------------------------------------

[2002-12-08 22:21:29] [EMAIL PROTECTED]

I use socket to develope my web application. It works fine when i'm
using PHP 4.2.2. The problem is when i ugraded it to 4.3.0RC2, there's
an error stating -

PHP has encountered an Access Violation at 017C29CD

Does PHP 4.3.0RC2 have a stable socket dll?

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=20894&edit=1

Reply via email to