Bug #12650 Updated: Error 500 but the code was executed!?
| From: | lopez at pepe-lopez dot com | Date: | Wed, 08 Aug 2001 13:04:43 +0000 |
| Subject: | Bug #12650 Updated: Error 500 but the code was executed!? | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-5926@lists.php.net to get a copy of this message | ||
ID: 12650
User updated by: lopez@pepe-lopez.com
Reported By: lopez@pepe-lopez.com
Old Status: Open
Status: Closed
Bug Type: Website problem
Operating System: FreeBSD
PHP Version: 4.0.6
New Comment:
OK, I get the failure... it's mysql related (SHOW TABLE INFOS don't work), and it
terminates the script...
I don't know why the mail is sent... however... now it works...
here's the bad code
//start
$sql = "SHOW TABLE STATUS";
$ID = mysql_query($ID);
$num = mysql_num_rows($ID);
for($i=0;$i<$num;$i++){
$table[$i] = mysql_fetch_array($ID);
}
$i=0;
while($table[$i]):
if($table[$i][Name] == $table):
foreach($table[$i] as $key => $value){
$comment[$key] = $value;
}
endif;
$i++;endwhile;
//end
for development queries about this error contact me!
Previous Comments:
------------------------------------------------------------------------
[2001-08-08 08:30:55] lopez@pepe-lopez.com
Hi, I get some errors while executing a script:
Logfile:
FATAL: erealloc(): Unable to allocate 1852794241 bytes
[Wed Aug 8 06:24:15 2001] access to X/httpd/X/cgi-bin/php failed for 212.x.x.x, reason: Premature
end of script headers
The script does only these things:
some math-functions,
small MySQL-queries (1 time reading, 1 time deleting) on a small table,
and sending 1 mail (end of php-code, then html-output!)
so the memory allocation with ~1,7gb is wrong!
Now the real bug:
I open the site (script) in my browser, and an error 500 appears. But ALL code was executing
(including the last one, sending a mail!). The HTML-output only won't work!
-----
But it works with php 4.0.4pl1 very fine!!!
I did download/compile the source today (4.0.6)!
I applied the memory patch...
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12650&edit=1