Bug #17937 Updated: Socket Failure
| From: | jason@php.net | Date: | Mon, 01 Jul 2002 19:31:58 +0000 |
| Subject: | Bug #17937 Updated: Socket Failure | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-12698@lists.php.net to get a copy of this message | ||
ID: 17937
Updated by: jason@php.net
Reported By: vardhamansdesai@yahoo.com
-Status: Open
+Status: Bogus
Bug Type: Sockets related
Operating System: Linux 7.1
PHP Version: 4.2.1
New Comment:
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php
Thank you for your interest in PHP.
This is not a bug report
Previous Comments:
------------------------------------------------------------------------
[2002-06-24 00:22:40] vardhamansdesai@yahoo.com
Hello,
I am developing a Chat Application Program in PHP ( Server ) and VB
( Client ) using Socket Programming using Red Hat Linux Server 7.1.
I need to send a message from PHP to VB Client through Socket
Program. Here i have a piece of code where in which i am connecting to
the server to port 9024 and trying to send a simple message "hello" to
the Client VB. This code works fine of sending this message through
socket from PHP to VB in localhost working on Win NT platform.The
Client VB recieves the message and displays as alert message, but when
VB try to send some message to php , the php code could not able to
recieve the message .
Here is the Sample program through which i sent a message in NT
Platform
<?
$fp=fsockopen("localhost",9024);
if($fp)
{
$message="hello";
fputs($fp,$message);
echo "Connected";
}
else
{
echo "Not Connected";
}
?>
This was run from the local machine, this did send the message to the
Client VB and prompted the message in the VB Software.
The above i tested for the sending data from PHP to VB.
Now the same program i modified and placed one more statement to read
the data from the VB Client, the code is
<META HTTP-EQUIV="refresh" content="5;<?PHP_SELF?>">
<?
$fp=fsockopen("localhost",9024);
if($fp)
{
$message="hello";
fputs($fp,$message);
$fromser= fgets($fp,2000);
echo "$fromser";
}
else
{
echo "Not Connected";
}
?>
Her i put the meta tag to keep the page refresh to get the data from VB
Application at any time. Here the data sent to VB application where as
it did'nt recieve the data from VB.
Can you please tell me whether the above program is correct or not or
is there any method to make the connectivity and the recieve message
from VB to PHP.
The program sends the message from PHP to VB when run on NT Platform
but the same if i run it on Linux Server it wont prompt anything, Why
is this in Linux Server ?
Is there any settings to be done in the php.ini file or in Linux Server
Settings.
Note : the Program run on the Linux server has resulted in more error &
that is
I can connect only through port 80 and not with any other
non-standard ports, Can we have any non-standard port fixed
for socket connection ? and if yes then could i know the
Procedure please.
I need the following informations from you
1. Whether a non-standard port can be assigned for socket connection in
Linux server, if yes then how it is possible ?
2. Why the above mentioned Program is not Working in Linux Server where
as it works in local server on NT Platform ( i have checked with
the php.ini file and it has different features from what is there
in the Linux server, since by my knowledge i think the php.ini
file sets the configuration when it is installed as per the
platfrom).Can i get the perfect information of Configuration in
php.ini file which supports the Socket programming.
3. can i contact you online and my id is vardhamansdesai@yahoo.com and
i will be online at any time you specify on yahoo msn.
I will be greatful for any help regarding the above.
Thank you
Vardhaman S.Desai
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17937&edit=1