Install from scratch to replace existing forum - best method?

Started by Gryzor, May 10, 2011, 03:20:44 AM

Previous topic - Next topic

Gryzor

Hello guys,

Since my package manager has been well and truly screwed for a while now, I need to install SMF from scratch for my forum.

I would like to make it as safe as possible, so I was thinking of installing it to a new directory (say, /forumnew instead of /forum), then after I have finished and everything is working correctly move it to /forum. If I do that, what should I take care of? Obviously I should change the forum path in Settings.php, but is there something else I should worry about?

Thanks,
Th

Baby Daisy

あなたは私のお尻にキスするとき、私はそれを愛する

Aleksi "Lex" Kilpinen

What exactly is the problem with the package manager? Just asking to know if there would be something else you could do.

Basically, reverting all Source files to a fresh clean state is actually easy - You can do a large upgrade to the latest version of the branch of your choice. A large upgrade effectivily removes all installed modifications, (from the default themes - custom themes may keep leftover code in them), and updates all default SMF files to latest versions of them.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Gryzor

@Baby Daisy: thanks man, (ooh, sorry - lady!!! caught that just in time!), you learn something new every day. Will try it right away!

@Aleksi: I've posted a few posts before, never solved it. Basically I get things like packages installing reportedly with success but then nothing happens, or I may try to install a package and the Manager will give me the details for another package...

My RC5 update was a large one, but the problems are still there...

[EDIT] Ran repair_settings.php, tried a mod I consistently had problems with (the SMFPacks Like Pro mod), seems to have installed fine! Will keep testing... lots of thanks coming your way, Baby Daisy!

Aleksi "Lex" Kilpinen

OK, sounds strange really - but it might be the case that the package manager believes it has the rights to edit files, and doesn't warn about permissions because of that - and in reality it fails to write files and the edits fail.

Have you tried installing a mod so that you first manually make sure your /packages and all files in, as well as all files the mod will need to edit, are writable and accessible to PHP? ( Meaning make sure all those files are, depending on your server congig, either 777 or 755 )

Before doing this, you might also want to make sure that if there is a folder called /Packages/temp, it is empty and also writable.

I doubt that the package manager problems would disappear with a new install, if they didn't disappear with a large upgrade.



EDIT: Didn't see your last edit there - but if that solved your problems, then there must have been some setting wrong somewhere - or, alternatively it's just a coincidence....
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Gryzor

I have spent a lot of time checking persmissions and I'm pretty sure they're all correct. Just a note about the temp folder, I was stuck with this for a while since there was a 'tmp' folder in Packages so I couldn't figure it out. Then it dawned on me that the correct form is Temp and I could go on encountering more problems :D Regarding this, I feel that the errors the systems spits up should be more verbose - it would really help.

Thanks for pointing out the thing about large upgrades, it's really useful. I'm currently trying to work things out with settings_repair. If I understand it correctly, doing a large upgrade is like installing anew but keeping the db connections?

[EDIT] Now some of the links in the Admin panel are dead, but not all of them. Like Core Features - in Opera I get a blank page, in Chrome I get this message:

QuoteServer error
The website encountered an error while retrieving http://cpcwiki.eu/forum/index.php?action=admin;area=securitysettings;fae7388=d0226304d5642fb4227cdc6e12a482bf. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this web page later.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

Hmmm... very strange...

Aleksi "Lex" Kilpinen

Quote from: Gryzor on May 10, 2011, 03:40:15 AM
Thanks for pointing out the thing about large upgrades, it's really useful. I'm currently trying to work things out with settings_repair. If I understand it correctly, doing a large upgrade is like installing anew but keeping the db connections?
Yes, basically the large upgrade reverts all default SMF files to their original state - but does nothing to the contents of your database.
( Except updates it if there is something to update ) So all posts etc. remain intact. ( Of course, it's always a good idea to make backups of everything, before experimenting with things :) )
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Gryzor

Re: backups: "Aaaaalways bring a towel!" :D Struggling with the missing Admin pages now... I wrote about it above while you were posting yours.

Aleksi "Lex" Kilpinen

If you have access to your servers error logs, see what gets logged there when the HTTP 500 error occurs.
It usually suggests a problem directly on the server side.

EDIT:

You can also try using the repair_settings.php you just got to know about, and disable hostname lookups - and see if that helps ;)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Gryzor

Unfortunately the PLESK panel doesn't give me access to the error logs, only the access log (bummer). In repair_settings there's nothing about hostname lookups? Or you mean the queryless URLs (what does this do after all?)? I tried that and still get the same.

[EDIT]It's worth noting that the panel worked perfectly till this morning (I'm always in there...), seems the problem started after I repaired the settings!

NanoSector

If the files are CHMODed to 777, CHMOD them a little lower to 755 and see if that helps :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Gryzor

Quote from: Yoshi2889 on May 10, 2011, 04:06:55 AM
If the files are CHMODed to 777, CHMOD them a little lower to 755 and see if that helps :)

But which files? :)

NanoSector

Quote from: Gryzor on May 10, 2011, 04:07:48 AM
Quote from: Yoshi2889 on May 10, 2011, 04:06:55 AM
If the files are CHMODed to 777, CHMOD them a little lower to 755 and see if that helps :)

But which files? :)
Try to CHMOD your whole installation :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Aleksi "Lex" Kilpinen

Quote from: Gryzor on May 10, 2011, 04:03:50 AM
Unfortunately the PLESK panel doesn't give me access to the error logs, only the access log (bummer). In repair_settings there's nothing about hostname lookups? Or you mean the queryless URLs (what does this do after all?)? I tried that and still get the same.

[EDIT]It's worth noting that the panel worked perfectly till this morning (I'm always in there...), seems the problem started after I repaired the settings!
Ok, might be that I remembered incorrectly - I thought that setting is in repair_settings as well - Can't make sure right now.
But usually 500 errors stem from something specific the server can't hadle. And lately we've seen a fair number of reports of 500 and 403 errors coming from mod_security updates on the server side. That is not to say this must be a similar case, but it would have been nice to see what the error was about.

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Gryzor

@Yoshi:Ooh, really? Ok, gimme a couple of days... :D

Seriously, is this safe? It'd be nice if there was a script that fixed permissions system-wide with one click. I'm addicted to such a tool on my Android phone, since I've been tweaking it to no end :)

@Aleksi: so I'm stuck I guess... will try to find any other logs, though I don't find it very likely :(

Aleksi "Lex" Kilpinen

No real huge risk in chmodding everything writable for testing - but you probably shouldn't leave everything writable when you are done.
Sources and Themes and files in the installations root, don't need to be writable normally (except for editing, mod installs etc. )
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Gryzor

Is there a guide for permissions that I could follow after chmodding the hell out of it to return to normal?

Just 755'ed the Sources folder, same problem persists.

[EDIT] BTW, can someone give me the direct url for Core Features? Just to try it out...

Aleksi "Lex" Kilpinen

I'm afraid there isn't really, unless I'm mistaken. The SMF package manager does contain a tool for managing permissions, and that has a few "default" sets built in - but I'm afraid your situation sounds a bit like it might not be a viable option to try and use it as a first option.

Corefeatures:
/index.php?action=admin;area=corefeatures
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Gryzor

Yeah, still blank page.

I've seen the permissions functionality indeed, not extremely helpful...

Aleksi "Lex" Kilpinen

Could you ask your host to check the 500 errors in the log, and ask if they can give you a snippet of the log or a direct explanation of what causes it? It is usually the best way to approach 500 errors to look at the logs, and start from there.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: