ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Problems after update to expression engine 2.5.0

May 25, 2012 4:59pm

Subscribe [1]
  • #1 / May 25, 2012 4:59pm

    AngelLaw

    12 posts

    First off let me say thank you for the support thus far. Your staff has been a great help in resolving installation issues. Now that I have the new version of EE installed there are two errors that I am encountering.

    1) I get an error when trying to edit an entry. The error reads:

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 80 bytes) in /www/HIDDEN/HIDDEN/alcp/codeigniter/system/database/drivers/mysql/mysql_result.php on line 162

    I was told to update the ‘memory_size’ but I am not able to follow through. Can you please elaborate?

    2) The homepage of my site works (http://www.angellaw.com) but when I try to navigate to any other menus such as ‘practice areas’ or ‘professional staff’ I receive the error message:

    Fatal error: Call to a member function query() on a non-object in /www/HIDDEN/HIDDEN/alcp/expressionengine/libraries/Functions.php(680) : eval()'d code on line 7

    The problem only arose after the update.

    Thank you in advance for your help.

    -Evan

  • #2 / May 25, 2012 7:26pm

    AngelLaw

    12 posts

    Also, Engine Hosting has set the limit to 64 Mb and do not allow it to be any bigger. Seems my solution to the first problem is to find the error and fix it. Since I have little experience, I do not know where to start. Below is the mysql_result entry:

    Mod edit: code was unnecessary.

  • #3 / May 29, 2012 1:09pm

    Dan Decker

    7338 posts

    Hi Evan,

    Thanks for posting you errors and code! I removed the code in the 2nd post as it is a common file and we can reference it if need be.

    With the first error, the issue is some PHP you have in a template it seems. The template is running a MySQL query in PHP and exhausting the available memory.

    Do you know off-hand which template has PHP in it? That would be the first place to look.

    Cheers,

  • #4 / May 29, 2012 1:15pm

    AngelLaw

    12 posts

    Dan,

    I am not sure which template has PHP in it. The website was built right before I started here and I am learning the website as I go along. I have a suspicion which template it is because one of the attorneys here was trying to do uploads to the ‘news’ section of our website. But from the looks of the templates on our site, most of them run PHP.

    Evan

  • #5 / May 30, 2012 8:56pm

    AngelLaw

    12 posts

    UPDATE (5.30.2012):

    The PHP error (listed in the first post as 1) has been resolved with the update to expression engine 2.5.1 but I still have the second issue in the above post. I cannot navigate to any pages other than the home page. I still get the error: “Fatal error: Call to a member function query() on a non-object in /www/HIDDEN/HIDDEN/system/expressionengine/libraries/Functions.php(680) : eval()‘d code on line 7”

    -Evan

  • #6 / May 31, 2012 2:54pm

    Dan Decker

    7338 posts

    Hi Evan,

    This line

    ... eval()‘d code on line 7

    Still alludes to PHP running on the template. Are you using any third-party add-ons? Are you removing index.php using .htaccess?

    If you have your templates saved as files, you can do a search in them for “query()” and see where it is. The code could also be in a snippet located at Design-> Templates-> Snippets in your Control Panel or and embedded template. I suspect those because they can be included as common elements across the site *and* the error indicates that it is happening early.

    Cheers,

  • #7 / May 31, 2012 3:07pm

    AngelLaw

    12 posts

    Dan,

    We have many add-ons but I do not know which ones are third party. Is there a designation or category that third party add-ons receive in EE v2.5.1? I was browsing through them and I dont know if we even need half of them enabled. The website was created a while ago and I have a suspicion that many add-ons were enabled out of curiosity and not of necessity. Is there a way i can go through each one and figure out the relevance?

    We have both the index.php and .htaccess in our root directory.

    We do not save our templates as files. We do not have any snippets enables.

    Thanks,
    Evan

  • #8 / Jun 01, 2012 3:06pm

    AngelLaw

    12 posts

    UPDATE-

    The error refers to these lines of code:

    /**
      * eval() 
      *
      * Evaluates a string as PHP
      *
      * @access public
      * @param string
      * @return mixed
      */ 
     function evaluate($str)
     {
      return eval('?'.'>'.$str.'<?php ');  
     }
    
    Specifically line 680 -> return eval('?'.'>'.$str.'<?php ');

    Evan

  • #9 / Jun 05, 2012 2:55pm

    Dan Decker

    7338 posts

    Hi Evan,

    Thanks for looking in the code! Indeed, that is the method that evaluates PHP in ExpressionEngine templates. Essentially this is looking for PHP in EE templates and runs it if it finds any.

    Try dialing PHP on each template you have. When the error goes away, that’s the template with the bad code in it. If you can find that, we can help you debug it.

    Cheers,

  • #10 / Jun 05, 2012 4:24pm

    AngelLaw

    12 posts

    Dan,

    I am not sure how to dial PHP in each template. Is there any reference you can give me?

    Most of the templates return the PHP error but a few of them will actually load when I attempt to view them from the EE CP -> Template -> template manager.

    Evan

  • #11 / Jun 07, 2012 4:06pm

    Dan Decker

    7338 posts

    Hi Evan,

    I am not sure how to dial PHP in each template. Is there any reference you can give me?

    Wow, what a terrible lot of confusion on word can cause! I meant “disabling” not “dialing” - I do apologize for that.

    How about we go in for a look first hand? Be looking for an email from me with further instructions.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases