Fatal error while importing attachments


Active member
While importing the attachments at ~80% I get this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 33996 bytes) in /xenforo/library/XenForo/Image/Gd.php on line 69
What can I do?
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 10664 bytes) in /library/XenForo/Image/Gd.php on line 69
That's the first error I get, which stays the same with - ini_set('memory_limit', 256 * 1024 * 1024);

Increasing it to or more than - ini_set('memory_limit', 256 * 1024 * 1024 * 1024);

and I get this error:

Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 162 bytes) in /library/Zend/Controller/Response/Abstract.php on line 86
None of them worked, and I doubt my host will increase PHP's memory_limit.

This import worked fine when I tested it on my computer, would it work if I just copied the attachment data files to my hosting account? Everything else is working fine, how can I abort the import at this point?

If I can't get it to work that way, I'm fine with just aborting it and losing the attachments.


XenForo moderator
Staff member
If everything worked on your local PC then just upload the /data and /internal_data directories to the server and import the local database.

That will completely overwrite what you have on your server.
Can I just overwrite the attachment directories without overwriting the database (I already opened up my forums again), or will that screw something up?


XenForo moderator
Staff member
Well if the import didn't complete then the database contents won't tie up with the attachments so uploading them will do no good as any which haven't been imported won't be used.

Yes, importing your local database file will overwrite your existing data so don't do that if you want to keep it.

Really you need to complete the import so everything is correct.
I submitted a support ticket and they did increase my memory_limit. The import completed, but now I'm having the same problem with rebuilding caches, so hopefully they'll increase it a bit more.

Thanks for the help!