FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » importing data after server move
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Re: importing data after server move [message #11063 is a reply to message #11062] Tue, 17 June 2003 14:36 Go to previous messageGo to next message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member
We have done what you said but stil not working when we make a new post with a picture file attached we van see it only the old attached files are still blank with red cross in it
Re: importing data after server move [message #11064 is a reply to message #11063] Tue, 17 June 2003 14:39 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You clearly have not done what I said, because I asked you to check if the fsize field had values >0. You never replies on whether it did or not, so I have no idea what's going on.

FUDforum Core Developer
Re: importing data after server move [message #11065 is a reply to message #11064] Tue, 17 June 2003 14:43 Go to previous messageGo to next message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member
mysql> use mbforum;

Database changed

mysql> show databases;

+-------------+

| Database |

+-------------+

| berny |

| blueicez_db |

| ece |

| ece2 |

| haiawcure |

| horde2 |

| lubje |

| lyon |

| lyon_klooi |

| mbforum |

| mysql |

| nvb |

| nvb_forum |

| onno |

| pdns |

| phpmyadmin |

| prefab |

| stealth |

| stealthrsf |

| test |

| thuru |

| topsitez |

| trancekiwi |

| wracky |

| yourgsm |

+-------------+

25 rows in set (0.00 sec)



mysql> show tables;

+-------------------------+

| Tables_in_mbforum |

+-------------------------+

| fud23_action_log |

| fud23_ann_forums |

| fud23_announce |

| fud23_attach |

| fud23_avatar |

| fud23_blocked_logins |

| fud23_buddy |

| fud23_cat |

| fud23_custom_tags |

| fud23_email_block |

| fud23_ext_block |

| fud23_forum |

| fud23_forum_notify |

| fud23_forum_read |

| fud23_group_cache |

| fud23_group_members |

| fud23_group_resources |

| fud23_groups |

| fud23_index |

| fud23_ip_block |

| fud23_level |

| fud23_mime |

| fud23_mlist |

| fud23_mod |

| fud23_mod_que |

| fud23_msg |

| fud23_msg_report |

| fud23_nntp |

| fud23_pmsg |

| fud23_poll |

| fud23_poll_opt |

| fud23_poll_opt_track |

| fud23_read |

| fud23_replace |

| fud23_search |

| fud23_search_cache |

| fud23_ses |

| fud23_smiley |

| fud23_stats_cache |

| fud23_themes |

| fud23_thr_exchange |

| fud23_thread |

| fud23_thread_notify |

| fud23_thread_rate_track |

| fud23_thread_view |

| fud23_title_index |

| fud23_user_ignore |

| fud23_users |

+-------------------------+

48 rows in set (0.00 sec)



mysql> SELECT id,size FROM fud23_attach ORDER BY id LIMIT 100;

ERROR 1054: Unknown column 'size' in 'field list'
Re: importing data after server move [message #11066 is a reply to message #11065] Tue, 17 June 2003 14:44 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The query should be:
SELECT id,fsize FROM fud23_attach ORDER BY id LIMIT 100; 


FUDforum Core Developer
Re: importing data after server move [message #11067 is a reply to message #11066] Tue, 17 June 2003 15:13 Go to previous messageGo to next message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member
Nothing has changed files are still blank with red cross

mysql> use mbforum
Database changed
mysql> SELECT id,fsize FROM fud23_attach ORDER BY id LIMIT 100;
+-----+---------+
| id | fsize |
+-----+---------+
| 1 | 21350 |
| 3 | 120357 |
| 4 | 91311 |
| 8 | 66687 |
| 9 | 51741 |
| 10 | 20901 |
| 11 | 33714 |
| 12 | 45288 |
| 14 | 28385 |
| 18 | 155623 |
| 19 | 71887 |
| 20 | 143310 |
| 26 | 159034 |
| 27 | 33946 |
| 29 | 37410 |
| 32 | 56245 |
| 33 | 31096 |
| 34 | 80468 |
| 35 | 28962 |
| 40 | 30585 |
| 43 | 59905 |
| 44 | 88191 |
| 45 | 660674 |
| 51 | 156521 |
| 52 | 41386 |
| 54 | 36775 |
| 57 | 48384 |
| 59 | 38437 |
| 60 | 74965 |
| 63 | 65344 |
| 64 | 95331 |
| 65 | 36211 |
| 77 | 50355 |
| 78 | 103472 |
| 79 | 72275 |
| 80 | 74689 |
| 81 | 301415 |
| 86 | 54723 |
| 87 | 50116 |
| 88 | 66237 |
| 89 | 61889 |
| 91 | 16890 |
| 93 | 89446 |
| 94 | 14234 |
| 95 | 16034 |
| 97 | 51202 |
| 100 | 39778 |
| 103 | 21401 |
| 105 | 35118 |
| 111 | 34496 |
| 115 | 33736 |
| 116 | 4664 |
| 117 | 8449 |
| 118 | 28066 |
| 119 | 8449 |
| 125 | 127524 |
| 128 | 39433 |
| 129 | 10632 |
| 131 | 47886 |
| 136 | 264011 |
| 139 | 118004 |
| 141 | 77416 |
| 142 | 58994 |
| 143 | 24618 |
| 145 | 20411 |
| 148 | 25985 |
| 150 | 31005 |
| 159 | 65649 |
| 161 | 36302 |
| 162 | 65356 |
| 164 | 259838 |
| 167 | 39781 |
| 168 | 137001 |
| 169 | 215098 |
| 171 | 59935 |
| 173 | 63163 |
| 174 | 63110 |
| 175 | 1294807 |
| 176 | 646799 |
| 177 | 636272 |
| 181 | 276372 |
| 182 | 142596 |
| 183 | 40142 |
| 184 | 92913 |
| 185 | 118182 |
| 186 | 85589 |
| 187 | 32130 |
| 189 | 19867 |
| 190 | 91313 |
| 191 | 180091 |
| 192 | 82539 |
| 193 | 91313 |
| 194 | 180091 |
| 195 | 82539 |
| 199 | 45165 |
| 200 | 45165 |
| 201 | 45165 |
| 202 | 45165 |
| 205 | 21984 |
| 206 | 21764 |
+-----+---------+
100 rows in set (0.00 sec)

Re: importing data after server move [message #11071 is a reply to message #11067] Tue, 17 June 2003 15:22 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
This is just info gather query it wouldn't solve anything, it just helps isolate the problem.
The next step is to modify the

getfile.php script.

Find the line which has:

<?php
@fpassthru(@fopen($r[2], 'rb'));
?>


and change it to:

<?php
fpassthru
(fopen($r[2], 'rb'));
?>


Then try to access and see if you get any error messages
http://www.mercedesbenzclub.nl/forum/index.php?t=getfile&id=128


FUDforum Core Developer
Re: importing data after server move [message #11074 is a reply to message #11071] Tue, 17 June 2003 15:48 Go to previous messageGo to next message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member
did you mean file getfile.php.t

in map /var/www/www.mercedesbenzclub.nl/forum/src


or only file name getfile.php
Re: importing data after server move [message #11075 is a reply to message #11074] Tue, 17 June 2003 15:52 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
no, I mean the file getfile.php you can find it inside

/var/www/www.mercedesbenzclub.nl/forum/theme/default/ (most likely)


FUDforum Core Developer
Re: importing data after server move [message #11076 is a reply to message #11075] Tue, 17 June 2003 16:21 Go to previous messageGo to next message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member
we did what you said and now we get this if we follow the link:


http://www.mercedesbenzclub.nl/forum/index.php?t=getfile&id=128


<br />
<b>Warning</b>: fopen("/usr/local/httpd/htdocs/www.mercedesbenzclub.nl/forum/files/128.atch ", "rb") - No such file or directory in <b>/var/www/www.mercedesbenzclub.nl/forum/theme/default/getfile.php</b> on line <b>162</b><br />
<br />
<b>Warning</b>: fpassthru(): supplied argument is not a valid File-Handle resource in <b>/var/www/www.mercedesbenzclub.nl/forum/theme/default/getfile.php</b> on line <b>162</b><br />

Re: importing data after server move [message #11078 is a reply to message #11076] Tue, 17 June 2003 16:57 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Aha, I see the problem and now we can solve it Smile

The forum looks for file attachments inside:
/usr/local/httpd/htdocs/www.mercedesbenzclub.nl/forum/files/

BUT according to your prior messages the file attachments are actually inside:

/var/www/www.mercedesbenzclub.nl/forum/files/

The solution is move files from:
/var/www/www.mercedesbenzclub.nl/forum/files/
to:
/usr/local/httpd/htdocs/www.mercedesbenzclub.nl/forum/files/

That'll solve the attachment problem.


FUDforum Core Developer
Re: importing data after server move [message #11080 is a reply to message #8920] Tue, 17 June 2003 17:07 Go to previous messageGo to next message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member
you said:

The solution is move files from:
/var/www/www.mercedesbenzclub.nl/forum/files/
to:
/usr/local/httpd/htdocs/www.mercedesbenzclub.nl/forum/files/



/usr/local/httpd/htdocs/www.mercedesbenzclub.nl/forum/files/

is the old server root the new server root is on

/var/www/www.mercedesbenzclub.nl/forum/files/
Re: importing data after server move [message #11081 is a reply to message #11080] Tue, 17 June 2003 17:11 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The bottom line is this according to the error message the file attachments are being looked for inside:
/usr/local/httpd/htdocs/www.mercedesbenzclub.nl/forum/files/

If they are not there you'll keep getting the error you are seeing.


FUDforum Core Developer
Re: importing data after server move [message #11082 is a reply to message #11081] Tue, 17 June 2003 17:16 Go to previous messageGo to next message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member
can we change that? usr/local/httpd/htdocs/www.mercedesbenzclub.nl/forum/files/

becaurse that is the old server which is no more online the whole forum is moved to a new server with root of the files directori to

/var/www/www.mercedesbenzclub.nl/forum/files/

Re: importing data after server move [message #11083 is a reply to message #11082] Tue, 17 June 2003 17:19 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I suppose you could change that, you'd need to edit GLOBALS.php and change the value of the $FILE_STORE variable.

FUDforum Core Developer
Re: importing data after server move [message #11088 is a reply to message #11083] Tue, 17 June 2003 17:31 Go to previous messageGo to next message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member
in globals.php the string is correct

$FILE_STORE = "/var/www/www.mercedesbenzclub.nl/forum/files/";
$FORUM_SETTINGS_PATH = "/var/www/www.mercedesbenzclub.nl/forum/cache/";
Re: importing data after server move [message #11089 is a reply to message #11088] Tue, 17 June 2003 17:38 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Then you need to make sure the location inside the database is correct by running the following query:
UPDATE fud23_attach SET location=REPLACE('/usr/local/httpd/htdocs/www.mercedesbenzclub.nl/forum/files/','/var/www/www.mercedesbenzclub.nl/forum/files/', location);


FUDforum Core Developer
Re: importing data after server move [message #11094 is a reply to message #11089] Tue, 17 June 2003 18:51 Go to previous messageGo to next message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member
I think we have more problems in the forum

I pressed in admin controll panel on Forum Consistency

what results in killing the forum and giving the following errors now

Parse error: parse error in /var/www/www.mercedesbenzclub.nl/forum/include/GLOBALS.php on line 153

Warning: Access denied for user: 'www-data@localhost' (Using password: NO) in /var/www/www.mercedesbenzclub.nl/forum/index.php on line 64

Warning: MySQL Connection Failed: Access denied for user: 'www-data@localhost' (Using password: NO) in /var/www/www.mercedesbenzclub.nl/forum/index.php on line 64

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /var/www/www.mercedesbenzclub.nl/forum/index.php on line 64

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /var/www/www.mercedesbenzclub.nl/forum/index.php on line 64

Fatal error: SQL Error has occurred, please contact the administrator of the forum and have them review the forum's SQL query log in /var/www/www.mercedesbenzclub.nl/forum/index.php on line 52
Re: importing data after server move [message #11095 is a reply to message #11094] Tue, 17 June 2003 18:53 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Check your GLOBALS.php it is probably missing a ?> at the end.

FUDforum Core Developer
Re: importing data after server move [message #11099 is a reply to message #11095] Tue, 17 June 2003 19:06 Go to previous messageGo to next message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member
wow txs i have recoverd it Smile I have to wait for my friend jelle he is the owner of the server and he wil do then what you said


UPDATE fud23_attach SET
location=REPLACE('/usr/local/httpd/htdocs/www.mercedesbenzclub.nl/forum/fil e
s/','/var/www/www.mercedesbenzclub.nl/forum/files/', location);


when that is done i will tell you the result of it

strange is when i make new topics i can place and attached files what is able to see


yours Gregor
Re: importing data after server move [message #11101 is a reply to message #11099] Tue, 17 June 2003 19:07 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
That's not strange, because the new files get placed in the new directory and the forum knows to look for them there.

FUDforum Core Developer
Re: importing data after server move [message #11158 is a reply to message #10994] Thu, 19 June 2003 21:30 Go to previous messageGo to next message
Micha37 is currently offline  Micha37   Germany
Messages: 77
Registered: October 2002
Karma: 0
Member
Hi Protoss,

do you have any solution to my problem or are you out of ideas.

I really wonder, why a 1:1 copy of the database and the files do not work on the new server. If you wish, I could send you the access data to my server and MySQL database by PM.

Alternatively is there no script, which can import the old forum messages into a newly installed forum.

Thanks in advance

Michael

Re: importing data after server move [message #11165 is a reply to message #11158] Thu, 19 June 2003 23:38 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Send me the relavent info and I'll try to take a look.

The problem is that the easiest solution (upgrade script) unfortunately does not appear to be an option due to your limited script execution window :/


FUDforum Core Developer
Re: importing data after server move [message #11178 is a reply to message #11165] Fri, 20 June 2003 22:39 Go to previous messageGo to next message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member
hello prtoss forum is running again but we have a new problem

/var/www/www.ece.onthanet.nl# ps auxw | grep mysql | wc -l
105

it is not killing te users who left the forum and is eating all the sql conections


we changed to local host in glabal settings but then it gives error

Warning: User gregor@localhost has already more than 'max_user_connections' active connections in /var/www/www.mercedesbenzclub.nl/forum/index.php on line 64

[Updated on: Fri, 20 June 2003 22:41]

Report message to a moderator

Re: importing data after server move [message #11180 is a reply to message #11178] Fri, 20 June 2003 22:43 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Do not use persistent connections Smile

When you do use persistent eventually each httpd process has an sql connection open. And if you use >1 database that number may become obsenely large.


FUDforum Core Developer
Re: importing data after server move [message #11181 is a reply to message #11180] Fri, 20 June 2003 22:51 Go to previous messageGo to next message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member
okay thank you we have switched that mode off now
Re: importing data after server move [message #11182 is a reply to message #11181] Fri, 20 June 2003 22:52 Go to previous messageGo to next message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member

Other problem is also that we can not make a datadump afther we have upgraded the forum do you have a selotiun for that?

[Updated on: Fri, 20 June 2003 22:53]

Report message to a moderator

Re: importing data after server move [message #11183 is a reply to message #11182] Fri, 20 June 2003 22:57 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Do you get an error (if so what is it)?

FUDforum Core Developer
Re: importing data after server move [message #11185 is a reply to message #8920] Fri, 20 June 2003 23:10 Go to previous messageGo to next message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member
Hi, I am the maintainer of the websites box (using gserbans login, not in the mood to create my own Smile)

First of all, I dont know the whole history.

What happened was that FUD started eating mysql connections. I pinned down mysql to block any over 25. As you noted the persistent connection setting could go problematic with a child spawning apache. Disabled the feature, not working.

The odd thing in fact is that the site seems to be connection on various hosts. The config mentions 'localhost' but I see quite some connections to 'viper.onthanet.nl' (the machines revdns). It could be because I changed this recently to debug this issue.

What seems to be happening is that you in the code fire some queries or whatsoever and that PHP somehow doesnt kill the mysql connection at the end of the scope. Weird, but true.

If you need any other enlightment feel free to contact me roeland(at)viper(dot)onthanet(dot)nl

Regards,

Roeland Nieuwenhuis
Re: importing data after server move [message #11189 is a reply to message #11185] Fri, 20 June 2003 23:18 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Hmm weird indeed, by the termination of the request PHP is supposed to close any open nonresistant connections. The fact it does not implies a bug in PHP. On my servers in addition to avoiding using persistent connections (the fact you see different connect string my be the result of other users using persistent connections) I also set mysql timeout to something like 2 minutes. Meaning that if no data is sent by php with 120 seconds of the last communication MySQL will drop the connection itself.

FUDforum Core Developer
Re: importing data after server move [message #11190 is a reply to message #8920] Fri, 20 June 2003 23:25 Go to previous message
gserban is currently offline  gserban   Netherlands
Messages: 26
Registered: June 2003
Karma: 0
Junior Member
Hmm yes but timeouting is going to give problems with other software (my own.. using singleton patterns to keep concurrency..)

I will try to dig into it.. it is hard to find the problem here, I will notify you if I will.

Regards

Pages (2): [ «    1  2]  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Can not post attachments with Mozilla/Firebird?
Next Topic: My category disappear
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 05 13:24:53 GMT 2024

Total time taken to generate the page: 0.03265 seconds