WordPress.org

Ready to get started?Download WordPress

Forums

Need help fixing a canonical issue (4 posts)

  1. bellatl
    Member
    Posted 3 years ago #

    Ok, I have to lay out the scenario first. I am trying to make some upgrades to my personal site by way of some wordpress backend. I had it installed behind the index.html I am using for sake of having something visible as it is a portfolio site. I changed the page structure and naming (yes including, the wp-admin page name because it just isn't short enough :( I left it sitting long enough and never got back to working on it and I couldn't remember the domain names I had made for the life of me so I just decided to download and install manually via cpanel on my host. Well, I have seen the fatal error: memory allocation before, I have never had an issue with canonical.php before or had to sift through this much code just to make sure memory is bumped up (I had host bump resource limit to 64mb, so I know it can't be a memory thing) and try to fix canonical issue.....:( First it started on line 243 and it all read right then it moved to line 60 and I didn't even do anything). Here is my example:
    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 19456 bytes) in_______public_html/wp-includes/canonical.php on line 60

    Any help is appreciated!

  2. Emil Uzelac
    Theme Review Admin
    Posted 3 years ago #

    I am guessing that it's something to do with index.html, sometimes having index.php and index.html could cause the problem. And also redirects if you have one.

    // Some PHP setups turn requests for / into /index.php in REQUEST_URI
    	// See: http://trac.wordpress.org/ticket/5017
    	// See: http://trac.wordpress.org/ticket/7173
    	// Disabled, for now:
    	// $original['path'] = preg_replace('|/index\.php$|', '/', $original['path']);
    
            // The first line is line 60
    	$redirect = $original;
    	$redirect_url = false;
  3. Dion Hulse
    WordPress Dev
    Posted 3 years ago #

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 19456 bytes) in_______public_html/wp-includes/canonical.php on line 60

    The problem you're encountering is that you have a 8M PHP memory_limit defined, the host is who would enforce this.

    WordPress recommends at least 32M of memory for normal operation, Larger plugins and/or translations can increase this dramatically..

    Contact your host and see if you can get your memory limit raised higher than 8M (8,388,608 bytes) and try loading your site again.

  4. James
    Happiness Engineer
    Posted 3 years ago #

    Here are four ways to increase PHP's memory allocation:

    1. If you're using WordPress 2.9.2 or lower, try adding define('WP_MEMORY_LIMIT', '256M'); to your wp-config.php file. If you're using WordPress 3.0 or higher, WordPress automatically does this for a variety of tasks, so there's really no reason to try it in this case.

    2. If you can edit or override the system php.ini file, increase the memory limit. For example, memory_limit = 256M

    3. If you cannot edit or override the system php.ini file, add php_value memory_limit 256M to your .htaccess file.

    4. If neither of these work, it's time to ask your hosting provider to temporarily increase PHP's memory allocation on your account. Keep in mind that most decent hosting providers allocate 32 MB to PHP under each account, and most decent hosting providers allow users to temporarily increase the memory allocation. If your hosting provider won't accommodate you, perhaps it's time to find a new hosting provider.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.