Category Archives: Uncategorized

OSMC 2018.X with Spotweb

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: and press enter.

You probably get an error, that’s because OSMC has a server running on the same webport. Let’s change that:
nano /etc/apache2/sites-enabled/000-default.conf
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:
nano /etc/apache2/ports.conf
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:
/etc/init.d/apache2 start
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:

(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:

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”.
Click “Next”

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.

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”

DONE!!

 

 

 

 

Used resources:
https://github.com/spotweb/spotweb/wiki/Install-Spotweb-on-Ubuntu-12.04-LTS-(Precise-Pangolin)-(english)

Zeal and CodeLite a perfect couple….. finally/again

When i script (i don’t program), i do this in CodeLite. This is a nice bit of software (open source) that does the trick for me. Only the last couple of months i couldn’t get Zeal working. The strange thing was that when i pressed F1 it just started Zeal and it didn’t search the part i had selected. This is easy when you don’t know all possible options for a HTML tag, or a PHP command. Had tried several things, even searched online. Eventually i got it working again. And if you want to know how, here it is:

First check in Zeal if you don’t have the following option set (especially to F1):
Start Zeal, go to General, under the head “Global Shortcuts“. This should be anything except F1. (It shouldn’t  be a lot more, but for this example it shouldn’t be F1), click apply and OK.

Next part:
Find the directory that Zeal is installed. Easiest way is to click start, enter Zeal in the “Search programs and files” (W7) and then right click on the Zeal application icon, and the properties. In the new little screen there is a “Start in” box, copy the contents and click cancel. Click on the start button again and type “cmd” (without the “) and hit enter. In the black box type in “cd ” (including the space). Right click in the black screen and select in the menu “Paste” and hit enter. (Please note CTRL+V doesn’t work here). If everything is correct you are in the working directory from Zeal.
type the following commands:
“zeal.exe –unregister” <enter>
“zeal.exe –register” <enter>
if everything went correctly Zeal and CodeLite should be playing nice again. In the black box type in “exit” <enter>. The black box closes again, start CodeLite again and happy scripting/programming/whatever you do in CodeLite.

Hopefully this can help you further, and “if no one else can help you, maybe you can hire the A-team!” 😉