Showcenter on Linksys nslu2

A forum for items relating to the installation and use of SwissCenter on Linux platforms.

Showcenter on Linksys nslu2

Postby MrT » Wed Mar 09, 2005 4:09 pm

I am currently setting up a small and silent linux box with a big disc (actually, it is an old modified Cobalt RaQ 2) as a mp3/video/image/amule server as a backend to my pinnacle showcenter.

Off course, I think this makes me pretty cool and thinking this, I cannot help but think that other people would like to achieve the same amount coolness. B) However, where to find this small and silent linux box with a big disc .

Well, what you could consider is the following:
Buy a cheap small and silent Linksys box with a big disc
http://www.linksys.com/products/product.asp?grid=35&scid=43&prid=640

and update the linux OS running it, with a completely open and configurable one:
http://www.nslu2-linux.org/

Just add swisscenter and presto!

Off course, it's not that simple, you have to install a sql server (sql-lite might be more suitable), php and a webserver (I'm using
http://www.lighttpd.net/ but thttpd might also work) on a system that is under development, but if it works you have your very own network attached media server (NAMS)!

So, just an idea, use it or leave it.
MrT
Junior Member
Junior Member
 
Posts: 11
Joined: Mon Mar 07, 2005 4:49 am

Re:Showcenter on Linksys nslu2

Postby marco » Wed Mar 09, 2005 6:13 pm

MrT wrote:Well, what you could consider is the following:
Buy a cheap small and silent Linksys box with a big disc
http://www.linksys.com/products/product.asp?grid=35&scid=43&prid=640

and update the linux OS running it, with a completely open and configurable one:
http://www.nslu2-linux.org/

Pretty cool! Coincidentally, today I wondered 'would it be possible to run an OS on the 'network-connectable-harddisks'. It seems so :-)
marco
Senior Member
Senior Member
 
Posts: 395
Joined: Fri Oct 22, 2004 12:15 pm
Country: Netherlands (nl)

Re:Showcenter on Linksys nslu2

Postby rwhitby » Fri Apr 29, 2005 10:03 pm

So, just an idea, use it or leave it.


Just to let you know that mysql, php and apache are all running on the Unslung firmware for the NSLU2.

I am the lead Unslung firmware developer, and I happen to have recently bought a Neuston MC-500.

I already have OpenShowCenter serving from the NSLU2, and am just about to try SwissCenter on the same device.

-- Rod
rwhitby
Newbie
Newbie
 
Posts: 1
Joined: Fri Apr 29, 2005 8:59 am

Re:Showcenter on Linksys nslu2

Postby bART » Sun May 08, 2005 2:10 am

I tried this. However the mysql database can not be created. The config results in the following apache error_log:

[Sat May 07 21:04:55 2005] [notice] Apache/2.0.53 (Unix) DAV/2 PHP/5.0.3 configured -- resuming normal operations
[client 192.168.1.100] PHP Notice: Undefined index: section in /share/hdd/data/opt/share/www/swisscenter/config/index.php on line 1000
[client 192.168.1.100] PHP Notice: Undefined index: section in /share/hdd/data/opt/share/www/swisscenter/config/index.php on line 1000
[client 192.168.1.100] PHP Notice: Use of undefined constant DB_HOST - assumed 'DB_HOST' in /share/hdd/data/opt/share/www/swisscenter/config/index.php on line 927
[client 192.168.1.100] PHP Notice: Use of undefined constant DB_USERNAME - assumed 'DB_USERNAME' in /share/hdd/data/opt/share/www/swisscenter/config/index.php on line 927
[client 192.168.1.100] PHP Notice: Use of undefined constant DB_PASSWORD - assumed 'DB_PASSWORD' in /share/hdd/data/opt/share/www/swisscenter/config/index.php on line 927
[client 192.168.1.100] PHP Notice: Use of undefined constant DB_DATABASE - assumed 'DB_DATABASE' in /share/hdd/data/opt/share/www/swisscenter/config/index.php on line 927
[client 192.168.1.100] PHP Notice: Use of undefined constant DB_HOST - assumed 'DB_HOST' in /share/hdd/data/opt/share/www/swisscenter/config/index.php on line 927
[client 192.168.1.100] PHP Notice: Use of undefined constant DB_USERNAME - assumed 'DB_USERNAME' in /share/hdd/data/opt/share/www/swisscenter/config/index.php on line 927
[client 192.168.1.100] PHP Notice: Use of undefined constant DB_PASSWORD - assumed 'DB_PASSWORD' in /share/hdd/data/opt/share/www/swisscenter/config/index.php on line 927
[client 192.168.1.100] PHP Notice: Use of undefined constant DB_DATABASE - assumed 'DB_DATABASE' in /share/hdd/data/opt/share/www/swisscenter/config/index.php on line 927
[client 192.168.1.100] PHP Fatal error: Using $this when not in object context in /share/hdd/data/opt/share/www/swisscenter/base/mysql.php on line 46
[client 192.168.1.100] PHP Fatal error: Using $this when not in object context in /share/hdd/data/opt/share/www/swisscenter/base/mysql.php on line 46


Anybody an idea how to solve this?

Bart
bART
Junior Member
Junior Member
 
Posts: 10
Joined: Sat May 07, 2005 1:06 pm

Re:Showcenter on Linksys nslu2

Postby MrT » Thu May 12, 2005 11:38 pm

I already have OpenShowCenter serving from the NSLU2, and am just about to try SwissCenter on the same device.


This is very cool, I did not know the unslung project was progressing this rapidly.

You'll probably find that Swisscenter works much more pleasantly than openworkcenter does. Please let me know if anybody succeeds in getting the combination to work.
MrT
Junior Member
Junior Member
 
Posts: 11
Joined: Mon Mar 07, 2005 4:49 am

Re:Showcenter on Linksys nslu2

Postby markfish » Fri Aug 05, 2005 4:39 am

Got swisscenter running on my nslu2 with unslung tonight.
Works a treat, especially with the slug running at full speed. B)

Had to perservere and make a couple of minor code changes but will post a how to in due course.
markfish
Newbie
Newbie
 
Posts: 2
Joined: Thu Aug 04, 2005 3:34 pm

Re:Showcenter on Linksys nslu2

Postby bART » Fri Aug 05, 2005 2:30 pm

Great! Please tell us how...
bART
Junior Member
Junior Member
 
Posts: 10
Joined: Sat May 07, 2005 1:06 pm

Re:Showcenter on Linksys nslu2

Postby admin » Fri Aug 05, 2005 3:55 pm

Yes - please do... it look like you have modified the code so that it's PHP5 compatible. Something that was still on my "to-do" list :)
Server : Windows Home Server (HP MediaSmart EX470)
Player #1: Pinnacle Showcenter 200 (wired ethernet)
Player #2: Popcorn Hour A110 (wired ethernet)
User avatar
admin
Senior Member
Senior Member
Developer
 
Posts: 1828
Joined: Thu Sep 16, 2004 4:15 am
Location: Bracknell, England
Country: United Kingdom (uk)

Re:Showcenter on Linksys nslu2

Postby Rudi70 » Thu Aug 11, 2005 2:01 am

Hi !

First of all: Please excuse my bad english ! This is my first posting in this forum. I'm also a linux and php neewbie.

After trying and trying with Apache and PHP5 I made some progress with swisscenter on the NSLU2.

I installed php-thttpd with ipkg (also installed the which command). Of cause I had installed mysql and php and the php-mysql packages before (used with apache - don't know, if it makes any difference according to php-thttpd).
Then I edited the thttpd config file (it's in /opt/etc):

dir=/opt/share/www/swisscenter (was my swisscenter-Installation under Apache)
port=8001 (just tried this one, have wizd on 8000)
user=nobody
nochroot
nosymlinks
leave the rest

Now make sure, that all files in the swisscenter-directory have the appropriate rigths for thttpd ! Use:

find TheDirectoyPathOfSwisscenter -type f -print0 | xargs -0 chmod 644
find TheDirectoyPathOfSwisscenter -type d -print0 | xargs -0 chmod 755

After that I could point my browser to the NSLU2-ip and port but had an error, because swisscenter could'nt save the swisscenter.ini file. Seems to be a problem with the LOCATION-variable in settings.php. So, I edited the settings.php and commented out most of the log-file things and defined the variable to my directory:.

// Where is the SwissCenter installed?
// if (!empty($_SERVER['DOCUMENT_ROOT']))
// define //('SC_LOCATION',str_replace('\','/',os_path($_SERVER["DOCUMENT_ROOT"],true)));
// elseif (!empty($_SERVER['PHP_SELF']))
// define ('SC_LOCATION', //str_replace('\','/',dirname($_SERVER['PHP_SELF']).'/'));
// else
// define ('SC_LOCATION', //str_replace('\','/',dirname($_SERVER["argv"][0]).'/'));
define ('SC_LOCATION','/opt/share/www/swisscenter/');


Now I was able to point the webbrowser to ip-adress:8001


It seems to work on the NSLU2 - just started the Media-update-script. Don't know, if this will help you - I will do further testing in the next days.
Rudi70
Newbie
Newbie
 
Posts: 7
Joined: Thu Jul 28, 2005 1:04 am

Re:Showcenter on Linksys nslu2

Postby admin » Thu Aug 11, 2005 7:52 pm

find TheDirectoyPathOfSwisscenter -type f -print0 | xargs -0 chmod 644
find TheDirectoyPathOfSwisscenter -type d -print0 | xargs -0 chmod 755


You'll need to change the actual ownership of "TheDirectoryPathOfSwisscenter" and the files within it to "nobody" as the swisscenter will need to create new files and modify the existing ones (for creating the symbolic links to your media, and for the auto-update feature to work).

The best and easiest way of doing this is:

chown -R nobody TheDirectoryPathOfSwisscenter

Rob.
Server : Windows Home Server (HP MediaSmart EX470)
Player #1: Pinnacle Showcenter 200 (wired ethernet)
Player #2: Popcorn Hour A110 (wired ethernet)
User avatar
admin
Senior Member
Senior Member
Developer
 
Posts: 1828
Joined: Thu Sep 16, 2004 4:15 am
Location: Bracknell, England
Country: United Kingdom (uk)

Re:Showcenter on Linksys nslu2

Postby Rudi70 » Thu Aug 11, 2005 8:32 pm

Thank you Rob,

I already fixed this yesterday (forgot to post - sorry). I also used chmod 644 (for files) and chmod 755 (for directories) together with chown for my media locations (it seems thttpd needs this).

I was able to create the database and populate it using the search-script (media-links are created). When the NSLU2 is connected to my PC everything works fine so far (have not tested all features..). The problem is, when I connect the NLSU2 to my Transgear DVD-Player (not Internet-connected) and try to connect to swisscenter on the NSLU2. The connection just times out - I think, this is because swisscenter tries to establish an internet-connection to look for an update (probably takes to long for the DVD-Player). I think, to disable the update-check will fix this problem. Had no time yesterday for further testing. So I'll test it this evenning. I'll post the results of the hardware identification (should be Syabas-Software).

By the way: Swisscenter on NSLU2 with thttpd is pretty fast (serves 9000 mp3s).

Bye and thank you Rob for this software

Rudi
Rudi70
Newbie
Newbie
 
Posts: 7
Joined: Thu Jul 28, 2005 1:04 am

Re:Showcenter on Linksys nslu2

Postby admin » Thu Aug 11, 2005 8:39 pm

The connection just times out - I think, this is because swisscenter tries to establish an internet-connection to look for an update


Yes, I discovered this when my internet connection broke... it does take a long time to time out. In the next releae I shall do something about it!

For now, you can edit the base/server.php file and at the end, change the internet_available() function to just return false (instead of trying to perform the socket connection).
Server : Windows Home Server (HP MediaSmart EX470)
Player #1: Pinnacle Showcenter 200 (wired ethernet)
Player #2: Popcorn Hour A110 (wired ethernet)
User avatar
admin
Senior Member
Senior Member
Developer
 
Posts: 1828
Joined: Thu Sep 16, 2004 4:15 am
Location: Bracknell, England
Country: United Kingdom (uk)

Re:Showcenter on Linksys nslu2

Postby bART » Thu Aug 11, 2005 9:11 pm

I can not reproduce this with Apache. When the database is created, top does not show any mysql activity. The "create database" page does not complete; it keeps on loading. Apache report the following problem in the log:

[client 192.168.2.100] PHP Notice: Undefined index: section in /opt/share/www/swisscenter/config/index.php on line 1218
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_HOST - assumed 'DB_HOST' in /opt/share/www/swisscenter/config/index.php on line 1145
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_USERNAME - assumed 'DB_USERNAME' in /opt/share/www/swisscenter/config/index.php on line 1145
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_PASSWORD - assumed 'DB_PASSWORD' in /opt/share/www/swisscenter/config/index.php on line 1145
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_DATABASE - assumed 'DB_DATABASE' in /opt/share/www/swisscenter/config/index.php on line 1145
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_HOST - assumed 'DB_HOST' in /opt/share/www/swisscenter/config/index.php on line 1171
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_USERNAME - assumed 'DB_USERNAME' in /opt/share/www/swisscenter/config/index.php on line 1171
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_PASSWORD - assumed 'DB_PASSWORD' in /opt/share/www/swisscenter/config/index.php on line 1171
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_DATABASE - assumed 'DB_DATABASE' in /opt/share/www/swisscenter/config/index.php on line 1171
[client 192.168.2.100] PHP Notice: Undefined index: password in /opt/share/www/swisscenter/config/index.php on line 89
[Thu Aug 11 14:21:03 2005] [error] [client 192.168.2.100] File does not exist: /opt/share/www/swisscenter/favicon.ico
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_HOST - assumed 'DB_HOST' in /opt/share/www/swisscenter/config/index.php on line 1145, referer: http://192.168.2.111:8000/config/
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_USERNAME - assumed 'DB_USERNAME' in /opt/share/www/swisscenter/config/index.php on line 1145, referer: http://192.168.2.111:8000/config/
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_PASSWORD - assumed 'DB_PASSWORD' in /opt/share/www/swisscenter/config/index.php on line 1145, referer: http://192.168.2.111:8000/config/
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_DATABASE - assumed 'DB_DATABASE' in /opt/share/www/swisscenter/config/index.php on line 1145, referer: http://192.168.2.111:8000/config/
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_HOST - assumed 'DB_HOST' in /opt/share/www/swisscenter/config/index.php on line 1171, referer: http://192.168.2.111:8000/config/
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_USERNAME - assumed 'DB_USERNAME' in /opt/share/www/swisscenter/config/index.php on line 1171, referer: http://192.168.2.111:8000/config/
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_PASSWORD - assumed 'DB_PASSWORD' in /opt/share/www/swisscenter/config/index.php on line 1171, referer: http://192.168.2.111:8000/config/
[client 192.168.2.100] PHP Notice: Use of undefined constant DB_DATABASE - assumed 'DB_DATABASE' in /opt/share/www/swisscenter/config/index.php on line 1171, referer: http://192.168.2.111:8000/config/


Phpmyadmin report however that the database is created with 22 tables.

Howlong did it took your nsl2 to create the tables?

-Bart
bART
Junior Member
Junior Member
 
Posts: 10
Joined: Sat May 07, 2005 1:06 pm

Re:Showcenter on Linksys nslu2

Postby Rudi70 » Thu Aug 11, 2005 9:59 pm

Hi BArt,
I had the same problems with Apache. I was able to create the database, but had no reply from swisscenter. The create-database-page did not load fully (along with lot's of php error messages). All editing of the script's did not help (I'm new to php...). The php-thttpd package works much better with swisscenter. Just a few adjustments (see my posts above) and finally swisscenter works. Dont't know why Apache + PHP 5 does not work with swisscenter on the slug.I also tried Oxyl with Apache on the slug and had success (but swisscenter is better !).

Rudi
Rudi70
Newbie
Newbie
 
Posts: 7
Joined: Thu Jul 28, 2005 1:04 am

Re:Showcenter on Linksys nslu2

Postby bART » Thu Aug 11, 2005 10:03 pm

Hi Rudi,

I remember that there was a problem with the file size limit, which prevented the playing of video files. Is that still a problem?

I will try php-thttpd later today or tomorrow!

Cheers, Bart
bART
Junior Member
Junior Member
 
Posts: 10
Joined: Sat May 07, 2005 1:06 pm

Next

Return to Linux Related

Who is online

Users browsing this forum: No registered users and 1 guest

cron