Re: Moving from Windows to Linux |
Fri, 13 September 2013 16:46 |
|
Just following up here in case someone has the same problem:
So my problem was that PHP kept complaining it was running out of memory when I was trying to import my forum on Linux (originally exported on Windows). It didn't matter how high I set the memory limit, PHP would always run out, going so far as to consume the entire system memory if I let it. I tired a couple different versions of PHP and it didn't seem to make a bit of difference. On one of my various re-installs of FUDForum I tried selecting a different database type (the default was always MySQLi, I chose PDO: MySQL in this case). It still failed but this time I got a different error. The error was "Fatal error: Uncaught exception 'Exception' with message ... 08S01: Got a packet bigger than 'max_allowed_packet' bytes". I changed the MAX_ALLOWED_PACKET setting from the default of 1MB to 512MB in MySQLs my.cnf file and this seems to have solved the problem with either database type selection.
My guess is this doesn't really have anything to do with going from Windows to Linux but has to do either with the size of the database or of an individual forum but I'm just guessing. Anyway, after much frustration and many e-mails to naudefj (thanks again!) the problem seems to be solved.
|
|
Re: Moving from Windows to Linux |
Sat, 07 September 2013 04:48 |
|
I was able to import your dump on a Linux server. It took +- 5 minutes (with "Skip Search Index" checked). Memory usage never went over 1 Meg. You may have a buggy PHP version, try upgrading it to a later release.
|
|
|
Re: Moving from Windows to Linux |
Wed, 04 September 2013 13:16 |
|
Tried the import from the command line after making this change to admimport.php. Import went along normally (as far as i could tell) until it got to the msg table. Then php memory usage rose rapidly to 4.6GB, hard drive thrashed for a while and the system locked up.
|
|
|
Re: Moving from Windows to Linux |
Wed, 04 September 2013 02:12 |
|
Ok, I believe i have found the nature of the problem. One of them anyway... I'm running out of memory during the import no matter how much I give php.ini and admimport.php. Stupid me had errors turned off so I wasn't seeing errors and thought the script was completing successfully... Anyway, here's the error from the php error log:
PHP Warning: Error while sending QUERY packet. PID=24933 in /opt/lampp/FUDforum/include/theme/default/db.inc on line 110
PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 130968 bytes) in /opt/lampp/FUDforum/include/theme/default/db.inc on line 54
It's using 2 GB at this point. Seems to fail at the same place no matter how high I set the memory.
If it will still help, I'll send you the forum dump somehow (it's about 100 megs).
|
|
|
Re: Moving from Windows to Linux |
Mon, 02 September 2013 16:05 |
|
That would have been my guess too but the values look right and the same GLOBALS.php file works before the import so it seems like the problem is either outside of GLOBALS.php or something that must change within GLOBALS.php because of the import.
I did an export then an import on the Linux side and that worked fine. It seems to be something specific with the data I am importing from the Windows side. It doesn't seem to matter whether i do the import via the command line or via the import forum data option within FUDforum.
Has anybody here ever successfully attempted this (exporting a forum on Windows, importing on Linux)?
|
|
Re: Moving from Windows to Linux |
Mon, 02 September 2013 13:27 |
|
It's difficult to say without access to your site, but my first guess would be COOKIE_PATH & COOKIE_DOMAIN.
|
|
Re: Moving from Windows to Linux |
Mon, 02 September 2013 13:20 |
|
But adjust what? The settings didn't change before and after the import (it worked before)... All the obvious things look correct (the paths, WWW_ROOT, etc.)
|
|
Re: Moving from Windows to Linux |
Mon, 02 September 2013 13:08 |
|
Azrael wrote on Mon, 02 September 2013 08:28FATAL ERROR: No session, check your forum's URL and COOKIE settings.
Check your settings in GLOBALS.php and adjust until the problem goes away.
|
|
Moving from Windows to Linux |
Mon, 02 September 2013 02:28 |
|
I'm trying to move my forum from a Windows server to a Linux server. I installed the same version of FUDforum on Linux as I have on Windows (3.0.4), exported my data in windows (via 'Make forum data dump') and imported on the Linux side (I used the command 'php -q admimport.php /home/FUDforum_13_06_2013_02_16.fud.gz'). It looks like the import was successful, however if I try to use FUDforum on the Linux server, I get the following message:
FATAL ERROR: No session, check your forum's URL and COOKIE settings.
The forum seemed to work ok on the linux side after the initial install but after the import I get the above error.
Any ideas?
|
|