Page 1 of 1

Fsockopen() function??

Posted: Thu Dec 28, 2006 10:46 pm
by FiOh
Hi I'm new here.

I run my program and gets an error but i do not understand it.
Does anyone know what does the error below mean?

Code: Select all

Warning: fsockopen() [function.fsockopen]: unable to connect to 172.16.221.214:23 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ) in C:\Program Files\Apache Group\Apache2\htdocs\Multivendor_D\cisco2612\Login_Process.php on line 20

Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Group\Apache2\htdocs\Multivendor_D\cisco2612\Login_Process.php on line 20
Thanks for replying.
*^^*

Posted: Thu Dec 28, 2006 10:50 pm
by feyd
The address (and port) you are attempting to connect to refused your request, did not respond to your request, or responded with malformed data.

Posted: Tue Jan 02, 2007 6:56 pm
by FiOh
Is the error caused by improper connection between the devices?
Sorry if i sounds stupid.

Posted: Tue Jan 02, 2007 7:09 pm
by RobertGonzalez
Can you hit that port and address normally?

Posted: Tue Jan 02, 2007 8:16 pm
by FiOh
Everah wrote:Can you hit that port and address normally?
Sometimes when i try to ping to the address of the device using command prompt, it can ping to the address of the device successfully. But when i go to the php program to run the program, i will get the error below:

Code: Select all

Fatal error: Maximum execution time of 30 seconds exceeded in .....
I'm at a blur now... right now i can ping to the switch as well as login to the php program to configure the switch but i am not able to ping to the router nor login to the php program to configure it.

Posted: Wed Jan 03, 2007 12:57 am
by neel_basu
Well first Testing Pinging it Through php
============================

Code: Select all

<?php
$output = shell_exec('ping 172.16.221.214');
echo $output;
?>
I also have a doubt about the port number try to ping with that port "23"

Posted: Wed Jan 03, 2007 1:42 am
by FiOh
neel_basu wrote:Well first Testing Pinging it Through php
============================

Code: Select all

<?php
$output = shell_exec('ping 172.16.221.214');
echo $output;
?>
I also have a doubt about the port number try to ping with that port "23"

On which page and where should i put the above codings to try pinging through the php?

Posted: Wed Jan 03, 2007 2:16 am
by Chris Corbyn
I think it's more likely that your host are blocking traffic on your account. That's quite common.

Posted: Wed Jan 03, 2007 2:22 am
by neel_basu
FiOh wrote:
neel_basu wrote:Well first Testing Pinging it Through php
============================

Code: Select all

<?php
$output = shell_exec('ping 172.16.221.214');
echo $output;
?>
I also have a doubt about the port number try to ping with that port "23"

On which page and where should i put the above codings to try pinging through the php?
just make a .php scrit contain this code and the run it in your browser

Posted: Wed Jan 03, 2007 10:18 am
by RobertGonzalez
neel_basu wrote:just make a .php scrit contain this code and the run it in your browser
You might want to say 'call the page from the server' as running a PHP file in your browser will just show the code.

Posted: Wed Jan 03, 2007 10:26 am
by neel_basu
I was trying to make Sure Wheathere he is getting reply or not while pinging

Posted: Wed Jan 03, 2007 10:40 am
by RobertGonzalez
I am aware of that. But the php file still needs to be parsed through the server in order to execute the code, and loading/running it in the browser is a little misleading. It sounds like you mean ctrl-O to open the file rather than calling the URI http://localhost/file_name.php.

Posted: Wed Jan 03, 2007 11:47 am
by neel_basu
oh! :roll: sorry but I think He would Understand it after this Replies

Posted: Wed Jan 03, 2007 6:46 pm
by FiOh
I have created a .php page with the codings to test the pinging through php and below is the message i got:
Pinging 172.16.221.214 with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for 172.16.221.214: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

Posted: Wed Jan 03, 2007 11:22 pm
by neel_basu
So Its Not Replying In The Ping There May Be Some faults between thease 2 machines