I've upgraded to 0.6.x, received same error message.
I've upped the memory_limit in php.ini to 700M and
memory_execution_time to 300
Results:
Fatal error: Allowed memory size of 134217728 bytes exhausted
(tried to allocate 76272445 bytes) in C:\..\roster.php on line 135
Code (thanks to Bastien's help):
<?php require_once('../../..'); ?>
<?php require_once('../../../');
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue =
"", $theNotDefinedValue = "")
{
$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_user, $user);
$query_getMem = "SELECT members_info.fname, members_info.lname,
members_info.address, members_info.apt_suite, members_info.city,
members_info.`state`, members_info.zip, members_info.phone,
members_info.email FROM members_info ORDER BY lname";
$getMem = mysql_query($query_getMem, $user) or die(mysql_error());
$row_getMem = mysql_fetch_assoc($getMem);
$totalRows_getMem = mysql_num_rows($getMem);
$html ='<!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" />
<style type="text/css">
<!--
body {
margin: 1em;
}
.tablecen {
margin: 0px auto;
}
td {
text-align: left;
}
.caps {
text-transform: capitalize;
}
h1 {
font: bold 18px Georgia, "Times New Roman", Times, serif;
text-align: center;
}
-->
</style>
</head>
<body>';
// define the starting year
$startYear = 2009;
// calculate the current year
$thisYear = date("Y");
if ($startYear==$thisYear) {
// if both are the same, just show the starting year
$html .= $startYear;
}
else {
// if they"re different, show both
$html .= "$startYear-$thisYear";
}
$html .= '</h1>
<table class="tablecen" width="800" >
<tr>';
$getMem_endRow = 0;
$getMem_columns = 3; // number of columns
$getMem_hloopRow1 = 0; // first row flag
do {
if($getMem_endRow == 0 && $getMem_hloopRow1++ != 0){ $html
.= "<tr>"; }
$html .= '<td><p><span class="caps">'.
$row_getMem["fname"] . ' ' . $row_getMem["lname"];
$html .= '<br />'.
$html .= $row_getMem["address"]. ' ' . $row_getMem["apt_suite"] .
'<br />';
$html .= $row_getMem["city"]. '</span> <span
style="text-transform: uppercase;">' . $row_getMem["state"]
.'</span> ' . $row_getMem["zip"] . '<br />';
if (!empty($row_getMem["phone"])) { $html .= $row_getMem["phone"]
. "<br />"; }
$html .= urls2linksComplex($row_getMem["email"]) .
'</p></td>';
$getMem_endRow++;
if($getMem_endRow >= $getMem_columns) {
$html .= '</tr>';
$getMem_endRow = 0;
}
} while ($row_getMem = mysql_fetch_assoc($getMem));
if($getMem_endRow != 0) {
while ($getMem_endRow < $getMem_columns) {
echo("<td> </td>");
$getMem_endRow++;
}
$html .= "</tr>";
}
$html .= '</table>
</body>
</html>';
mysql_free_result($getMem);
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("roster.pdf");
?>
BrianS wrote:
Are you sure this is a problem with DOMPDF? The line you're
referencing appears to possibly be occurring before you even pass the
data to DOMPDF. Without more information the only way I can see DOMPDF
causing your problem is if you are generating some HTML, rendering
with DOMPDF, generating more html, rendering with DOMPDF, etc ...
If the problem is in DOMPDF, the first thing I would do is to try the
0.6.0 alpha 2 release. It addresses a lot of issues from the 0.5.1
release. Next would be to up memory and execution time limits.
Finally, you might have to modify your HTML (tables, for example, can
eat up a lot of memory).
--
You received this message because you are subscribed to the Google Groups "dompdf" group.
To post to this group, send email to dom...@googlegroups.com.
To unsubscribe from this group, send email to dompdf+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dompdf?hl=en.