close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Memory size error?

Thread begun 10/01/2010 3:16 pm by Steve | Last modified 11/11/2010 5:16 pm by Dani Chankhour | 7944 views | 26 replies |

Steve

Memory size error?

I'm trying to give the Framework Extension another try... Using the latest released Framework Ext

Created a nice new DW Template. Added a couple pages as static plugins for nav etc
Then created a new theme based on this template.

Create a new page from the Theme
Now I get this really nice error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 40961 bytes) in E:\Websites\....

What the?

Sign in to reply to this post

Steve

More details

I guess I might as well give the various page contents to help solve this problem.

Theme Template:

<!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>
<!-- TemplateBeginEditable name="doctitle" --><!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
</head>
<body>
<!-- TemplateBeginEditable name="contentRegion" --><!-- TemplateEndEditable -->
</body>
</html>



New page created with Theme:

<?php
require_once( "webassist/framework/library.php" );
require_once( "webassist/framework/framework.php" );
?>
<?php
if("" == ""){
$WA_Roster_1285970700029_Content_Empty = "";
$WA_Roster_1285970700029_Content = new WA_Include(__FILE__);
$WA_Roster_1285970700029_Template = new WA_Include("Templates{$WA_Roster_1285970700029_Content_Empty}/Roster.php");
require($WA_Roster_1285970700029_Template->BaseName);
$WA_Roster_1285970700029_Template->Initialize(true);
}
?>
<!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"><!-- InstanceBegin template="/Templates/Themes/210TemplateSmall_fw_theme.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->title of this page<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>
<body>
<!-- InstanceBeginEditable name="contentRegion" -->Some Roster Content goes here<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>
<?php
if(isset($WA_Roster_1285970700029_Template)){
$WA_Roster_1285970700029_Content->Initialize();
$WA_Roster_1285970700029_Template->ReplaceTemplateRegions($WA_Roster_1285970700029_Content);
print($WA_Roster_1285970700029_Template->Content);
}
?>



and the original DW template:

<?php
require_once( "../webassist/framework/library.php" );
require_once( "../webassist/framework/framework.php" );
?><?php
if("" == ""){
$WA_header_1285963835918 = new WA_Include("../includes/header.php");
require($WA_header_1285963835918->BaseName);
$WA_header_1285963835918->Initialize(true);
}

if("" == ""){
$WA_vertNav_1285963879008 = new WA_Include("../vertNav.php");
require($WA_vertNav_1285963879008->BaseName);
$WA_vertNav_1285963879008->Initialize(true);
}
?><!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" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document 123</title>
<!-- TemplateEndEditable -->
<link href="../styles/SGD2010.css" rel="stylesheet" type="text/css" />
<?php echo((isset($WA_header_1285963835918))?$WA_header_1285963835918->Head:"") ?><?php echo((isset($WA_vertNav_1285963879008))?$WA_vertNav_1285963879008->Head:"") ?>
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
</head>

<body>
<div id="outerWrapperSmall">
<div id="contentWrapper">


<?php echo((isset($WA_header_1285963835918))?$WA_header_1285963835918->Body:"") ?>

<div id="contentSmall"><!-- TemplateBeginEditable name="contentRegion" -->contentRegion<!-- TemplateEndEditable --> </div>


<div id="vert-panel"><?php echo((isset($WA_vertNav_1285963879008))?$WA_vertNav_1285963879008->Body:"") ?> </div>






</div>
</div>
</body>
</html>



I've not even added any dynamic php values...

Some loop?

Plugin Includes should not have been assigned to the parent template prior to converting to a Theme?

Sign in to reply to this post

Steve

One more post...

Full error (less actual server location):


Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 40961 bytes) in E:\Websites\mysite\htdocs\webassist\framework\framework.php on line 32

and content from line 32:
ob_start();

Sign in to reply to this post

Ray BorduinWebAssist

I've opened up a support incident so that we can look into this with you directly. Someone will call you on Monday. Please update the incident with good times to contact you.

Sign in to reply to this post
Did this help? Tips are appreciated...

Steve

Hello Ray,
8am - 4pm Pacific are basic working hours.

Sign in to reply to this post

Steve

Tested from another computer and same problems. But, possibly this is the problem;

I noted in the DW fie bar on the page that is using the theme that it looks to be looking for the same page as is themed. For instance:

$WA_testFW_1286035464517_Template = new WA_Include("Templates{$WA_testFW_1286035464517_Content_Empty}/testFW.php");

"testFW.php" is the same name as the page that is themed... Plus it's looking for a file that does not exist on that path.

A change to target the original template makes my test page now load:

$WA_testFW_1286035464517_Template = new WA_Include("Templates/testTemplate.dwt.php");

I've yet to test the pages created yesterday on my laptop but that is the next step...

Sign in to reply to this post

Steve

Hello,
I never got a call on Monday...

Also how about Security Assist and it not refreshing to allow selecting values accept every 4th or fifth time? Seems like an obvious bug that renders the key component virtually useless on the Mac unless you hand code the thing...

Sign in to reply to this post

Steve

Did a couple more tests after removing the dat file and restarting the computer.
Problems still exist.

If Themes -> Create Page with Theme

The primary file linked is itself. For instance if you create a new page using this method the initial values are :

<?php
if("" == ""){
$WA_testphpFW_1286405603037_Content_Empty = "";
$WA_testphpFW_1286405603037_Content = new WA_Include(__FILE__);
$WA_testphpFW_1286405603037_Template = new WA_Include("../Templates{$WA_testphpFW_1286405603037_Content_Empty}/untitled_1.php");
require($WA_testphpFW_1286405603037_Template->BaseName);
$WA_testphpFW_1286405603037_Template->Initialize(true);
}
?>


since "untitled_1.php" is the default name of the new page created.

Next you can take an existing page that you want to theme with the Framework.

Create simple page, apply the original DW template and you get this:

<?php
if("" == ""){
$WA_testphpFW_1286405603037_Content_Empty = "";
$WA_testphpFW_1286405603037_Content = new WA_Include(__FILE__);
$WA_testphpFW_1286405603037_Template = new WA_Include("../Templates{$WA_testphpFW_1286405603037_Content_Empty}/testphpFW");
require($WA_testphpFW_1286405603037_Template->BaseName);
$WA_testphpFW_1286405603037_Template->Initialize(true);
}
?>


WA_Include("../Templates{$WA_testphpFW_1286405603037_Content_Empty}/testphpFW)

rather than the correct:

WA_Include("../Templates{$WA_testphpFW_1286405603037_Content_Empty}/testphpFW.dwt.php");

Sign in to reply to this post

Jason ByrnesWebAssist

I will make sure one of our engineers calls you today to look into the problem.

Sign in to reply to this post

Dave BuchholzBeta Tester

I have also now encountered this error whilst testing on my local development server, full error message is: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 40961 bytes) in /Users/davebuchholz/Sites/abc-widgets/webassist/framework/framework.php on line 32 which is ob_start();

Everything works fine when including pages with static content one level down from the root.

I have attached the pages that are failing which are situated in a folder called _plugins in the root of the site. These pages are called from the index page whose stripped down code looks like this:

php:
<?php

require_once( "webassist/framework/library.php" );
require_once( 
"webassist/framework/framework.php" );
?>
<?php 
require_once('_inc/application.php'); ?>
<?php
// Database Query Using parameters
$param1_rsCategoryURL "-1";
if (isset(
$pathInfo[0])) {
  
$param1_rsCategoryURL = (get_magic_quotes_gpc()) ? $pathInfo[0] : addslashes($pathInfo[0]);
}
mysql_select_db($database_connDB$connDB);
$query_rsCategoryURL sprintf("SELECT url FROM tbl_categories WHERE url = %s"GetSQLValueString($param1_rsCategoryURL"text")); // possible values from the GetSQLValueString Function are text, long, int, double, date, defined
$rsCategoryURL mysql_query($query_rsCategoryURL$connDB) or die(mysql_error());
$row_rsCategoryURL mysql_fetch_assoc($rsCategoryURL);
$totalRows_rsCategoryURL mysql_num_rows($rsCategoryURL);
?>
<?php
if(!($totalRows_rsCategoryURL == 0)){
    
$WA_category_page_1 = new WA_Include("_plugins/category-pages/category-page.php");
    require(
$WA_category_page_1->BaseName);
    
$WA_category_page_1->Initialize(true);
}
?>
<?php
if($totalRows_rsCategoryURL == 0){
    if(
true){
    
// WebAssist Framework Builder Dynamic Plug-in: $WA_page_1
        
switch(isset($pathInfo[0])?$pathInfo[0]:""){ // this could be controlled by a recordset repeat region to cope with expansion
            
case "about":
                
$WA_page_1 = new WA_Include("_plugins/about-us-pages/about-us.php");
                break;
            case 
"contact":
                
$WA_page_1 = new WA_Include("_plugins/contact-pages/contact-us.php");
                break;
            case 
"legal":
                
$WA_page_1 = new WA_Include("_plugins/legal-pages/legal-page.php");
                break;
            case 
"":
                
$WA_page_1 = new WA_Include("_plugins/home-page/home.php");
                break;    
            case 
"index.php":
                
$WA_page_1 = new WA_Include("_plugins/home-page/home.php");
                break;        
            default:
                
$WA_page_1 = new WA_Include("_plugins/error-pages/page-not-found.php");
                break;
        }
        if(isset(
$WA_page_1)){
            require(
$WA_page_1->BaseName);
            
$WA_page_1->Initialize(true);
        }
    
// End: WebAssist Framework Builder Dynamic Plug-in: $WA_page_1
    
}
}
?>
<!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"><!-- InstanceBegin template="/Templates/public.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title><?php echo((isset($WA_page_1))?$WA_page_1->Title:""?><?php echo((isset($WA_category_page_1))?$WA_category_page_1->Title:""?></title>
<!-- InstanceEndEditable -->
</head>

<body>
<!-- InstanceBeginEditable name="mainContent" -->
<?php echo((isset($WA_page_1))?$WA_page_1->Body:""?>
<?php 
echo((isset($WA_category_page_1))?$WA_category_page_1->Body:""?>
<?php 
new dBug(get_defined_vars()); ?>
<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>
<?php 
// free all memory associated with rsCategoryURL
mysql_free_result($rsCategoryURL); 
?>
Attached Files
category-pages.zip
Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...