Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: natcip on February 17, 2019, 09:47:09 AM

Title: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 17, 2019, 09:47:09 AM
Hello!
I'm manually updating my forum from 2.0.11 to 2.0.15.
So far I've uploaded all the files from "smf_2-0-15_upgrade.zip" to my server, obviously in the same directory as the board. After that I changed the permissions of the files and directories listed in "readme.html" via FTP.

But when I open "upgrade.php" it shows me this error message:
QuoteUpdating Your SMF Install!
The upgrader was unable to find some crucial files.

Please make sure you uploaded all of the files included in the package, including the Themes, Sources, and other directories.

Click here to try again.

I'm not sure what to do now. Could it have to do with the fact the server is still running with PHP 7.0? Or maybe cause I skipped some versions and made the jump from 2.0.11 to 2.0.15?
I'd appreciate any type of help. :)
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: Arantor on February 17, 2019, 09:48:54 AM
You don't need to use that to upgrade from 2.0.11 to 2.0.15, you can update using the links in the package manager.

If you did want to use the full upgrade (and remove any mods you had installed), the error suggests you have not uploaded all the files in all the folders.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 17, 2019, 10:37:04 AM
Thank you Arantor for the quick reply.

Quote from: Arantor on February 17, 2019, 09:48:54 AM
If you did want to use the full upgrade (and remove any mods you had installed), the error suggests you have not uploaded all the files in all the folders.
I've uploaded all of the files. More than once just to make sure. I used FileZilla.
It would be nice if I could keep the mods I've installed. I've attempted to update my forum last year via the SMF Admin Panel but it didn't work out that way. That's why I wanted to update manually.

Quote from: Arantor on February 17, 2019, 09:48:54 AM
You don't need to use that to upgrade from 2.0.11 to 2.0.15, you can update using the links in the package manager.

I just reverted back to 2.0.11 and tried uploading the zip in the Package Manager, but got this error message:
QuotePackage upload failed due to the following error:
"Although the package was downloaded to the server it appears to be empty. Please check the Packages directory, and the "temp" sub-directory are both writable. If you continue to experience this problem you should try extracting the package on your PC and uploading the extracted files into a subdirectory in your Packages directory and try again. For example, if the package was called shout.tar.gz you should:
1) Download the package to your local PC and extract it into files.
2) Using an FTP client create a new directory in your "Packages" folder, in this example you may call it "shout".
3) Upload all the files from the extracted package to this directory.
4) Go back to the package manager browse page and the package will be automatically found by SMF."
^I did all that and the package still doesn't show up in the Browse Packages section. :(
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: Kindred on February 17, 2019, 10:41:06 AM
No...

For the package Manager,  you have to use the patch package,  not the full upgrade archive

Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 17, 2019, 11:00:52 AM
Quote from: Kindred on February 17, 2019, 10:41:06 AM
No...

For the package Manager,  you have to use the patch package,  not the full upgrade archive
Ok thanks. Got it.

However, when I tried installing "SMF 2.0.12 Update" it said "This package is already installed, and no upgrade was found!", yet the whole board is still on SMF 2.0.11. :-\
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 17, 2019, 12:04:31 PM
On the Browse Packages section it says:
QuoteA few security vulnerabilities and bugs in SMF 2.0.11 have been fixed. You can install this patch (click here to install) to fix your forum and update it to 2.0.12.
When I click on install this comes up:
QuoteThe package has been uploaded successfully
SMF 2.0.12 Update [ Install Mod ] [ List Files ]
I click on Install Mod and
QuoteYou cannot download or install new packages because the Packages directory or one of the files in it are not writable!
But the Packages directory is set on 777. A temp folder exists.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: Bigguy on February 17, 2019, 12:38:18 PM
Try 755
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 17, 2019, 01:18:17 PM
Quote from: Bigguy on February 17, 2019, 12:38:18 PM
Try 755
Didn't work either
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: Bigguy on February 17, 2019, 01:20:38 PM
Did you chmod the temp directory as well.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 17, 2019, 01:28:12 PM
I let my host change the permissions of the Packages directory and now I get this error for the whole board.
QuoteTable 'name_sql1.domain_sql1_smf_mediapro_sites' doesn't exist
File: /home/www/name/Sources/AutoEmbedMediaPro2.php
Line: 275

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.11, while your database is at version 2.0.10. The above error might possibly go away if you execute the latest version of upgrade.php.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 17, 2019, 01:33:31 PM
Quote from: Bigguy on February 17, 2019, 01:20:38 PM
Did you chmod the temp directory as well.
Yes
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: Bigguy on February 17, 2019, 01:34:00 PM
Seems there is a problem with a modification you added.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 17, 2019, 01:38:48 PM
Quote from: Bigguy on February 17, 2019, 01:34:00 PM
Seems there is a problem with a modification you added.
Yep. I could uninstall it, but how? The error message shows up on the entire site.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: Bigguy on February 17, 2019, 01:46:08 PM
You should post in the support thread for that mod. The author will know better than I. Seems the table for the database probably was not made.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 17, 2019, 02:22:33 PM
I think it really would be best if I just used the full upgrade and re-install all the mods afterwards, because the Package Manager doesn't seem to work on my forum. Maybe it has to do with this particular mod? I don't know, but just looking at this thread it went from one problem to a new problem. It's just a mess at this point.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: Bigguy on February 17, 2019, 02:30:09 PM
If you feel that would be best, I would agree with you. Try it out and see if that solves some problems for you. :)
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: Sir Osis of Liver on February 17, 2019, 03:33:42 PM
IIRC, upgrade.php will sometimes report missing files if php version is too low.  Which version are you running?  Use 755/644, 777 is not allowed on some servers for security reasons.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 17, 2019, 03:41:45 PM
Quote from: Sir Osis of Liver on February 17, 2019, 03:33:42 PM
IIRC, upgrade.php will sometimes report missing files if php version is too low.  Which version are you running?  Use 755/644, 777 is not allowed on some servers for security reasons.
It's running with PHP 7.0.
I just tried CHMOD 755 and no difference. 644 even caused more error messages lol.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 17, 2019, 03:43:38 PM
@Bigguy. Yes I just did that and reverted back to my original attempt at upgrading manually.





I'm on this step now:
Quote
Run the upgrading tool

The final step in upgrading SMF, is to run the upgrading tool. Navigate to the directory where SMF is located. It should redirect you to the upgrade.php file and prompt you to run the upgrade. In example: www.yourdomain.com/forum/upgrade.php.

The first page you see may request your FTP information. If you see this screen, it is because the installer found some files or folders with inadequate permissions for SMF to run properly. If you enter your FTP information here, the installer can automatically fix these permissions for you. Please note that the path should be the same path you see in your FTP client. For example, it might be "public_html/forum". And remember, the installer will not save your FTP password anywhere.
Upgrade settings

Backup database with the prefix "backup_"
    Selecting this option will get the upgrade tool to copy all data in the database before upgrading within the original database.
Maintenance Mode
    Selecting this option will place the forum into maintenance mode while upgrading rather than showing errors, this is highly recommended.
Output extra debugging information.
    The upgrade tool can give detailed information while performing an upgrade by selecting this option, it will aid the support team to solve any errors if they occur while upgrading.


And once again, I get this message:
QuoteThe upgrader was unable to find some crucial files.

Please make sure you uploaded all of the files included in the package, including the Themes, Sources, and other directories.
But I've uploaded all the files from "smf_2-0-15_upgrade.zip" to my server, several times.


Is running upgrade.php important though? The board seems to be on 2.0.15 now, with all the mods removed, like expected. I only get the error message "Function name must be a string" on the Administration Center page, everything else seems to work.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: Sir Osis of Liver on February 17, 2019, 03:48:20 PM
<sigh> Which php version are you running?
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: Bigguy on February 17, 2019, 03:56:47 PM
She stated php 7.0
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 17, 2019, 03:58:20 PM
*He

Yes, I already said it twice in this thread. Third time: PHP 7.0.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: Bigguy on February 17, 2019, 04:10:43 PM
Oh, sorry bout that sir. :)
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: Sir Osis of Liver on February 17, 2019, 04:29:00 PM
Try downgrading to php 5.6.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: shawnb61 on February 17, 2019, 04:40:42 PM
The upgrader looks for a very specific random set of files for that message (trying to confirm your themes & sources are where your settings say they are...):
- in your themes folder:  /index.template.php
- in your source folder: /QueryString.php
- in your source folder: /Subs-Db-Mysqli.php
- in forum root (where upgrade.php should be running):  /upgrade_2-0_mysql.sql (if source version is < 2.1)
- in forum root (where upgrade.php should be running):  /upgrade_1-1.sql (if source version is < 2.0)
- in forum root (where upgrade.php should be running):  /upgrade_1-0.sql (if source version is < 1.1)

I would first ensure that these files are present.

The next thing I would do is double-check the settings for your $sourcedir (in settings.php) and your setting for theme_dir (for theme 1 from your themes table).   If it can't find a theme_dir setting, it tries to make an educated guess that it's under your $boarddir. 

Everything should be working fine in 2.0 before you start the upgrade.  If you are having theme issues before the upgrade, the upgrade won't work. 

It might help to run the 2.0 version of repair_settings.php. 

An upgrade is overkill for moving from 2.0.11 to 2.0.15 - patches are simpler...

Hope this helps,
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: Arantor on February 17, 2019, 05:53:03 PM
Doesn't it also need Themes/default/languages/Install.(language).php (at a minimum, English)?
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: shawnb61 on February 17, 2019, 06:00:08 PM
It needs lots of stuff...   

But the check it performs that produces the error message above only looks for the sampling of files listed above. 
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 18, 2019, 11:25:03 AM
Thanks for the responses

Quote from: shawnb61 on February 17, 2019, 04:40:42 PM
The upgrader looks for a very specific random set of files for that message (trying to confirm your themes & sources are where your settings say they are...):
- in your themes folder:  /index.template.php
- in your source folder: /QueryString.php
- in your source folder: /Subs-Db-Mysqli.php
- in forum root (where upgrade.php should be running):  /upgrade_2-0_mysql.sql (if source version is < 2.1)
- in forum root (where upgrade.php should be running):  /upgrade_1-1.sql (if source version is < 2.0)
- in forum root (where upgrade.php should be running):  /upgrade_1-0.sql (if source version is < 1.1)

I would first ensure that these files are present.
All of these files are present in the listed directories, however a "new" Subs-Db-mysqli.php doesn't seem to be included in smf_2-0-15_upgrade.zip. But there's already an older Subs-Db-mysqli.php on my server. Maybe that's causing a conflict?

Quote from: shawnb61 on February 17, 2019, 04:40:42 PM
The next thing I would do is double-check the settings for your $sourcedir (in settings.php)
The paths in settings.php correctly lead to the respective directories
$boarddir = '/home/www/name'; # The absolute path to the forum's folder. (not just '.'!)
$sourcedir = '/home/www/name/Sources'; # Path to the Sources directory.
$cachedir = '/home/www/name/cache'; # Path to the cache directory.


Quote from: shawnb61 on February 17, 2019, 04:40:42 PMand your setting for theme_dir (for theme 1 from your themes table).   If it can't find a theme_dir setting, it tries to make an educated guess that it's under your $boarddir.
Also in settings.php? There's none, but the "Themes" directory is in root where it belongs.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: Sir Osis of Liver on February 18, 2019, 11:26:40 AM
Quote from: Sir Osis of Liver on February 17, 2019, 04:29:00 PM
Try downgrading to php 5.6.
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 18, 2019, 11:30:04 AM
Quote from: shawnb61 on February 17, 2019, 04:40:42 PM
It might help to run the 2.0 version of repair_settings.php. 
I just did that and my board was still set on MySQLi.
Like suggested, I changed it to MySQL and now it seems to be working. :)
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: shawnb61 on February 18, 2019, 03:40:34 PM
Then the error makes sense.  It builds filenames based on the db type, so it was looking for:
- in your source folder: /Subs-Db-Mysqli.php
- in forum root (where upgrade.php should be running):  /upgrade_2-0_mysqli.sql (if source version is < 2.1)

And neither of those files exist.   

Thanks for closing the loop. 
Title: Re: "The upgrader was unable to find some crucial files." when upgrading
Post by: natcip on February 18, 2019, 04:43:10 PM
Thank you very much :)