ID: 24787
Updated by: [EMAIL PROTECTED]
Reported By: per dot funke at ub dot oru dot se
Status: Open
Bug Type: Output Control
Operating System: Linux
PHP Version: 4.3.2
New Comment:
with PHP 4.3.2 cli my output with the last_read 2 echo is:
Import started. Infile is
test.txt
last_read 1 123
last_read 2 123
like it should be....
Previous Comments:
------------------------------------------------------------------------
[2003-07-24 02:45:04] per dot funke at ub dot oru dot se
there is a line missing from the submitted code:
the line should read:
echo "\nlast_read 2 ".$last_read;
and should be inserted immediately after the line
echo "\nlast_read 1 ".$last_read;
(Sorry...)
------------------------------------------------------------------------
[2003-07-24 02:40:48] per dot funke at ub dot oru dot se
Description:
------------
In script run from the shell, only one out of
two echo-statements results in a printed line.
Reproduce code:
---------------
#!/usr/local/php/bin/php
<?php
//#################################################################
echo "\nImport started. Infile is
/usr/local/apache/htdocs/nweb/stdweb/vis/out.skv";
$a_compiled_collection[0]="";
//$fp2 =
fopen("/usr/local/apache/htdocs/nweb/stdweb/vis/out.skv","r");
$fp3 =
fopen("/usr/local/apache/htdocs/nweb/stdweb/vis/imported_lines","r");
$last_read=fgets ($fp3);
$done=fclose($fp3);
echo "\nlast_read 1 ".$last_read;
//fclose($fp2);
exit;
//#################################################################
?>
Expected result:
----------------
$ ./test.php
Import started. Infile is
/usr/local/apache/htdocs/nweb/stdweb/vis/out.skv
last_read 1 500
last_read 2 500
$
Actual result:
--------------
$ ./test.php
Import started. Infile is
/usr/local/apache/htdocs/nweb/stdweb/vis/out.skv
last_read 1 500
$
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24787&edit=1