Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Install and Upgrade Help => Topic started by: RedCairo on May 19, 2015, 08:30:59 AM

Title: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 19, 2015, 08:30:59 AM
I have a big forum for years now using SMF (and simpleportal). My webmaster has had some serious health issues so I am not leaning on him to help and am trying to do this myself. My server corp "upgraded" my domain and in the process all the "theme paths" broke (though files were clearly on ftp in same place). Apparently needed 'relative' paths. I changed http://www to //www in the SMF theme panel (saw a ref that this was 'relative') but it didn't fix it. Then I pressed the button at bottom of that admin page which made me think, by its text, that it would "look for / try to find the right paths" -- and broke my forum utterly.

There is a huge ugly 'copyright' page (I've never removed an SMF copyright to my knowledge). It also now says there's an error in the portal theme (there is no theme with that name). Also I can't get to the admin panel to try and figure out/fix anything.

Feeling a little desperate by now, and knowing our SMF was a couple updates behind anyway, I'm wondering if there is some way I can basically just reinstall the latest version of the forum -- wiping out simple portal I guess although in a perfect world its own database stuff would stay somewhere for ref or re-use -- from FTP/www and NOT go through the SMF admin panel?

I'm not sure how that is done, if starting so simply, but I am terrified of wiping out my database which has many years of archives. I'm willing to paypal for some help if it's not much (just 'cause I don't have much till next cycle). It figures that trying to help, I completely broke it all... gah!

http://www.dojopsi.info/forum/index.php?www

Thanks for any guidance,
PJ (RedCairo)

Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: Illori on May 19, 2015, 08:33:05 AM
take a look at What is repair_settings.php? (http://wiki.simplemachines.org/smf/Repair_settings.php), this does require FTP access.
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: ziycon on May 19, 2015, 08:34:38 AM
As long as you don't drop/delete your database you'll be fine, have a look at the repair_settings.php and let us know how you get on.
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: Kindred on May 19, 2015, 09:49:25 AM
also... if you want to clear all your mods (without removing any of the database information that they may have stored -- although most mods will not clean the database when you uninstall them)
http://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files

finally...   once you get the connection information corrected, you really want to think about upgrading to 2.0.10


Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 19, 2015, 10:11:16 AM
Thanks so much you guys. And yeah I was hoping to get fully up to date with it once this was clear.

I downloaded the repair settings file, and FTP'd it up to my server, and filled it out. Blessedly it gave me vars to use for my paths that I think might be the key to resolution. But then...

There are no buttons anywhere. The ones that are supposed to say "save settings" or "remove this file" and so on -- according to the SMF page about this -- they just aren't there. I had to remove the file from FTP (since posting openly with it sitting there with settings would be crazy) so I can't really show you, but suffice to say after the bottom field on the form, that's the end of the page. Wherever the buttons are supposed to be (I just assume at the bottom) they don't show up.

This is so absurd I don't even know what question to ask. In cfml/html it'd be some obvious code issue but that seems unlikely for something sourced from smf I guess.


Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 19, 2015, 10:16:37 AM
Attachment - this image is the bottom left of the screen, so that's where it ends.
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: Illori on May 19, 2015, 10:30:35 AM
do you have an error message at the top of the page telling you Settings.php is not writable?
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 19, 2015, 01:21:49 PM
No. No errors. Looks clean and normal aside from apparently ending before it should.
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 19, 2015, 04:17:56 PM
I think there is something wrong with the version of the file you guys have for download.

I tried it in firefox also, same thing (was using chrome).

View-source shows this at the end:

<td style="padding-bottom: 1ex;">
<input type="text" name="dbsettings[attachmentUploadDir_1]" id="attachmentUploadDir1" value="/vservers/dojopsiinfo/htdocs/forum/attachments" size="60" style="width: 80%;" class="input_text" />

And that's it. It ends abruptly there -- no completion of the form, the table, or the html page.

Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: Kindred on May 19, 2015, 04:31:49 PM
I think you may have issues on your side, not in our archive....
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 19, 2015, 06:11:43 PM
OK. I have another separate server also running SMF (an even more ancient version) barely used. Same version of linux/php. I dropped it over there and it displays fine -- far more complete.

Seriously, I did not know php was such rocket science compared to html or even coldfusion. What do you suppose might cause your php file to 'truncate' like that on my server? In my world that is just bizarre behavior and in cfml it would always be a code error not something "about the server" which it's acting like here.

Since it seems like my only chance at fixing the problems, and I have deleted and reuploaded the file, and tried it in different browsers, and it still just abruptly truncates right after the attachments directory field -- I don't know where to go from here.

Any guidance would be most greatly appreciated.
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 19, 2015, 06:14:47 PM
Could it relate to the message on the form about a value not found? Since this is a folder for the forum (as opposed to an error for the page) I hadn't thought so, but maybe?  screenshot.
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: Kindred on May 19, 2015, 06:19:03 PM
no that just means that your cache directory was never set in Settings.php

I think that you are having issues with the upload of the file(s) which is why they are truncating like that
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 19, 2015, 06:59:44 PM
Thank you again. So with that in mind, I investigated a bit more.

The file transferred fully and has the same byte size as the original.

The permissions however were not 755. The forum folder is but the files inside it were not. I hope I didn't break something worse now but I applied the 755 permission to all files recursively inside the forum folder.

The FTP (filezilla) now shows same file, same byte size, with 755 permissions.

I cleared cache and tried again but... still the truncation. :-(

Meanwhile I can't back up the bloody database because my webserver interface says something about limited 'time' permissions in the php which is the scourge of paying for shared servers, if my timeouts in cfml are any indicator... I won't need to leap from a ledge if I lose it because a whole tiny niche field of people will kill me. This is just one of those weeks I think lol.

So do you think maybe doing this:
http://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
would solve anything, or would it be pointless if the issue is something related to FTP?
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 19, 2015, 07:11:24 PM
Sorry I forgot to add the screenshot from FTP.
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 19, 2015, 07:24:22 PM
In the meantime it is mortifying to have the site broken and the giant copyright claim on it since I did not ever, not ever, delete anybody's copyright. Is there a tiny script somewhere I could run that would simply put the forum in maintenance mode and maybe avoid that?
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: Illori on May 19, 2015, 07:42:55 PM
http://wiki.simplemachines.org/smf/Maintenance_mode

in your case i think $maintenance = 2; would be your best option.
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: Kindred on May 19, 2015, 07:52:43 PM
Well, the other option is that your files may have some bad code in them which is causing them to stop output early... In which case, uploading a clean set offices should fix that.
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 19, 2015, 10:17:28 PM
Thank you!  A blank white page is better than the alternative in that case. Hopefully it won't be long...

I set it to 2, and FTP'd it up and called the file. White page... all good.

Out of curiosity, I set it to 1 out of curiosity, reuploaded the file, called the page... still white. Guess it's the same end result.

Then:
I followed the instructions on the (earlier) linked page.
0. Downloaded the whole forum from FTP so I could restore anything necessary.
1. Downloaded the 'upgrade' package that I think (I hope) is the version of forum I have currently (2.0).
2. Unzipped it. Moved all the upgrade*.* files elsewhere so they would not get written to the server.
3. Removed the sources/themes folder from the FTP server.
4. Uploaded the rest to FTP omitting the avatars and smilies folder.
5. Realized I still need to change back to 0 and run Settings.php so I do that.

Forum... still white page. Downloaded the Settings.php file from the server to a new folder to look at what is 'really' there (in case my upload didn't go right) as the value of $maintenance. It's 0. So it's what I expected. Cleared cache, called it again. Forum... still white page.

Thought maybe deleting the packages folder rather than just overwriting with new stuff might have been a bad idea. FTP all the contents from the old version back to the server. Then recopy from the 'upgrade' (new from smf) folder back to the server again in case it overwrites something it should.

On the bright side, aside from attachments, smilies and avatars, I believe all the files there....

So I'm wondering, when those instructions say to be sure to delete all the upgrade files, might they mean "after running them" or something? Because the way it's written, it seems like you remove them first and then upload your stuff. Is that dense? I'm trying not to take anything for granted... don't want to kill my database. :-)

Thanks again.


Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: Kindred on May 19, 2015, 10:41:03 PM
well, that is part of your problem....   you do not currently have 2.0.x   -- because that copyright warning is no longer displayed for the 2.0.x versions.

So, yes...  if you uploaded 2.0.10, then please do run the upgrade.php
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 19, 2015, 11:29:54 PM
Hmmn. Saw a file in FTP that made me think that was it... couldn't get in to see anymore so.... Well, I downloaded (and put on FTP) 2.0 not 2.10, but I could do that if it's better? I was trying to choose what I thought I had but at this point maybe it doesn't matter.

So reading the ugprade info, I did the file permissions change per instructions. I called upgrade.php and... I still get a white screen, nothing.

I made sure of the value of that Settings.php file (put it back, I had taken it off the server) as maintenance being zero (0), repeat running doesn't affect anything. White screen.

Tried the upgrade file a few times more again. Cleared all caches and tried again.  ...White screen.

Well that earlier action really really effectively took care of the copyright notice I will give it that.

I don't know why I can't get anything but a white screen despite repeatedly uploading, checking (permissions and size) of Settings.php file, checking values in file, calling it and from multiple browsers, same for upgrade.php file as well.

I am seriously starting to feel like the universe is conspiring against me. Meanwhile I'm trying to get a local version of mysql set up so maybe I can download this database so I don't have to be so terrified about killing it with whatever I'm doing with the forum.

Any other ideas are welcome. I'm kind of exhausted from it and I can't believe what altruists you guys are, helping kvetching people like me all the time here. Many many thanks for sure.
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: Dav999 on May 20, 2015, 02:01:59 AM
A white page sounds like a PHP error...

Does the forum say anything if you make a file called .htaccess in your forum folder with the following contents:
php_flag display_errors on
php_value error_reporting -1
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 20, 2015, 02:20:49 AM
Thank you. I made the file and uploaded it and called it.

Error occurred: 500 - internal server error

Apache Server at: s61408.instanturl.net


That doesn't tell me much. :-(

I noticed something on FTP that was not present earlier (unless I reverse-hallucinated earlier...).

These files:

index.php~
SSI.php~
ssi_examples.php~

On the FTP server all have tildes at the end of their names. I'm sure they didn't earlier and the files on my hard drive (both from my previous download of the whole site, and the ones from the new 2.0 'upgrade package' download earlier) do not have this. Weird.
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: Topman on May 20, 2015, 03:58:12 AM
RedCairo, You and me both are having virtually the same problems.
See "A little help Upgrading from 1.1.21 to 2.0.10"

All I have managed to do is get the 2.0.10 full install to work but with a new database no previous data which is obviously no good.

In the meantime, my current working forum is still 1.1.21 and all attempts to upgrade have ended in failure.

At least we are no alone!

Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: Topman on May 20, 2015, 04:04:44 AM
QuoteI am seriously starting to feel like the universe is conspiring against me. Meanwhile I'm trying to get a local version of mysql set up so maybe I can download this database so I don't have to be so terrified about killing it with whatever I'm doing with the forum.

You should not be messing about with SMF files if you have not got a back up copy of your working database downloaded on your PC.

You are running quite a risk.  I uploaded a couple of copies of my database to new MSql databases numbers and can therefore play with SMF and the files and install in the knowledge that I have not at least lost my forum completely.  Like you it has been going for several years.

Quotethe universe is conspiring against me
You and me both matey!
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: Dav999 on May 20, 2015, 06:21:34 AM
Since .htaccess seems to result in an internal server error, remove that file again.

Can you find a PHP error log anywhere in your FTP tree?
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 20, 2015, 11:09:12 AM
Hmmn. I don't see anything that looks like that, although I don't know exactly what I'm looking for, aside from a file that says err* or log somewhere in its name.

Hopefully I can have the database fully backed up by tonight (I work for a living and it isn't this stuff, so time is limited) at which point, once I have that, I hope there is some way to just do a whole new install and then restore the db to it or something. Surely I can't be the first person in the world to run into this...
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 23, 2015, 01:11:07 PM
Well so far I haven't solved this though I had to take some time off and work for a living alas. Forum still utterly down. Server corp has upgraded several other of my sites, causing issues (with file permissions, with 'missing' files from the previous few days to final transfer, with DNS entries where A and WWW records differ) and I have another tiny personal version of SMF on another machine they just upgraded and it has exactly the same problem now -- the message at the top that the theme directory is not found.

Meanwhile I got MySQL 5.6 downloaded and installed and have been reading its docs but my brain is about to explode. Holy mother of -- why, after all these years, does anything need to be so complicated? Is there not a GUI shell that will let me just put in my db settings and say "OK back up that remote server db to my local"?? Do you guys know of anything like this? I can't even get through all the stuff about db types (I thought the db type was "MySQL" shows you what I know) and backup types and more. I just want a way to save this bloody database and be able to restore it so I can do a 100% clean install of SMF modern version and then reimport my database into it. This should be possible, right??

Do you guys know of any GUI admin/program that will let me do this with MySQL?

Thanks a ton for any help,
PJ
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: Illori on May 23, 2015, 04:17:57 PM
take a look at http://www.phpmyadmin.net/home_page/downloads.php
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: Topman on May 25, 2015, 02:57:52 AM
I am still in the same boat as you - unable to upgrade due to something wrong with the database.
At least I do have a working version of my forum and database even if it is 1.1.21!

If I could help you I would.
If I ever get to the bottom of my issues I will be sure to post here to see if it helps you RedCario
Title: Re: If SMF=broken, can I reinstall w/o losing db?
Post by: RedCairo on May 25, 2015, 05:31:34 AM
I installed phpMyAdmin but can't get the remote server info added without breaking it. I tried to use the backup tool that UniServer Zero XI offers but it won't connect to my DB although I can do it via my coldfusion app no problem. You know... universe conspiring. Forum still totally down.

I was so desperate this morning I finally had to ask my ex for help. That is pretty desperate. He has agreed to work out saving the db and then reinstalling fresh modern SMF and then putting the data back in. Hopefully... this will go well. I'll have to pay him but before the forum members arrive to lynch me, losing money rather than blood is probably a better alternative. ;-) Hope it works.