News:

Wondering if this will always be free?  See why free is better.

Main Menu

Cannot install mods

Started by hustreamload, April 09, 2022, 09:53:26 AM

Previous topic - Next topic

marcosbr

Do you feel superior?
Above is a slab and below is darkness. It's fire brother!
https://amigosdaeletronica.com.br

hustreamload

#21
Hello, thanks, but this option was always on...
Another topic: there are no more errors in connection with the attachment directory

hustreamload

It is strange, but I can install new themes, but no mods, however the method seems to be the same...

hustreamload

I have reinstalled the forum from zero, but the error remained the same. Any idea what to change in DB?

shawnb61

You are trying to run vanilla 2.1.1 now?  No mods?  If so...

You had a LOT of old mod activity recorded in 2.0...  I have no idea what might cause this, but I do know that you don't need all of that old 2.0 history. 

I would:
 - Ensure you have backups...
 - Truncate the log_packages table
 - empty the packages folder except for index.php & .htaccess

This would wipe out all package history, enabling you to start from a clean slate.

If *this* still fails, I'd look closer at the DB structure of log_packages to ensure it's correct.
A question worth asking is born in experience & driven by necessity. - Fripp

hustreamload

#25
Quote from: shawnb61 on April 10, 2022, 03:30:37 AMYou are trying to run vanilla 2.1.1 now?  No mods?  If so...

You had a LOT of old mod activity recorded in 2.0...  I have no idea what might cause this, but I do know that you don't need all of that old 2.0 history. 

I would:
 - Ensure you have backups...
 - Truncate the log_packages table
 - empty the packages folder except for index.php & .htaccess

This would wipe out all package history, enabling you to start from a clean slate.


Hello, thanks for the advice.

I have deleted the logs in  log_packages table, and emptied the packages folder. But the error is still with us  :'(  :

array(14) {
  • => array(3) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(590) ["function"]=> string(9) "log_error" } [1]=> array(3) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(494) ["function"]=> string(12) "smf_db_error" } [2]=> array(3) { ["file"]=> string(45) "/home/strea334/public_html/Sources/Errors.php" ["line"]=> int(138) ["function"]=> string(12) "smf_db_query" } [3]=> array(3) { ["file"]=> string(45) "/home/strea334/public_html/Sources/Errors.php" ["line"]=> int(298) ["function"]=> string(9) "log_error" } [4]=> array(1) { ["function"]=> string(17) "smf_error_handler" } [5]=> array(3) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(1027) ["function"]=> string(22) "mysqli_stmt_bind_param" } [6]=> array(3) { ["file"]=> string(45) "/home/strea334/public_html/Sources/Errors.php" ["line"]=> int(129) ["function"]=> string(19) "smf_db_error_insert" } [7]=> array(3) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(590) ["function"]=> string(9) "log_error" } [8]=> array(3) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(494) ["function"]=> string(12) "smf_db_error" } [9]=> array(3) { ["file"]=> string(47) "/home/strea334/public_html/Sources/Packages.php" ["line"]=> int(928) ["function"]=> string(12) "smf_db_query" } [10]=> array(3) { ["file"]=> string(43) "/home/strea334/public_html/Sources/Subs.php" ["line"]=> int(6001) ["function"]=> string(14) "PackageInstall" } [11]=> array(3) { ["file"]=> string(47) "/home/strea334/public_html/Sources/Packages.php" ["line"]=> int(91) ["function"]=> string(11) "call_helper" } [12]=> array(3) { ["file"]=> string(44) "/home/strea334/public_html/Sources/Admin.php" ["line"]=> int(499) ["function"]=> string(8) "Packages" } [13]=> array(3) { ["file"]=> string(36) "/home/strea334/public_html/index.php" ["line"]=> int(187) ["function"]=> string(9) "AdminMain" } } Error loop.


hustreamload

Quote from: shawnb61 on April 10, 2022, 03:30:37 AM...
If *this* still fails, I'd look closer at the DB structure of log_packages to ensure it's correct.

What should I send for you?

skelgaard

The error is in the url or the way the test is made

the request looks like
/index.php?action=admin;area=packages;get;sa=download;server=1;package=17/mod=97;
and the php         // To download something, we need a valid server or url.
        if (empty($_GET['server']) && (!empty($_GET['get']) && !empty($_REQUEST['package'])))
                fatal_lang_error('package_get_error_is_zero', false);

but the $_GET['server'] is not a request parameter, so this will always fail with it...


Arantor

$_GET['server'] absolutely is a parameter here, because SMF parses the URL manually to split on ;. As it has for the last 18 years. It's also not relevant.

The backtrace is the same as before, it points to the query where SMF looks up if the mod is already installed or not and then fails - and then fails upon trying to log this fact.

Next step is to look at the *structure* of the smf_log_packages table rather than the content... sadly I didn't notice this topic after the OP had posted the *content*, otherwise I'd have said something sooner.
Holder of controversial views, all of which my own.


hustreamload

Quote from: Arantor on April 10, 2022, 09:00:59 AM$_GET['server'] absolutely is a parameter here, because SMF parses the URL manually to split on ;. As it has for the last 18 years. It's also not relevant.

The backtrace is the same as before, it points to the query where SMF looks up if the mod is already installed or not and then fails - and then fails upon trying to log this fact.

Next step is to look at the *structure* of the smf_log_packages table rather than the content... sadly I didn't notice this topic after the OP had posted the *content*, otherwise I'd have said something sooner.

I have 2-3 days old backup, so if you need something that I have already deleted or changed (like log-packages table), I can send you. I'm only a "normal" user, so pls explain me step by step, what to do

Arantor

In phpMyAdmin, go to the smf_log_packages table, go to the structure tab and post a screenshot of what that says - then we can compare the table structure to what it should be, maybe that's the problem.
Holder of controversial views, all of which my own.


hustreamload


hustreamload

I have never used the mod source inside the forum, I download everything from here, the SMForum.
I have deleted all earlier packages, and uploaded only 3: 2 portals (Tiny + EzPortal), + another type (Stop Forum Spam). After that I tried to install each of them, but the result was the same. I have asked my admin partner, but he got the same as well

hustreamload

I tried to go back to 2.0.19 with full install, but there are problems with my password (however it remained the same), then with the db, so I stopped the installation. The forum is working properly now, but is not comfortable, there is no portal, no chat, nor smileys....What do you recommend? Should I delete everytjhing from public.html, the whole DB, and try to make a full install from the last backup on basis 2.0.19?

Doug Heffernan

#34
Quote from: hustreamload on April 10, 2022, 11:57:53 AMI tried to go back to 2.0.19 with full install, but there are problems with my password (however it remained the same), then with the db, so I stopped the installation. The forum is working properly now, but is not comfortable, there is no portal, no chat, nor smileys....What do you recommend? Should I delete everytjhing from public.html, the whole DB, and try to make a full install from the last backup on basis 2.0.19?

How did you try to go back to 2.0.19 with full install? Did you overwrite the files only? If that was the case, then that will explain any database problems because I do not see any mention of reverting back the database as well.

The lack of mods can be explained that when you overwrote your forum files when you tried to downgrade to 2.0.19,  they were all automatically uninstalled.

At this point I would hold on deleting the forum and doing a re install if I were you.

P.s. Can you run this query and post back the results?

SELECT value FROM smf_settings WHERE variable = 'smfVersion';

Arantor

See, I wouldn't be doing any of this rolling back stuff, I'd be adding more debugging statements around 928 of Packages.php to see what database query it is that's breaking and what the actual MySQL error was that dies when trying to insert it into the database.

I wonder if the fact it's not English is part of the problem.
Holder of controversial views, all of which my own.


hustreamload

Quote from: Doug Heffernan on April 10, 2022, 12:09:18 PM
Quote from: hustreamload on April 10, 2022, 11:57:53 AMI tried to go back to 2.0.19 with full install, but there are problems with my password (however it remained the same), then with the db, so I stopped the installation. The forum is working properly now, but is not comfortable, there is no portal, no chat, nor smileys....What do you recommend? Should I delete everytjhing from public.html, the whole DB, and try to make a full install from the last backup on basis 2.0.19?

How did you try to go back to 2.0.19 with full install? Did you overwrite the files only? If that was the case, then that will explain any database problems because I do not see any mention of reverting back the database as well.

The lack of mods can be explained that when you overwrote your forum files when you tried to downgrade to 2.0.19,  they were all automatically uninstalled.

At this point I would hold on deleting the forum and doing a re install if I were you.

P.s. Can you run this query and post back the results?

SELECT value FROM smf_settings WHERE variable = 'smfVersion';

Thanks, if we could go further with 2.1.1 is our goal as well, and I see, that the forum is working. Earlier there was no problem when we stepped back  1-2 versions in case of problems with the new versions, so I tried the reinstall of 2.0.19 only with overwriting the files...as yo wrote.

But the problem with installation of mods appeared earlier, when I have upgraded the forum....and remained the same. And installation of 2.0.19 was intterupted at the beginning, after that I made a succesful full install of 2.1.1. But the error remained the same.

hustreamload

Quote from: Arantor on April 10, 2022, 12:27:03 PMSee, I wouldn't be doing any of this rolling back stuff, I'd be adding more debugging statements around 928 of Packages.php to see what database query it is that's breaking and what the actual MySQL error was that dies when trying to insert it into the database.

I wonder if the fact it's not English is part of the problem.

If you recommend I can try a full install in English, however since 15 years teher was no problem with the language

Doug Heffernan

Quote from: hustreamload on April 10, 2022, 12:31:13 PMso I tried the reinstall of 2.0.19 only with overwriting the files...as yo wrote.

There are  big changes between the 2.0.19 and 2.1.x versions. Reuploading back only the files is not enough to roll back. A backup copy of the database made from before the upgrade should be restored too.

My thoughts are that maybe the upgrade was not done properly/thoroughly. Can you please run the sql query I posted above and let us know the reslut?

Arantor

I don't think the problem is SMF's language but I think the query fails for some reason (which isn't clear) and the message that comes back from MySQL can't be inserted for some reason.

In fact let's do the simplest possible thing - get back to 2.1.1 and establish that it is generally working (you can login, you can post).

Then edit Subs-Db-mysql.php

Code (find) Select
    // This is the error message...
    $query_error = mysqli_error($connection);

Code (replace) Select
    // This is the error message...
    $query_error = mysqli_error($connection);
    die($query_error);

It's not elegant, it's very temporary but what will happen is that when you try to install a package, whatever it was getting deeply hung up on will be output.


@Doug Heffernan the database had 2.1 columns inside smf_log_packages; verifying the smfVersion doesn't help you with that. And, if you look at the backtrace, the fatalling error was a SELECT against smf_log_packages where the columns being queried do in fact exist and the schema looks good against a known-working SMF 2.1.1.
Holder of controversial views, all of which my own.


Advertisement: