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
us Vincent Fantauzzo Replied 4 years ago

Hey,

im not bashing either of you was just sharing the information. As a non contributor to the product i was advising that some of this information may be more helpful to your user base. Whether or not you decide to use that information, create a fork within git or even make a merge request against it is up to you. Im up and running without any issues currently so i appreciate all of the help.

Thanks. This thread can be closed.

Indonesian Arsalan Shah Replied 4 years ago

I lost my hope for helping users. Because many modified files and forget and then during next upgrade they says version is faulty.

German Michael Zülsdorff Replied 4 years ago

Well,
I remember that one of the first How-tos which came along with Ossn was:
https://www.opensource-socialnetwork.org/wiki/view/704/should-i-modify-core-files
The answer is a clear NO.
And if you don't follow these instructions, or if Ossn absolutely does not work without your modifications, then you are of course responsible for including these modifications in later upgrades yourself - again and again.
Another - more constructive - approach would be trying to offer your changes as a pull request on Github in order to make them part of the next upgrade.

us Vincent Fantauzzo Replied 4 years ago

No not the fact that i was trying to do it at the same time, Changing the Protocol, When doing the upgrade of 5.5 over 5.2, due to the changes that i did make, i didnt copy them over with 5.5, thus causing this strange problem. Just had to Re-Modify the files again while 5.5 was in its broken state so i could launch the upgrade.php page, but due to it not loading because the function was in the javascript.php file correctly. Even tho i copied the config over, that additional file still needed to be re-edited in the libraries location.

German Michael Zülsdorff Replied 4 years ago

That is: You were trying to achieve 2 things simultaneously?
1. changing the protocol from http to https
AND
2. upgrading Ossn

I can only recommend to either do the upgrade first and then change the protocol or do it in reverse order.
Remember you're still logged in with the former protocol when starting the upgrade process and it's likely that changing the configuration under the hood in parallel may lead to strange results.

us Vincent Fantauzzo Replied 4 years ago

Moving from HTTP to HTTPS behind the Rev Proxy.

German Michael Zülsdorff Replied 4 years ago

You wrote "... You have to modify ossn.config.site.php which is located in /var/www/html/configuration/ for you to adjust the $Ossn->URL file for what your site is going to listen on. "

Okay,
I must admit I haven't tried that command line installer up to now - and maybe it's different. At least with the standard php installation method I never had to adjust anything afterwards.

When I started a clean new installation using my browser like https://zet.com/installation, and my Ossn was located in /var/www/ossn/ (chosen data directory in /var/www/ossn_data/) the Ossn installer automatically created the file /var/www/ossn/configurations/ossn.config.site.php - correctly reflecting my configuration like

$Ossn->url = 'https://zet.com/';
$Ossn->userdata = '/var/www/ossn_data/';

And since the upgrade doc is advising you to leave the configurations directory in place, the same old and working configuration will be available when the upgrade process finished.

That's why I still don't see the point where you had to edit ossn.config.site.php manually?

us Vincent Fantauzzo Replied 4 years ago

But it really should be something more along the lines of

Make sure you have at minimum php 7.0 running. ( dpkg -l | grep php ) 
Back up your complete OSSN installation- and data directory. ( do a cp /var/www/html /var/ww/html.bkp ) 
Back up your database. ( Provide instructions ) 
Download latest stable OSSN version from the download page of our website and unzip locally. ( perform a wget URL etc ) 
Login to your admin account - don't log off.
Disable Cache. ( Go to your admin portal, click on drop down etc etc. ) 
Disable all non-core components. (= all components which don't start with Ossn....) ( Go to admin portal, click component drop down. etc ) 
Enable Default Theme. ( Go to admin ) 
Remove old Ossn installation from your site, except the folder named configurations and your Ossn data directory. ( Provide a disclaimer that if you have custom Scripts or Functions in place in your installation to make sure you pull those files back in and or manaualy edit the new files to include the changes ) 
Upload all files and folders from locally unzipped installation package to former place on your server. ( provide an unzip command )
Check ownership of copied files and folders on your server. They must be read- and writable by apache. In doubt ask your provider how to set permissions correctly. ( This is just ridiculous if you own your own server, providing a chown or chmod command to do this is so simple yet you didnt provide it. )
Back in your browser, run http://yourwebsite.com/upgrade/upgrade.php
Remove subdirectory named installation

Stuff like that. Just not granular. Other then that the information has been great, just unfortunately weak documentation.

us Vincent Fantauzzo Replied 4 years ago

@~Z~ Man

You have to modify ossn.config.site.php which is located in /var/www/html/configuration/ for you to adjust the $Ossn->URL file for what your site is going to listen on.

Because my OSSN is behind a Reverse Proxy ( Internet -> Firewall -> Reverse Proxy / Load Balancer -> OSSN Node ) I have to change my reverse proxy nginx web server to point correctly to the system with the code listed below in my previous comment.

Due to it being behind a revproxy, the ossn.lib.javascripts.php inside of /var/www/html/libraries needed to be changed to comment out the existing function there & replaced with the one that @Andre kutzner provided in another document. Once that change is made & the URL is updated i was able to reach.

The information in the upgrade article is not granular for a technical person. It is very vague and provides no Technical indepth how into those who own their own linux box. Your just saying yea do these steps, okay, how do we do them, what changes need to be made, in which files, how to set them up etc.

German Michael Zülsdorff Replied 4 years ago

Sorry folks,
but I'm even more confused than in the beginning ... What are all these additonal steps good for ... and where are those files you mentioned? You said "... Adjust the site.php file in /var/www/html/configuration ..."

Looking into my Ossn 5.5 there is neither a directory named configuration nor a file named site.php ?!?

And, back to the start... You said "...the information in the https://www.opensource-socialnetwork.org/wiki/view/708/how-to-upgrade-ossn doesnt seem to be very granular...."

Which steps are misleading/unclear?