Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: melcon on March 04, 2022, 06:18:32 AM

Title: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: melcon on March 04, 2022, 06:18:32 AM
List of specifications: SMF 2.1.1, 5.5.5-10.2.30-MariaDB, PHP 8.0.3
Link: not allowed to post external links (because I am a new user?)
Problem:
When I am trying to install a mod via the package manager (e.g. Emotions Smiley v1.0) I get a login screen.
To summarize the steps I take that lead to the issue:
- Select Admin
- Enter password to get to the Admin Panel
- Select Package Manager -- > Browse Packages
- Select "Install Mod"
- The login screen shows (as if I were logged out of the forum, however at the the top row I am still logged in)

Correct FTP settings have been entered under the Options section in the package manager.
I also checked the file permissions under File Permissions (And should be all right).

No errors in the error log.
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: Illori on March 04, 2022, 07:59:49 AM
Are you able to manually download a mod from the mod site and upload and install?
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: melcon on March 04, 2022, 08:38:32 AM
Good idea! I just tried right away and found out it leads to the same result in the end.
The upload is succesfull, however when trying to install I get the login screen.
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: Kindred on March 04, 2022, 09:18:03 AM
I can't reproduce this on my test system.

I don't think I've ever seen the issue that you are seeing...  so, hmmmmm.....

are you running the default theme?

Are you running any other software/scripts on the domain?
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: Arantor on March 04, 2022, 09:20:39 AM
I'd be asking the host to disable mod_security as a first step.
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: melcon on March 04, 2022, 09:44:04 AM
I am running the default theme (Curve2), no other mods installed. mod_security is not loaded, I will double check with the hoster. Yes it is a really strange issue, all other things work perfectly fine (including uploading attachements to a post for example). Also running Joomla on this domain (separate database and directory off course), no other scripts.
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: Dave J on March 04, 2022, 09:50:23 AM
As you don't have any mods installed, run a backup of the files and database and try re-installing/upgrading again.
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: m4z on March 04, 2022, 10:00:52 AM
That mod doesn't claim to be compatible with 2.1; do any mods (that are compatible with 2.1) work?
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: Dave J on March 04, 2022, 10:07:23 AM
Quote from: m4z on March 04, 2022, 10:00:52 AMThat mod doesn't claim to be compatible with 2.1; do any mods (that are compatible with 2.1) work?

These do ;)

2.1mods.png
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: Kindred on March 04, 2022, 10:23:19 AM
Dave J --    Please allow the OP to answer, since you are not encountering the error that the OP is seeing, any assumption on your part of something that should work may be flawed.
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: melcon on March 08, 2022, 07:12:57 AM
Quote from: m4z on March 04, 2022, 10:00:52 AMThat mod doesn't claim to be compatible with 2.1; do any mods (that are compatible with 2.1) work?
Good point,I have tried several other  (compatible with 2.1) mods and they all lead me back to the login screen (in the top bar SMF stills says I am logged on). I have confirmed with the host mod_security is not enabled/loaded. So not really sure why it's not working, I did manage to get a smiley set working using the admin panel ((forum->smileys) and uploading the smileys there.

So in that way I have resolved the smiley part, however I just don't understand why the package manager does not want to work.
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: Kindred on March 08, 2022, 09:58:50 AM
can you PM me your url along with a temporary admin account to your forum?
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: m4z on March 08, 2022, 12:18:31 PM
Quote from: melcon on March 04, 2022, 06:18:32 AMI also checked the file permissions under File Permissions (And should be all right).

What exactly are the permissions? (Or: what isn't "Writable"?) What is "all right" depends very much on the details of your setup, and problems with temporary files might be invisible under (Admin → Main → Package Manager →) File Permissions.
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: melcon on March 25, 2022, 03:07:58 AM
Quote from: Kindred on March 08, 2022, 09:58:50 AMcan you PM me your url along with a temporary admin account to your forum?
Yes no problem, sorry for the late reply, I was pre-occupied with some other things.

@m4z Good point, I applied the "default permission profile" to be sure when before writing the post.
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: Steve on March 26, 2022, 05:42:21 PM
Did you try this?

Quote from: Arantor on March 04, 2022, 09:20:39 AMI'd be asking the host to disable mod_security as a first step.
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: Kindred on April 20, 2022, 09:34:24 AM
Quote from: melcon on March 25, 2022, 03:07:58 AM
Quote from: Kindred on March 08, 2022, 09:58:50 AMcan you PM me your url along with a temporary admin account to your forum?
Yes no problem, sorry for the late reply, I was pre-occupied with some other things.

OK, apologizes for the delay replying from me as well.  I've finally had a chance to review your site/situation.

I have to admit, I am stumped.


I removed all of the 2.0.x mods from your package list (most were 2.0.x updated anyway)
I added the 2.1 version of the SAVE mod and deleted the 2.0 versions.

I attempted to install a smileys pack, a 2.1 hooks only mod and the 2.1 SAVE...
All have the same result as you originally reported -->   Attempting to install the mod leads to a base login screen (not the admin password secondary challenge)
index.php?action=admin;area=packages;sa=install;package=SimpleAudioVideoEmbedder6.0.6.zip

there is nothing showing in the browser console or debug screens.
turning off admin security has no effect (turned back on after the test)

A few notes:
Please check the status of "mod_security" on your host.
I notice that you are running joomla on the main domain directory... what is the .htaccess for the root directory?
What is the .htaccess for the smf directory?







Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: melcon on April 21, 2022, 02:30:43 AM
Thanks for reviewing, that's all right, all other functionality is working perfectly, so not a big issue with time pressure for us.
The hosting party has assured me mod_security is turned off, I will ask them again.

Yes we also run Joomla (in /joomla3, there is a re-direct in the main dir).
The .htaccess file in the root has the following contents:
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

The .htaccess file in the SMF dir has one commented out line:
#php_flag display_errors offI can't remember why this line is there, we've been running SMF since version 1 so probably some historical reason.

So yes, quite a strange issue isn't it  :o
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: Doug Heffernan on April 21, 2022, 05:33:39 AM
Quote from: melcon on April 21, 2022, 02:30:43 AM#php_flag display_errors offI can't remember why this line is there, we've been running SMF since version 1 so probably some historical reason.

That is to disable PHP Error Reporting. If I were you, I would switch php error reporting back on. Are you on a shared hosting or do you manage your own dedicated/vps box?

This issue that you are getting while installing a mod, does it happen only when performing that particular action or do you get it when you perform other actions too?

Did the error pop up immediately after you upgraded to Smf 2.1.1. or did you do some modification to your forum/server prior to that?
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: Steve on April 21, 2022, 05:42:46 AM
If the line is commented out, doesn't that mean that PHP Error Reporting is on?
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: Doug Heffernan on April 21, 2022, 05:57:57 AM
Quote from: Steve on April 21, 2022, 05:42:46 AMIf the line is commented out, doesn't that mean that PHP Error Reporting is on?

Yes, it looks like that. Providing they have enabled it at the php.ini too.
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: Steve on April 21, 2022, 08:31:54 PM
Oh duh me. Thanks Doug.
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: melcon on April 25, 2022, 09:01:47 AM
Quote from: Doug Heffernan on April 21, 2022, 05:33:39 AM
Quote from: melcon on April 21, 2022, 02:30:43 AM#php_flag display_errors offI can't remember why this line is there, we've been running SMF since version 1 so probably some historical reason.

That is to disable PHP Error Reporting. If I were you, I would switch php error reporting back on. Are you on a shared hosting or do you manage your own dedicated/vps box?

This issue that you are getting while installing a mod, does it happen only when performing that particular action or do you get it when you perform other actions too?

Did the error pop up immediately after you upgraded to Smf 2.1.1. or did you do some modification to your forum/server prior to that?
The issue only occurs when performing that particalur action, all other functionality works as expected.
The php flag is commented out (as Steve noted), I will just remove the entire line to be sure. We are on shared hosting.
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: Doug Heffernan on April 25, 2022, 10:11:24 AM
Quote from: melcon on April 25, 2022, 09:01:47 AMThe issue only occurs when performing that particalur action, all other functionality works as expected.
The php flag is commented out (as Steve noted), I will just remove the entire line to be sure. We are on shared hosting.

Can you try something? Go to the Package Manager->Options and uncheck the following option: "Create a backup of key SMF files whenever a package is installed or uninstalled."

I saw it on another topic that doing that helped. Hopefully it will work for you too.
Title: Re: Strange issue when trying to use the package manager to install a mod -SMF 2.1.1
Post by: melcon on April 29, 2022, 12:49:59 PM
Sounded like a good tip! Just tried it and leads to the same result unfortunately.