5.2 -> 5.5 Failure to Upgrade

Vincent Fantauzzo Posted in Technical Support 4 years ago

Hello,

I am currently trying to go through a 5.2 OSSN -> 5.5 Upgrade on my own 18.04 Ubuntu LTS system. Configuring most of this was straight forward however the information in the https://www.opensource-socialnetwork.org/wiki/view/708/how-to-upgrade-ossn doesnt seem to be very granular. The information in here is very vague and does not work as designed. I have looked across several discussions but for some reason i consistently am getting this failure of not having MOD_REWRITE REQUIRED with a red mark on it. Even tho it is enabled and set inside of my apache2.conf file. ( Since most of the information reference httpd.conf even tho its not included in this configuration... )

I can literally cp the 5.2 html/ dir back and forth and it works without any issue. I can even overlay certain folders into the 5.2 and get a mix fo 5.2 & 5.5 files working together but overall it still gets angry. I am just looking for exactly what information that ( MOD_REWRITE REQUIRED ) is required as if i go into my module for the rewrite it is uncommented & working completely fine with the 5.2 version. This seems like something in the zip of 5.5 of OSSN & i even tried 5.4. This also produces the same behavior.

Able to provide what ever information that is requested.

Thanks.

Replies
German Andre kutzner Replied 4 years ago

You're right but I think in the next uptown Arsalan Shah thinks it went too fast the uptadts don't know this but if everything works now a lot of success

us Vincent Fantauzzo Replied 4 years ago

Thanks Andre, Appreciate it. Yea ill have to try that in a Development environment as i ended up pulling in quite a few things on this and people have already started using it.

Overall tho, had to adjust that javascript file to add your function, Adjust the site.php file in /var/www/html/configuration to represent the domain URL w/ https instead of the IP of the internal resource as its behind a Nginx Rev Proxy. The RevProxy its self does need to point at the IP rather then the Domain as the $host flag is referenced as it is listed below. Also found out if people are using nginx for their rev proxy, make sure you use the following headers to get it to report correctly:

server {
    if ($host = domain.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    listen [::]:80;
    server_name  domain.com;
    return 301   https://$host$request_uri;


}

server {
  listen 443 ssl;

  server_name domain.com;
  ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem; # managed by Certbot
  ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; # managed by Certbot
  ssl_ciphers         EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
  ssl_protocols       TLSv1.2;
  ssl_session_cache shared:SSL:10m;

                add_header X-Xss-Protection "1; mode=block" always;
                add_header X-Content-Type-Options "nosniff" always;
                add_header Strict-Transport-Security "max-age=2592000; includeSubdomains" always;
                add_header X-Frame-Options "SAMEORIGIN" always;
                proxy_hide_header X-Powered-By;
                add_header 'Referrer-Policy' 'no-referrer';
                add_header Content-Security-Policy "frame-ancestors domain.com;";


  location / {
    proxy_pass http://XXX.XXX.XXX.XXX/;
    proxy_set_header Host $host;
    proxy_set_header Range $http_range;
    proxy_set_header If-Range $http_if_range;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
  }

The above is an example if anyone needs it fwiw.

German Andre kutzner Replied 4 years ago

Hello
i have solved it this way i use plesk and made a video for you like the instruction of plesk works for me everything works on many sites where i use ossn

0Play Video

Plesk Rule

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
us Vincent Fantauzzo Replied 4 years ago

Note to self... Add the Function for the HTTPS redirect that was previously provided in the 5.2 Install as the config folder is the only one copied over. Fml.

us Vincent Fantauzzo Replied 4 years ago

My Apache access log (/var/log/apache2/access.log ) is showing me 301's:
[01/Sep/2020:21:29:09 +0000] "GET /upgrade/upgrade.php HTTP/1.0" 301 338 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0"

Then after it tries to do that it takes me to an admin 301:

[01/Sep/2020:21:29:09 +0000] "GET /administrator HTTP/1.0" 301 16783 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0"

[01/Sep/2020:21:29:09 +0000] "GET /administrator HTTP/1.0" 301 16783 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0"

[01/Sep/2020:21:29:09 +0000] "GET /administrator HTTP/1.0" 301 16783 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0"

[01/Sep/2020:21:29:09 +0000] "GET /administrator HTTP/1.0" 301 16783 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0"

[01/Sep/2020:21:29:09 +0000] "GET /administrator HTTP/1.0" 301 16783 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0"

Just strange cause as SOON as i move back the html.old folder back into the html/ location moving the 5.5 stuff out, works no issue. Just not sure how i can stack trace this to follow through whats causing this issue. Any log / Information you need, lmk can .zip it or get it.

us Vincent Fantauzzo Replied 4 years ago

Yea so right now if i run through the 5.5 overlay with following the upgrade path, i end up getting this now:

enter image description here

us Vincent Fantauzzo Replied 4 years ago

Hmm, Thats very strange. Anytime that i try to go the upgrade.php file i get a redirect back to the installation page where it is complaining about the file being missing? O.o, This is strange as well because i ended up following throught he 18.04 apt install on this.

Also, the .htaccess file that is with the originally installation that is done via the apt install on 18.04, can that same file be used on the 5.5 version in the ossn folder? Because the current .zip of 5.5 doesnt have that file within there.

German Michael Zülsdorff Replied 4 years ago

Hello Vincent,
I can't quite follow. The mod_rewrite is check is done exactly one time: On initially installing Ossn.
And since you said you HAD already installed Ossn 5.2 you must have passed that check successfully formerly and I'm wondering which way you ran into that check again? At least running the script upgrade/upgrade.php doesn't call that check again.

Aside from that: not any Ossn installer zip file includes a .htaccess file.

us Vincent Fantauzzo Replied 4 years ago

Also, Fwiw the .ZIP that is included doesnt include a .htaccess file for a fresh install. Have to keep pulling that over.

Premium Version

Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.

$199 (Life Time)
Learn More

Other Questions