close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Fatal memory error

Thread began 10/31/2012 9:59 am by kbettenc296716 | Last modified 10/31/2012 11:13 am by kbettenc296716 | 1920 views | 6 replies |

kbettenc296716

Fatal memory error

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24576 bytes) in C:\inetpub\wwwroot\LDG2012\Templates\admin.dwt.php on line 24

I got this error when I was bringing up artists_search.php in a browser on my testing server.

Sign in to reply to this post

Jason ByrnesWebAssist

add the following code at line 1 of the artists_search.php file:


php:
<?php

ini_set
("memory_limit""256M")
?>
Sign in to reply to this post

kbettenc296716

Different error

PHP has encountered a Stack overflow

I don't get the previous message but get this.

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a copy of the Templates\admin.dwt.php and the artists_search.php files so i can examine the code.

Sign in to reply to this post

kbettenc296716

Here are the files

It is happening with all the php files created by Datassist this time around.

Attached Files
admin.dwt.zip
Sign in to reply to this post

Jason ByrnesWebAssist

it looks like you have code to apply a theme on the template file.

the code above the doctype tag on the admin.dwt.php page:

php:
<?php require_once('../webassist/framework/framework.php'); ?>

<?php 
require_once('../webassist/framework/library.php'); ?>
<?php 
require_once('../Connections/connLDG.php'); ?>
<?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_connLDG$connLDG);
$query_rsArtists "SELECT * FROM artists ORDER BY artLastname ASC";
$rsArtists mysql_query($query_rsArtists$connLDG) or die(mysql_error());
$row_rsArtists mysql_fetch_assoc($rsArtists);
$totalRows_rsArtists mysql_num_rows($rsArtists);

if(
"" == ""){
    
$WA_admin_1_Content_Empty "";
    
$WA_admin_1_Content = new WA_Include(__FILE__); 
    
$WA_admin_1_Template = new WA_Include("../Templates{$WA_admin_1_Content_Empty}/admin.dwt.php");
    require(
$WA_admin_1_Template->BaseName);
    
$WA_admin_1_Template->Initialize(true);
}
?>




and below the </html> tag:

php:
<?php

if(isset($WA_admin_1_Template)){
    
$WA_admin_1_Content->Initialize();
    
$WA_admin_1_Template->ReplaceTemplateRegions($WA_admin_1_Content);
    print(
$WA_admin_1_Template->Content);
}

mysql_free_result($rsArtists);
?>




should not be on the template file.

Sign in to reply to this post

kbettenc296716

Thanks

That did it.

Sign in to reply to this post

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...