|
Rick Myers
post date:
2009-04-29 23:37:43
|
I created the page below and it got the following error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 72 bytes) in /var/www/vhosts/xenoplace.com/httpdocs/fusion/Includes/FusionCharts/dynamic/DWFChart.inc.php on line 692
This was an out of the box graph and it looks like its running out of memory when loading.
Why?
<?php require_once('Connections/local.php'); ?><?php include('Includes/FusionCharts/dynamic/DWFChart.inc.php'); ?>
<?php
// fusion chart # FusionChart2 data include
include('Includes/FusionCharts/dynamic/data/fc_FusionChart2_data.php');
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_local, $local);
$query_Recordset1 = "SELECT * FROM LoanStats";
$Recordset1 = mysql_query($query_Recordset1, $local) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
// fusion chart #FusionChart2 dynamic filter data
$dFCFusionChart2 = new DWFChart("FusionChart2", "MSColumn3D", "Includes/FusionCharts/charts/", 400, 400, "", "", "", "", "", "");
$dFCFusionChart2->setConfigXML($FusionChart2_dataXML);
$dFCFusionChart2->setCategory($Recordset1, "load_date", "", "");
$dFCFusionChart2->addSeries($Recordset1, "amount-requested", "", "color='1c2e45' seriesName='amount-requested' renderAs='Column' parentYAxis='P'", "default", "");
$dFCFusionChart2->addSeries($Recordset1, "interest-rate", "", "color='769b69' seriesName='interest-rate' renderAs='Column' parentYAxis='P'", "default", "");
$dFCFusionChart2->setOrdering('None', 'asc');
$dFCFusionChart2->prepareData();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="Includes/FusionCharts/dynamic/js/FusionCharts.js"></script>
<script type="text/javascript" src="Includes/FusionCharts/dynamic/js/FusionCharts.js"></script>
</head>
<body>
<?php
// (FCChart Begin) #FusionChart2
renderFusionChart($dFCFusionChart2, 400, 400);
// #FusionChart2 (FCChart End)
?></body>
</html>
<?php
mysql_free_result($Recordset1);
?>
|
|
|
Andrei Rinciog [Extend Studio]
post date:
2009-05-05 05:46:06
|
Hello Rick,
We will take this into consideration and discuss it. Maybe we will have an expanded version or something like that in the future. But, I'm not promising anything.
Regards,
Andrei Rinciog
|
|