Importing Blogger to Wordpress - memory size error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Importing Blogger to Wordpress - memory size error

Post by simonmlewis »

I thinik if this doesn't work, I will break it up if I can fathom how to do that.

NEver worked with XML before.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Importing Blogger to Wordpress - memory size error

Post by simonmlewis »

I've even tried putting this into HTACCESS in a NEW install of Wordpress.
php_value memory_limit 512M

God this is doing my head in. That other plugin I used, ddidn't do it right. This one is really designed to work directly with Blogger.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Importing Blogger to Wordpress - memory size error

Post by simonmlewis »

Iv'e also tried this

Code: Select all

https://wordpress.org/support/topic/wordpress-error-message-fatal-error-allowed-memory-size-of-33554432-bytes-
ex?replies=7
Same issue, with simplepie parser.

I guess it takes memory to process the file. I understand that.
How do I tell what memory I am allocating? As we can alter it in wordpress can't we. So how do we double check what is allowed?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Importing Blogger to Wordpress - memory size error

Post by Celauran »

php.ini is the easiest way of doing it, but it's possible it's being overwritten elsewhere in the codebase. I'd check for that and temporarily comment it out first.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Importing Blogger to Wordpress - memory size error

Post by simonmlewis »

Where might it be in the default codebase?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Importing Blogger to Wordpress - memory size error

Post by Celauran »

It's probably not in WP itself. I'd start with the plugin you're having trouble with and go from there.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Importing Blogger to Wordpress - memory size error

Post by simonmlewis »

I've run a search for "memory" in the folder for that plugin. Nothing.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Importing Blogger to Wordpress - memory size error

Post by simonmlewis »

I installed a memory plugin and found this. PHP is 512 but WP Memory... 40m ???
Attachments
What's this in the green square
What's this in the green square
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Importing Blogger to Wordpress - memory size error

Post by Celauran »

The error message you got earlier clearly shows memory usage topping out at 256. Something is changing that value.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Importing Blogger to Wordpress - memory size error

Post by simonmlewis »

IT now shows:

Mem: WP 512M (def) Usage 3% 17.12M of PHP Limit 512M

Server: OS WINNT Software Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.6.8 Version 32Bit
Name site.local Address 127.0.0.1 Port 80
Type Windows NT SIMON--PC 6.2 build 9200 (Windows 8 Home Premium Edition) i586
System: PHP 5.6.8 Active Plugins 3 Zend 2.6.0
Database: SQL mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $ Build 5.6.24 Charset utf8mb4
Name site Host localhost
WordPress: VER 4.4.2 Lang WPLANG Loc en_GB
Max: Post 200M Upload 200M Input 200s Exec 300s
Debug: State 0 Display 1 Log 0 Script 0


Added the line into wp-config to allow 512M, so that 40m becomes 512, but STILL this damn thing happens.
I then wondered if a restart was needd, if only after changing wp-config. But no still the same damned error.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Importing Blogger to Wordpress - memory size error

Post by Celauran »

What's this plugin you're using?
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Importing Blogger to Wordpress - memory size error

Post by simonmlewis »

it's the one Wordpress tells you to download:
https://wordpress.org/plugins/blogger-importer/
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Importing Blogger to Wordpress - memory size error

Post by simonmlewis »

It's late here so I am off to bed. But if you find anything or if you can somehow install it and test with a 20+mb XML file and see what happens, you'll be a life saver!

Thanks friend.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Importing Blogger to Wordpress - memory size error

Post by Celauran »

Looks like it is indeed WP itself. Try setting WP_MAX_MEMORY_LIMIT
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Importing Blogger to Wordpress - memory size error

Post by Celauran »

wp-includes/default-constants.php

Code: Select all

...
	if ( !defined('WP_MEMORY_LIMIT') ) {
		if ( is_multisite() ) {
			define('WP_MEMORY_LIMIT', '64M');
		} else {
			define('WP_MEMORY_LIMIT', '40M');
		}
	}

	if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
		define( 'WP_MAX_MEMORY_LIMIT', '256M' );
	}
...
Override those in your wp-config and you should be OK.
Post Reply