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 <?php and ends 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. xxxxxx#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 xxxxxx ! logging buffered 512000 debugging aaa new-model aaa authentication login default group tacacs+ local etc...... Actual result: -------------- xxxxxxx#terminal length *************************************************************************************** NOTE: 'xxxxxxx#' being the router prompt ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34812&edit=1