|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37387 System misstake while opening data from Internet.
Submitted: 2006-05-09 20:06 UTC Modified: 2006-05-10 14:33 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: cherkasov_ivan at mail dot ru Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 4.4.2 OS: w2k sp4 ur1
Private report: No CVE-ID: None
 [2006-05-09 20:06 UTC] cherkasov_ivan at mail dot ru
I can't to include or get the result of php code or html text from the Internet links. PHP is making a system misstake... W2k tells:"

php.exe called misstake and will be closed. Need to restart the program. 

Created log of misstakes.


How can I correct this misstake?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-09 20:09 UTC]
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.

 [2006-05-10 14:11 UTC] cherkasov_ivan at mail dot ru
Here is an example of PHP code that gives currency exchange courses on a current date. Under Win32 it does not works. On the hosting it works...

function get_content() 
 // Making current date 
 $date = date("d/m/Y"); 
 // Making link
 $link = "$date"; 
 // Loading HTML-page
 $fd = fopen($link, "r"); 
 if (!$fd) echo "Requested page not found!"; 
  // Reading file to variable $text 
  while (!feof ($fd)) $text .= fgets($fd, 4096); 
  // Close file descriptor 
  fclose ($fd); 
  return $text; 

$content = get_content(); 
$pattern = "#<Valute ID=\"([^\"]+)[^>]+>[^>]+>([^<]+)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)[^>]+>[^>]+>([^<]+)#i"; 
preg_match_all($pattern, $content, $out, PREG_SET_ORDER); 
$dollar = ""; 
$euro = ""; 
foreach($out as $cur) 
    if($cur[2] == 840) $dollar = str_replace(",",".",$cur[4]); 
    if($cur[2] == 978) $euro   = str_replace(",",".",$cur[4]); 
$date = date("d.m.Y"); 
echo "Currency exchange courses on ".$date."<br>";
  echo "Dollar - ".$dollar."<br>"; 
  echo "Euro - ".$euro."<br>"; 
 [2006-05-10 14:33 UTC]
Fixed in CVS long time ago.
You have to wait for the next 4.4 release or (which is highly recommended) upgrade to 5.1.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 01 05:01:29 2024 UTC