Upgrading from 2.0.13 to 2.0.14 broke our forum

Started by probeman, August 25, 2017, 03:01:02 PM

Previous topic - Next topic

probeman

First off- I know next to nothing about UNIX server systems, but yesterday I was having issues where I couldn't edit a user post and change an attachment- basically after clicking Modify the page would just sit there forever- so I decided to check if there was an update and saw that I was at 2.0.13 and 2.0.14 was available.

I think I clicked the install button, and the install seemed to go too quickly, but then I started getting an error when trying to access forum main web page about "function name must be string in... htdocs/smf/Sources/Load.php on line 133.

So I called network solutions (our domain provider) and we tried to update the php to 5.6 and the sql as well, and now the page loads with a

500: Internal server error

Network Solutions MyTime Support says SMF is an unsupported product so they won't help.   I'm getting desperate, we have a very active user forum, and users are starting to write me that they can't access the user forum.

I tried running the repair smf from the network solutions My Applications page but that didn't help either.

There is a re-install smf option, but they say I would lose all my content.  I have used the database backup recently so in principle I do have the content backed up.  The attachments are in the attachments folder and the images are in the Gallery folder, so I guess they should be OK.

What can I do to get my user forum back up?  Help, please.

Illori

what is the complete error message you are receiving?

probeman



500: Internal server error

This error is generated when a script running on the server could not be implemented or permissions are incorrectly assigned for files or directories

Troubleshooting suggestions:

Temporarily disable any rewrite rules by renaming your .htaccess file if it exists.

Ensure that any CGI or Perl scripts have at least .755. permissions.

If trying to run PHP and you get this error, you may have an invalid php.ini in your /cgi-bin, or may be missing your php.dat file in this folder.

Colin

Can you check the server error log and please give use the full error message.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

probeman

I called network solutions and they said that error logging was not on, so they turned it on but now they say it takes 24 hours to generate the first error log!

So as soon as I get the error log I will post it here.

Thank-you so much for your help on this.
john

PS Too bad that even their MyTime Support which they charge me for won't help with SMF issues.

probeman

Will we be able to get the forum back up to where it was since my last database backup (from the Admin web page)? 

I also have an ftp backup of the attachments and Gallery image folders.

I hope nothing is lost, this is a very busy scientific forum:

probesoftware.com\smf

with lots of useful info for many labs around the world...
john

Illori

maybe worth looking for a new host if they dont have error logging on by default.

https://wiki.simplemachines.org/smf/Backup

Colin

Don't worry, none of your data should be lost.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

probeman

Maybe so.

I've been backing up my forum using the SMF Database Maintenance web page in the admin web page.

So I think everything is backed up. 

probeman


Illori

you should NOT be using the admin panel backup. see the link i posted above.

probeman

I don't know if this is interesting, this all started when a user was trying to load a 15 MB pdf as an attachment, but whenever I tried to download the pdf Acrobat would say it was corrupted.

The user said she could download the pdf she uploaded in Acrobat, but I could not. We tried a couple different things removing the post, but whenever I tried to edit her attachment and load a jpg for example, the page would go blank and never appear again.  Then if I tried to go to that #new post, it would be listed under Recent Posts, but if I clicked on the post, the topic would never load.

Not sure if this helps but now I notice that my older database backups (the sql.gz files) slowly increase in size over time, say 2,000 KB, then 2,200 KB, etc.  But the last database backup I did shows a sql.gz file of 10,000 KB.  Almost as though the large pdf file got stuck in the database as opposed to the attachments folder.

Is that possible?

Should I try and restore an older database backup?  Or wait for the error log first?  How does one restore a database backup without the web page loading properly?   Do I unzip it and then ftp it?  What about the file permissions?

Sorry I'm kind of getting panicked.
john

probeman

Quote from: Illori on August 25, 2017, 04:00:22 PM
you should NOT be using the admin panel backup. see the link i posted above.

Yes, I saw that.  But why is it there if it's not supposed to be used?

I have also downloaded everything using ftp, so I have all that from last month at least.
john

probeman

I've pretty regularly used Filezilla (in binary mode) to download the smf folder, so hopefully that data is all OK.  I have that from last month at least.

Another crappy thing about network solutions, that they didn't tell me, but I found out today, is that once your site goes over 2 GB, they stop automatically backing it up for you!

Jeez.
john

Illori


probeman

Quote from: Illori on August 25, 2017, 04:30:27 PM
the database cannot be backed up with FTP.

OK, good to know. 

I do see a list of the smf databases backed up every day in the Manage Databases page on Network Solutions, so I guess once the forum page finally is loadable again, I will be able to restore the database from any day in the last 10 days or so.

Interestingly, the sizes of these recent database backups look much more reasonable at 2,700 KB, as opposed to my last manual backup from the smf admin page which was 10,000 KB, compared to last month's backup at 2,200 KB or so.

Illori

did you read the link i provided? it tells you how to do your own database backup.

probeman

Quote from: Illori on August 25, 2017, 04:48:08 PM
did you read the link i provided? it tells you how to do your own database backup.

Yes, I looked over it and it seems very helpful.  Once I get the darn forum working again I will definitely be doing that.

I guess I'll have to wait at least until an error log is generated overnight so you guys can figure out why the main forum page won't load.

Kindred

a 500 error indicates an error in php with the FILES...   so, nothing that has happened would have affected your database at all.
there should be no need to restore any database.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Illori

while you are waiting, do you know what version of php is running on your server? 2.0.14 requires php 5.4 or higher. this may also help with the error you are getting.

probeman

Quote from: Illori on August 25, 2017, 06:04:10 PM
while you are waiting, do you know what version of php is running on your server? 2.0.14 requires php 5.4 or higher. this may also help with the error you are getting.

It was running v. 5.3 PHP I think, but after it failed the SMF update from 2.0.13 to 2.0.14, the NS people had me update the PHP and SQL servers both to 5.6 I think.

I can see the databases are 5.6, how do I see what PHP version I have? Just to double check.
john

Sir Osis of Liver

You can find php version in your host control panel.  If forum is running, it's in Admin -> Support and Credits.  Or you can upload attached file to forum root and link to it directly.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

drewactual

fwiw, my thoughts are that most instances of php standard provision install times out quickly by default, and the transfer limit is 2m by default. 

go into your file manager and unload the 2.0.13 backup compressed file- it should pretty much be that easy, and then access your DB and dig that corrupted file (by default php5 to 7 allows 2M max; it didn't swallow the whole thing) and prune it from the table.

you can shut down the pdf file extension and the upload size via the admin control for future protection. 

probeman

I have error logging turned on since yesterday, but no error log yet!

AncientDragonfly

Quote from: Illori on August 25, 2017, 06:04:10 PM
while you are waiting, do you know what version of php is running on your server? 2.0.14 requires php 5.4 or higher. this may also help with the error you are getting.

FWIW, the page generated by:
http://forum.domain.com/index.php?action=admin;area=packages;sa=install;package=smf_patch_2.0.14.tar.gz
says:
QuoteThis release requires at least PHP 5.3 to function. Most hosts should have it or something newer. You can check which version of PHP that you are running by visiting the "Support and Credits" section of the Administration Center.

You can enable the new image proxy feature at Admin -> Configuration -> Server Settings -> General

Sitting here myself on PHP 5.3 with the error:
Fatal error: Function name must be a string in /home/domain/public_html/forum/Sources/Load.php on line 133

Updating the PHP version with cPanel appears to have fixed the error for me, but I haven't been all through it yet, just stopped getting an error when moving to another page. 

But the page seen before the 2.0.14 update is applied appears to be wrong as to what version PHP is required. That should be a simple fix in the patch, shouldn't it, so others who read the instructions don't end up broken with this error message?

Kindred

Actually, no... "fixing" that wording would require a new patch, and thus will not happen, since 2.0.14 is already out there and releasing a new version of 2.0.14 would just cause more confusion.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

AncientDragonfly

Quote from: Kindred on August 26, 2017, 08:50:13 PM
Actually, no... "fixing" that wording would require a new patch, and thus will not happen, since 2.0.14 is already out there and releasing a new version of 2.0.14 would just cause more confusion.

Ok, well,  maybe people will run across this thread if they have a problem with it. 

I would have gone ahead and updated php before doing the 2.0.14 patch if I had known, but I didn't because I thought it would work out with php 5.3 and I'd update php once I was done with the SMF update. 

Anyway, thanks to Illori for saying it, even if updating php didn't fix the OP's problem.  Sure is fast on php 7.0.   :)

Arantor

It doesn't actually require a new patch, it just requires updating the existing one and honestly, it would have been worth doing to avoid the last three months' worth of support hassle. It's not like 2.0.14 didn't already get stealth updated...

lurkalot

Quote from: Arantor on August 27, 2017, 04:35:20 AM
It doesn't actually require a new patch, it just requires updating the existing one and honestly, it would have been worth doing to avoid the last three months' worth of support hassle. It's not like 2.0.14 didn't already get stealth updated...

I agree, it just needs sorting out.  And if I'm reading this thread correctly, https://www.simplemachines.org/community/index.php?topic=555857.0  then this could also apply to the full install zip, and the large upgrade zip which is in the downloads.  2.0.14 comes with two themes, but it sounds like only one of them is actually compatible with 2.0.14 Core hasn't got the login fix applied to it?

Sir Osis of Liver

Login session check is not in Core theme, looking at large upgrade package d/led in June.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

probeman

Hi, I'm the sad newbie that ran into this buzzsaw 4 days ago and started this topic.  Here's the update:

I finally got Network Solutions to help fix their PHP server connection to the SMF database.  Apparently after updating to PHP 5.6 the SMF database was still pointing to the old connection.

The guy there wrote: "The MySQL database had been upgraded, but the configuration was still poinitng to the old database server. Once I updated the database server in /smf/Settings.php the forum started working."

So now the SMF forum is back up, but when I went in again to update to 2.0.14 (I do want the security fixes!), the installer page warned me that there were failures in the test installation and that I should not proceed.

Then I noticed that we used to have a Gallery add-on for placing in-line images in posts, but that link at the top of the page is now missing.  However, previous in-line images are still showing.

Is the Gallery add-on still compatible with 2.0.14?  Or is did the gallery add-on get broken during the PHP and mySQL update?

probeman

I now notice that in the Package Manager | Browse Packages there are several packages listed with a "Install Mod" link.  Including one for the Gallery Lite package.

Is it safe to click these Install Mod links?

I also note that we're now getting lots of spammers since the forum has come back up, and that the "Stop Forum Spam" and "ReCAPTCHA" also have "Install Mod" links visible.

If an "Install Mod" link is visible does that mean it should be reinstalled?
john

Kindred

how did you upgrade?   If you used the patch, then the upgrade would not have removed mods... if you used the large upgrade - or you or your host put a clean set of files, then youd mods would have been uninstalled.

As for "safe to install" mods..

1- always take a backup before doing anything
2- you need to make sure the mods are actually uninstalled.
3- Good Questions are the best spammer prevention method...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

probeman

Thanks for the response.

I think these Install Mod links are present again because I did a reinstall using the Network Solutions Account Manager Re-install link out of sheer panic when the 2.014 update broke my user forum.  But I think that NS re-install installed an old version of SMF.  Then Network Solution restored a more recent backup so I am apparently at 2.013 but the sources folder and themes folders are out of date apparently now.

So now that I am running PHP server 5.6 then I should be able to go ahead and install 2.0.14?  Last time I tried 2.014 it broke my user forum connection.  Then I had network Solutions install PHP 5.6, then they had to modify the php files to point to the new PHP server.

So I guess I am OK to go on 2.0.14?  I see mention of some uncompatible 'themes" in posts above- so is it safe to go ahead to 2.014 now that I'm running PHP 5.6?

probeman

Another question: the Network Solution guy said that all the files in the smf folder need to have file permissions of 755, that is read/write execute for owner and group and read and execute for public.

It looks like he went ahead and did that, so I just wanted to check that he is correct.

Oh, and I did the Install Mod on the Gallery Lite update and it brought back the Gallery link, yeeeaaaah!

Now one last oddity.  The order of the boards looks OK in the Admin | Forum | Boards | Modify Boards page, but the order is different in the actual forum.  I check the order designations and they seem fine.  Doing them again doesn't change the order...

Kindred

Chmod 644 is good for files, normally, 755 for directories

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

probeman

Quote from: Kindred on August 29, 2017, 09:02:30 PM
Chmod 644 is good for files, normally, 755 for directories

Sorry for a stupid question but if I set the file permissions to 644, that means that no files will have execute permissions. Is that correct?

Also no one has responded to my question: is it safe to update to SMF 2.0.14?   Now that I'm running PHP server 5.6...  I note above some discussion above regarding incompatible themes...

Finally when I do a "Detailed Version Check" from the admin page, it reports that I have SMF 2.0.13, but my Sources,  Default Templates and Language Files are still 2.0.

Should I update these Sources,  Default Templates and Language Files folders to 2.0.14?  Should I update SMF from 2.0.13 to 2.0.14 first or after these folders?

Are there instructions available for an idiot like myself?
john

Kindred

Apply the 2.0.14 patch. That will update everything that needs to be updated.

Yes, some custom themes will need a manual edit to do the login properly
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

probeman

Quote from: Kindred on August 30, 2017, 06:47:24 PM
Apply the 2.0.14 patch. That will update everything that needs to be updated.

Yes, some custom themes will need a manual edit to do the login properly

OK, thanks. I haven't customized any themes so I should be OK I guess. I'll update using the SMF admin web page.

probeman

#39
I tried to install 2.0.14 (from 2.0.13) but I get a large number of Test Unsuccessful errors (I am running PHP 5.6 on the database).  It says:

Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

The forum seems to be running fine at the moment, but what do I do now to update from 2.0.13 to 2.014?

I think I need to hire an SMF expert...
john

probeman

Just as a reminder, I started this topic after I originally tried to update from 2.0.13 to 2.0.14, but I didn't notice that I needed to update my PHP server first.

After that attempted update, the forum was broken but I was able to get Network Solutions to update the PHP (and mySQL) severs (both to v. 5.6), so they should be OK now. 

I think at that time they also restored our website files from their backup, but it's not clear because although they said the restore occurred, the Network Solutions Account Manager doesn't display any restores in the list of run restores.  They said that was a display issue which they are working on.

Do I need to uninstall 2.0.13 first and then install it again?  How do I proceed?   Can anyone suggest an SMF consultant?

drewactual

the proper way to do this is to go through each of the 'failed' files and set them to the requested state.. SMF literally tells you "replace this with this" or "add this after this", which makes it simple, albeit often time consuming. 

now i'm going to get flamed for this, as it isn't the proper way to do what is in front of you... i notice your failed files are all in the Sources directory. 

"i am not you- but if i were you though not being you, what i'd do is" :I'd pull a copy of Sources from the last working back-up, and i'd compress it and place it at the root of your SMF install... then, i'd change the name of the Sources directory already there to "Sources~broke"... then i'd de-compress the Sources folder you just uploaded to the root directory, thus becoming the functional 'sources directory'. 

why would i do this if i were you? (but i'm not you, but if i was)... because the failures are all items in the Sources parent directory.  w/o seeing the failures, i'd wager they consist of SMF looking for script/lines the install of mods has already altered- not finding the original line, issued a failure, even though what's presently there is what it would be placing there anyway. 

if what i'm suggesting you do works as intended (you'd do it if you were me but you aren't me) there should be no more action required except to tell the db they're running... how do you do that?  you install them.


probeman

#42
DrewActual: I understand what you are saying I think.

Can I do the same thing you suggest but just use FTP to upload a backup Source folder (after renaming the old Sources folder)?   Will renaming the Sources folder prevent the forum from running?

What does the Sources folder do for the running of the SMF forum anyway?  Is it just there for documentation purposes?

Also, the last backup I have is when the forum was running an older PHP server version.  With the original attempt to update from 2.0.13 to 2.014, the forum page failed to load with an error in the Sources\load.php file (see the first post in this topic).  If I upload the Sources folder when the old PHP server was running will that cause a problem again?
john

Kindred

Tha many failures indicates something is very wrong...   usually you only see one or two errors that you have to edit manually.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

probeman

Quote from: Kindred on September 02, 2017, 06:21:29 PM
Tha many failures indicates something is very wrong...   usually you only see one or two errors that you have to edit manually.

Yes, I think it was because of the previous attempt at updating from 2.0.13 to 2.0.14 which failed due to the old PHP server version apparently.

The forum seems to be running OK.  So what do I do at this point?   Would FTP'ing a previous 2.0.13 Sources folder up to the forum site work?

john

probeman

OK, my admin guy looked at the site and wrote "Update complete. Most of the errors were trivial and I edited them out by hand. Just keep an eye out for a while until there are no problems."

So I guess I am OK and up to date now!   Thanks for all your advice and suggestions.

But just curious, in my previous post I asked about restoring the 2.0.13 Sources folder using FTP.  Would that have been OK?
john

Kindred

If you had restored the sources folder, you would have had to also restore all the other files, isnce retoring sources would leave the templates and root files in conflict with the sources
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

probeman

Quote from: Kindred on September 03, 2017, 08:39:47 AM
If you had restored the sources folder, you would have had to also restore all the other files, isnce retoring sources would leave the templates and root files in conflict with the sources

I think you are correct because now that my admin guy has restored the Sources, Templates and Themes folders the Stop Forum Spam and Gallery Lite add-ins aren't working any more.

Last time they were listed with an "Install" link but now they say "Uninstall".  So can I uninstall the Gallery Lite and then re-install it and I won't lose my Gallery images?
john

probeman

OK, uninstalling and re-installing the Stop Forum Spam, ReCAPTCHA and Gallery Lite seemed to fix everything.

I do hope that this is the end of this very long nightmare!

Thanks for all your help and suggestions!
john

Advertisement: