After a while it was time to reinstall my Raspberry pi OSMC installation. The installation was corrupt after some testing with different pieces of software. Well it was time to do a new installation.
After a while i found out that OSMC had upgraded to PHP version 7, while Spotweb was only working with PHP version 5. So what to do? The default installations work great when you have a default PHP version 5, search on the internet, combine a couple of guides so you can “upgrade” to PHP 5. And to let people also have fun with Spotweb, here is the guide.
First update everything to the latest version:
apt-get update && apt-get dist-upgrade
Add the following line to your /etc/apt/sources.list:
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
Back on the command line execute:
wget -q -O – http://mirrordirector.raspbian.org/raspbian.public.key |apt-key add
After that do an:
apt-get update && apt-get dist-upgrade
If everything is ok, nothing will be updated.
Now install php5, mysql client and apache2:
apt-get install php5-mysql php5 apache2 php5-curl php5-gd php5-gmp
(Please note, mysql (mariadb in fact) is running on another server)
Accept the changes by pressing: Y and press enter.
You probably get an error, that’s because OSMC has a server running on the same webport. Let’s change that:
The first line ends with *:80, change this to *:8080 and save it (CTRL+X -> y -> Enter)
Then we need to edit the ports file from apache:
change the line that states Lines 80 and change it to Lines 8080 and save it (CTRL+X -> y -> Enter).
Now we can start apache2:
Try to connect to the website using the ip-address with the portnumber added:
(ip-address can change to your setup) If everything went as planned you have a website.
Now we configure PHP:
We’ve got to change the timezone:
sed -i "s/^;date.timezone =.*/date.timezone = Europe\/Amsterdam/" /etc/php5/*/php.ini
(Change the timezone to your own, this is my timezone)
The next part is a bit difficult, because as i said, my database is running on another server, and that part is already installed. look at: https://github.com/spotweb/spotweb/wiki/Install-Spotweb-on-Ubuntu-12.04-LTS-(Precise-Pangolin)-(english) for the configuration, part of this post is also comming from there btw.
Based upon the other website, i hope you have configured the SQL part.
Now you have 2 options, installing spotweb using apt-get, but i wouldn’t recommend it. The version of spotweb on the repository is of 2013 and although spotweb from github isn’t actively maintained anymore, it’s still more recent then using apt-get.
To install spotweb using github do the following:
tar -xvzf master
sudo mv spotweb-spotweb-* /var/www/html/spotweb
chown www-data:www-data * -R
Now we can connect to spotweb using the website:
On the first page everything should be fine, the only options that maybe need some attention are:
Database support: At least one of the database components should give OK, the others can be “NOT OK”.
Own settings file: i don’t really make a custom settings file, so that can stay as “NOT OK”.
The database components need to be changed to accomodate your settings. Like i said my database is on another server, so i changed the settings to the other server. When done, click verufy database and if everything is done correctly, you continue.
Then enter the information of your usenet provider. You can select a set of preconfigured usenet providers or ad a custom one (last item of the pulldown menu). When done click verify.
In the next menu you select what type of spotweb enviroment you want. In my case I checked “Single User” and added my info and clicked create system.
If everything goes ok you will get a new screen that gives you the content of your dbsettings.inc.php. If you are using a program to make a connection to your server, you can copy paste the content. In the worst case you need to type it.
<copy paste the website content>
CTRL+X -> Y -> ENTER
While you are in a shell also do the following:
(Yes run the last line twice. An index wasn’t created, so running it twice fixed that issue)
Then switch back to your website and click on the link “Visit your spotwebsite”