#34812 [Opn]: socket_write will not write a string ending in 0 "Zero"

2005-10-20 Thread shane at 71software dot com
 ID:   34812
 User updated by:  shane at 71software dot com
 Reported By:  shane at 71software dot com
 Status:   Open
 Bug Type: Sockets related
 Operating System: Windows XP
 PHP Version:  5.1.0RC1
 New Comment:

I have mostly ruled the Cisco IOS bug out because there are several
Perl scripts that issue the 'terminal length 0' command. I will sniff
the traffic though because that sounds like a great way to get some
definitive answers. Thank you. I will post once I have it.


Previous Comments:


[2005-10-19 13:36:24] franz dot hofbauer at gmail dot com

Perhaps it's a Cisco-IOS-Bug?

Have you already checked the network-traffic with a sniffer (e.g.
Ethereal), which bytes are exactly sent to the router by your
PHP-Script?



[2005-10-17 15:58:57] shane at 71software dot com

The bug is not bogus.



[2005-10-17 15:58:02] shane at 71software dot com

If I give you access to the script and a router to run the script on
will that suffice?



[2005-10-17 15:35:30] [EMAIL PROTECTED]

We can't reproduce it either.
Please reopen the report when you have a short but complete reproduce
script or just more info about it.



[2005-10-17 15:19:43] shane at 71software dot com

I am not sure that I can reproduce the intended result without a router
in 20 lines or less. What should I do?



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/34812

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


#34812 [Bgs->Opn]: socket_write will not write a string ending in 0 "Zero"

2005-10-17 Thread shane at 71software dot com
 ID:   34812
 User updated by:  shane at 71software dot com
 Reported By:  shane at 71software dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Sockets related
 Operating System: Windows XP
 PHP Version:  5.1.0RC1
 New Comment:

The bug is not bogus.


Previous Comments:


[2005-10-17 15:58:02] shane at 71software dot com

If I give you access to the script and a router to run the script on
will that suffice?



[2005-10-17 15:35:30] [EMAIL PROTECTED]

We can't reproduce it either.
Please reopen the report when you have a short but complete reproduce
script or just more info about it.



[2005-10-17 15:19:43] shane at 71software dot com

I am not sure that I can reproduce the intended result without a router
in 20 lines or less. What should I do?



[2005-10-11 21:03:18] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-10-10 15:55:39] shane at 71software dot com

Description:

I am using sockets to log in to a Cisco router. I need to issues the
command "terminal length 0". The 0 must return a FALSE or NULL status
to socket_write or maybe socket_read is what is actually returning
false I am not sure. But it will not work in Binary, ASCII, OCTAL, HEX
anything.

 

Reproduce code:
---
$IosCmdExec = 'terminal length 0' . "\n";
socket_write($socket, $IosCmdExec, strlen($IosCmdExec)); 

$makeCaptureFile = 'C:\rtrconfig\config.txt';
$captureFile = fopen($makeCaptureFile,'a');
$out = '';

while ($out = socket_read($socket, 1024)){ 
ereg_replace("\r", ' ', $out);
fwrite($captureFile, $out);
}

$sep =
'***';
  
fwrite($captureFile, $sep); 

socket_shutdown($socket, 2);
socket_close($socket); 

Expected result:

I expect the writing of 'terminal length 0' to the Cisco CLI. It works
fine as long as the digit is not 0. 1-512 etc.

xx#terminal length 512
Building configuration...

Current configuration : 26921 bytes
!
! Last configuration change at 07:00:37 CDT Tue Jun 28 2005 by
amschultz
! NVRAM config last updated at 06:38:49 CDT Mon Jun 20 
!
version 12.2
no service pad
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
service compress-config
!
hostname xx
!
logging buffered 512000 debugging
aaa new-model
aaa authentication login default group tacacs+ local

etc..

Actual result:
--
xxx#terminal length
***

NOTE: 'xxx#' being the router prompt





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


#34812 [Bgs]: socket_write will not write a string ending in 0 "Zero"

2005-10-17 Thread shane at 71software dot com
 ID:   34812
 User updated by:  shane at 71software dot com
 Reported By:  shane at 71software dot com
 Status:   Bogus
 Bug Type: Sockets related
 Operating System: Windows XP
 PHP Version:  5.1.0RC1
 New Comment:

If I give you access to the script and a router to run the script on
will that suffice?


Previous Comments:


[2005-10-17 15:35:30] [EMAIL PROTECTED]

We can't reproduce it either.
Please reopen the report when you have a short but complete reproduce
script or just more info about it.



[2005-10-17 15:19:43] shane at 71software dot com

I am not sure that I can reproduce the intended result without a router
in 20 lines or less. What should I do?



[2005-10-11 21:03:18] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-10-10 15:55:39] shane at 71software dot com

Description:

I am using sockets to log in to a Cisco router. I need to issues the
command "terminal length 0". The 0 must return a FALSE or NULL status
to socket_write or maybe socket_read is what is actually returning
false I am not sure. But it will not work in Binary, ASCII, OCTAL, HEX
anything.

 

Reproduce code:
---
$IosCmdExec = 'terminal length 0' . "\n";
socket_write($socket, $IosCmdExec, strlen($IosCmdExec)); 

$makeCaptureFile = 'C:\rtrconfig\config.txt';
$captureFile = fopen($makeCaptureFile,'a');
$out = '';

while ($out = socket_read($socket, 1024)){ 
ereg_replace("\r", ' ', $out);
fwrite($captureFile, $out);
}

$sep =
'***';
  
fwrite($captureFile, $sep); 

socket_shutdown($socket, 2);
socket_close($socket); 

Expected result:

I expect the writing of 'terminal length 0' to the Cisco CLI. It works
fine as long as the digit is not 0. 1-512 etc.

xx#terminal length 512
Building configuration...

Current configuration : 26921 bytes
!
! Last configuration change at 07:00:37 CDT Tue Jun 28 2005 by
amschultz
! NVRAM config last updated at 06:38:49 CDT Mon Jun 20 
!
version 12.2
no service pad
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
service compress-config
!
hostname xx
!
logging buffered 512000 debugging
aaa new-model
aaa authentication login default group tacacs+ local

etc..

Actual result:
--
xxx#terminal length
***

NOTE: 'xxx#' being the router prompt





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



#34812 [Fbk->Opn]: socket_write will not write a string ending in 0 "Zero"

2005-10-17 Thread shane at 71software dot com
 ID:   34812
 User updated by:  shane at 71software dot com
 Reported By:  shane at 71software dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Sockets related
 Operating System: Windows XP
 PHP Version:  5.1.0RC1
 New Comment:

I am not sure that I can reproduce the intended result without a router
in 20 lines or less. What should I do?


Previous Comments:


[2005-10-11 21:03:18] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-10-10 15:55:39] shane at 71software dot com

Description:

I am using sockets to log in to a Cisco router. I need to issues the
command "terminal length 0". The 0 must return a FALSE or NULL status
to socket_write or maybe socket_read is what is actually returning
false I am not sure. But it will not work in Binary, ASCII, OCTAL, HEX
anything.

 

Reproduce code:
---
$IosCmdExec = 'terminal length 0' . "\n";
socket_write($socket, $IosCmdExec, strlen($IosCmdExec)); 

$makeCaptureFile = 'C:\rtrconfig\config.txt';
$captureFile = fopen($makeCaptureFile,'a');
$out = '';

while ($out = socket_read($socket, 1024)){ 
ereg_replace("\r", ' ', $out);
fwrite($captureFile, $out);
}

$sep =
'***';
  
fwrite($captureFile, $sep); 

socket_shutdown($socket, 2);
socket_close($socket); 

Expected result:

I expect the writing of 'terminal length 0' to the Cisco CLI. It works
fine as long as the digit is not 0. 1-512 etc.

xx#terminal length 512
Building configuration...

Current configuration : 26921 bytes
!
! Last configuration change at 07:00:37 CDT Tue Jun 28 2005 by
amschultz
! NVRAM config last updated at 06:38:49 CDT Mon Jun 20 
!
version 12.2
no service pad
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
service compress-config
!
hostname xx
!
logging buffered 512000 debugging
aaa new-model
aaa authentication login default group tacacs+ local

etc..

Actual result:
--
xxx#terminal length
***

NOTE: 'xxx#' being the router prompt





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


#34812 [NEW]: socket_write will not write a string ending in 0 "Zero"

2005-10-10 Thread shane at 71software dot com
From: shane at 71software dot com
Operating system: Windows XP
PHP version:  5.1.0RC1
PHP Bug Type: Sockets related
Bug description:  socket_write will not write a string ending in 0 "Zero" 

Description:

I am using sockets to log in to a Cisco router. I need to issues the
command "terminal length 0". The 0 must return a FALSE or NULL status to
socket_write or maybe socket_read is what is actually returning false I am
not sure. But it will not work in Binary, ASCII, OCTAL, HEX anything.

 

Reproduce code:
---
$IosCmdExec = 'terminal length 0' . "\n";
socket_write($socket, $IosCmdExec, strlen($IosCmdExec)); 

$makeCaptureFile = 'C:\rtrconfig\config.txt';
$captureFile = fopen($makeCaptureFile,'a');
$out = '';

while ($out = socket_read($socket, 1024)){ 
ereg_replace("\r", ' ', $out);
fwrite($captureFile, $out);
}

$sep =
'***';
  
fwrite($captureFile, $sep); 

socket_shutdown($socket, 2);
socket_close($socket); 

Expected result:

I expect the writing of 'terminal length 0' to the Cisco CLI. It works
fine as long as the digit is not 0. 1-512 etc.

xx#terminal length 512
Building configuration...

Current configuration : 26921 bytes
!
! Last configuration change at 07:00:37 CDT Tue Jun 28 2005 by amschultz
! NVRAM config last updated at 06:38:49 CDT Mon Jun 20 
!
version 12.2
no service pad
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
service compress-config
!
hostname xx
!
logging buffered 512000 debugging
aaa new-model
aaa authentication login default group tacacs+ local

etc..

Actual result:
--
xxx#terminal length
***

NOTE: 'xxx#' being the router prompt

-- 
Edit bug report at http://bugs.php.net/?id=34812&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34812&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34812&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34812&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=34812&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=34812&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=34812&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=34812&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=34812&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34812&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=34812&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=34812&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=34812&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=34812&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34812&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=34812&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=34812&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34812&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34812&r=float
No Zend Extensions:  http://bugs.php.net/fix.php?id=34812&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34812&r=mysqlcfg