ID:               24787
 Updated by:       [EMAIL PROTECTED]
 Reported By:      per dot funke at ub dot oru dot se
-Status:           Open
+Status:           Bogus
 Bug Type:         Output Control
 Operating System: Linux
 PHP Version:      4.3.2
 New Comment:

You're either doing something wrong, or you have some weird
php.ini options set. Try error_reporting(E_ALL); as first line in your
script. Also, ditch the hashbang line (#!..) and run the script with
CLI: # sapi/cli/php -n test.php



Previous Comments:
------------------------------------------------------------------------

[2003-07-24 03:18:54] [EMAIL PROTECTED]

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....

------------------------------------------------------------------------

[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

Reply via email to