Firmware: A-410 [01 Apr. 2014] | A-400 [12 Mar. 2014] | C-300 [13 Feb. 2014] | A-300 [24 Feb. 2014] | C-200 [11 July 2013] | A-200/A-210 [11 July 2013] | Popbox V8 [3 Dec 2013]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Post Reply 
Faster PHP server CSI package
08-07-2009, 05:02 PM
Post: #16
RE: Faster PHP server CSI package
Hi,

1 questions (may sound stupid, sorry...):

Can I use lighttpd to display my Skin on the TV (to replace sybhttpd) ?


Thank!
Visit this user's website Find all posts by this user
Add Thank You Quote this message in a reply
08-07-2009, 09:18 PM
Post: #17
RE: Faster PHP server CSI package
lighttpd wont be able to directly replace sybhttpd as sybhttpd has many custom hacks inside it that make it not a normal web server. Beyond that the only thing that will run noticably faster through this server compared to sybhttpd/apache are php scripts and while they could be written, i'm not familiar with any php indexes.

journey4712

Automated TV Downloads | On-Demand Network Shares | Faster PHP (lighttpd+fastcgi+apc)
PCH-A100 | PCH-C200 | XBMC HTPC | Sharp Aquos 42D62U | Logitech Z-5500
Find all posts by this user
Add Thank You Quote this message in a reply
08-07-2009, 09:47 PM
Post: #18
RE: Faster PHP server CSI package
Tried to install lighttpd but installation failed:

Checking for new version: up to date
Checking Application Initializer profile: Valid
Installing application from file /share/lighttpd.tar: /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/AppInit/appinit.cgi: line 1: cannot open /share/Apps/lighttpd/appinfo.json: no such file
Failed

Find all posts by this user
Add Thank You Quote this message in a reply
08-07-2009, 10:20 PM
Post: #19
RE: Faster PHP server CSI package
Hmm, i double checked the packages they definatly contain appinit.cgi. You can manually install with the following process through telnet untill i figure out what could cause that error.

Code:
mkdir /share/Apps/lighttpd
cd /share/Apps/lighttpd
tar -xvf /share/lighttpd.tar
cd ..
AppInit/appinit.cgi start lighttpd

journey4712

Automated TV Downloads | On-Demand Network Shares | Faster PHP (lighttpd+fastcgi+apc)
PCH-A100 | PCH-C200 | XBMC HTPC | Sharp Aquos 42D62U | Logitech Z-5500
Find all posts by this user
Add Thank You Quote this message in a reply
08-07-2009, 10:23 PM
Post: #20
RE: Faster PHP server CSI package
(08-07-2009 10:20 PM)journey4712 Wrote:  Hmm, i double checked the packages they definatly contain appinit.cgi. You can manually install with the following process through telnet untill i figure out what could cause that error.

Code:
mkdir /share/Apps/lighttpd
cd /share/Apps/lighttpd
tar -xvf /share/lighttpd.tar
cd ..
AppInit/appinit.cgi start lighttpd

Sometimes that might be causes by an unsupported tar format. For some reason the default tar on the NMT is very picky regarding it's files.
I noticed a lot of (windows) programs create uncompressed tars which the default nmt's tar cant unpack. I use the nmt's tar or izarc which also creates good tar files.

Tip for the user: can you try install telnet and then install the package? A newer busybox is present in telnet and dropbear with a better tar command.

Easy way of installing software on your NMT using just your mouse: NMT Community Software Installer
Visit this user's website Find all posts by this user
Add Thank You Quote this message in a reply
08-07-2009, 11:03 PM (This post was last modified: 08-07-2009 11:04 PM by DonGyros.)
Post: #21
RE: Faster PHP server CSI package
(08-07-2009 10:20 PM)journey4712 Wrote:  Hmm, i double checked the packages they definatly contain appinit.cgi. You can manually install with the following process through telnet untill i figure out what could cause that error.

Code:
mkdir /share/Apps/lighttpd
cd /share/Apps/lighttpd
tar -xvf /share/lighttpd.tar
cd ..
AppInit/appinit.cgi start lighttpd

journey4712

That worked, thanks!

Now I can start to compare the performance of UMC Big GrinBig Grin

Find all posts by this user
Add Thank You Quote this message in a reply
08-08-2009, 12:14 AM (This post was last modified: 08-08-2009 01:01 AM by journey4712.)
Post: #22
RE: Faster PHP server CSI package
In a quick test with firefox on the UMC front page, i saw a decrease from 1.3s to 0.8s to receive the response, a movie details page (with only 4 movies in the db, small test) went from 950ms to 300ms. Not too bad Smile

It looks like to use this in an automatic fashion UMC would need a new option in the mediacenter general tab for how to access mediacenter. To test locally i renamed umc.cgi to umc.php, replaced all occurances of umc.cgi with umc.php, and repointed localhost.drives:8883/HARD_DISK/ to localhost:9990/U_gaya/ EDIT: building a network based jukebox with apache compatible ticked works fine, just upload to Apps/AppInit/websites/U/ and access as http://localhost:9990/U/index.php

I'd like to add quite impressive work from all of you on UMC. I had checked it out of svn a few times but never got it going before. The new release builds a friendly jukebox.

@ger teunis
thanks for the suggestion, i've re-tar'd the lighttpd package with the nmt busybox tar and replaced the -nmt2 package on the server, hopefully will fix that install issue.

journey4712

Automated TV Downloads | On-Demand Network Shares | Faster PHP (lighttpd+fastcgi+apc)
PCH-A100 | PCH-C200 | XBMC HTPC | Sharp Aquos 42D62U | Logitech Z-5500
Find all posts by this user
Add Thank You Quote this message in a reply
08-08-2009, 01:27 AM
Post: #23
RE: Faster PHP server CSI package
(08-08-2009 12:14 AM)journey4712 Wrote:  In a quick test with firefox on the UMC front page, i saw a decrease from 1.3s to 0.8s to receive the response, a movie details page (with only 4 movies in the db, small test) went from 950ms to 300ms. Not too bad Smile

That sounds really great and is really promising! I think it could be even faster if we would try to optimize the php codeBig Grin

I'm curious about the cache management issue and 1080p movies. Maybe lighttpd will make less problems with this issue!?

Find all posts by this user
Add Thank You Quote this message in a reply
08-09-2009, 09:23 AM
Post: #24
RE: Faster PHP server CSI package
Looks like a great addition, but I got a question. How can I create a folder in the apps/appinit-directory? I tried using Samba (Win 7) and FTP and both tell me, that I don't own the rights to do so. Access denied. Seems that I missed something simple.

Want to try UMC using your alternative php-server-package on my NMT.

Thanks for your effort in making those NMTs better and better.

Tom
Find all posts by this user
Add Thank You Quote this message in a reply
08-09-2009, 10:00 AM (This post was last modified: 08-09-2009 10:26 AM by journey4712.)
Post: #25
RE: Faster PHP server CSI package
EDIT: rewrote for simplicity after (rightfully, it was almost gibberish Smile )confusing tom92 below

SMB doesn't have the right file permissions to put the files there. FileManager from CSI suggested below is a great method. ftp might also have the right permissions.

journey4712

Automated TV Downloads | On-Demand Network Shares | Faster PHP (lighttpd+fastcgi+apc)
PCH-A100 | PCH-C200 | XBMC HTPC | Sharp Aquos 42D62U | Logitech Z-5500
Find all posts by this user
Add Thank You Quote this message in a reply
08-09-2009, 10:15 AM
Post: #26
RE: Faster PHP server CSI package
Uh euh Huh, well, will try Wink. Did a work-around by using the File Manager included in the CSI which let me create the directory Tongue. But after adding UMC as web service I got stuck again. So I checked here and now I will try as you wrote above.

Thanks for your help!

Tom
Find all posts by this user
Add Thank You Quote this message in a reply
08-09-2009, 10:17 AM (This post was last modified: 08-09-2009 10:23 AM by journey4712.)
Post: #27
RE: Faster PHP server CSI package
If you added the directory with filemanager i would stick with that route, easy and got the job done.

As to why its not working, not quite sure i will double check my installation vs the package and get back to you.

Can you access the UMC jukebox from your PC browser? same url but replace localhost with the ip of your pch

journey4712

EDIT:
Hmm, no i tried from scratch and didn't need to do anything special. Interested what http://ip-of-pch:9990/U/index.php results in

Automated TV Downloads | On-Demand Network Shares | Faster PHP (lighttpd+fastcgi+apc)
PCH-A100 | PCH-C200 | XBMC HTPC | Sharp Aquos 42D62U | Logitech Z-5500
Find all posts by this user
Add Thank You Quote this message in a reply
08-09-2009, 11:36 AM (This post was last modified: 08-09-2009 11:37 AM by Tom92.)
Post: #28
RE: Faster PHP server CSI package
Got some answers but no solution.
Did a deep clean with following format of my hard_disk to get rid of all junk.
Using CSI I installed first telnet then one of those subtitle-fonts, the file manager and via zip-file your php-package. No errors so far.

Then I created the U-directory within the file manager and allowed all permissions. Before doing this I can't access it via ftp. Permissions were also only able to be changed using the file manager.

Afterwards I copied my apache-ticked UMC jukebox (only 1 movie for testing purposes) into Apps/appinit/websites/U and tried to access via webbrowser:

http://ip-of-pch:9990/U/index.php shows me "Connection failed" while
http://ip-of-pch:9999/U/index.php works well and shows the introduction screen of UMC (the standard php-server)

Putting http://localhost:9990/U/index.php into web services creates a "Request cannot be processed" error on PCH.

Seems that the installation of the php-package failed in some way. Can I check some more on my side?

Tom
Find all posts by this user
Add Thank You Quote this message in a reply
08-09-2009, 12:37 PM (This post was last modified: 08-09-2009 12:38 PM by journey4712.)
Post: #29
RE: Faster PHP server CSI package
Hmm, if your getting connection failed then the server never started up. To verify that it can start, from telnet issue the following command
Code:
/share/Apps/lighttpd/daemon.sh start

You should get a little output to verify its working. daemon.sh should have been called by appinit.cgi on installation, if it failed starting this should output why.

successfull start looks something like
Code:
Trying 192.168.1.114...
Connected to localhost.drives.
Escape character is '^]'.


BusyBox v1.5.0 (2008-07-10 18:07:27 MYT) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/ # /share/Apps/lighttpd/daemon.sh start
2009-08-09 11:38:35: (log.c.75) server started
journey4712

Automated TV Downloads | On-Demand Network Shares | Faster PHP (lighttpd+fastcgi+apc)
PCH-A100 | PCH-C200 | XBMC HTPC | Sharp Aquos 42D62U | Logitech Z-5500
Find all posts by this user
Add Thank You Quote this message in a reply
08-09-2009, 01:09 PM (This post was last modified: 08-09-2009 01:09 PM by Tom92.)
Post: #30
RE: Faster PHP server CSI package
Ok, when I start telnet the prompt looks like this:
Code:
/opt/sybhttpd/localhost.drives/HARD_DISK #
There's no hint for busybox etc... like in your example.

starting daemon.sh using
Code:
Apps/lighttpd/daemon.sh start
shows:
Code:
2009-08-09 13:06:55: (log.c.75) server started
2009-08-09 13:06:55: (mod_fastcgi.c.904) bind failed for: unix:/tmp/php.socket-0
Permission denied
2009-08-09 13:06:55: (mod_fastcgi.c.1340) [ERROR]: spawning fcgi failed.
2009-08-09 13:06:55: (server.c.908) Configuration of plugins failed. Going down.

Maybe I should try installing telnet without using CSI? Will try that later and report.
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Serviio (DLNA server) RXP 3 4,345 12-30-2012 11:14 AM
Last Post: mikk
  ftp server and upload images from ipcam defer 8 7,501 02-11-2012 04:48 PM
Last Post: vanquish99
  HTTP streaming server on A110 ? dony71 0 2,008 01-26-2012 02:48 AM
Last Post: dony71
  A-110 used like server db to store sensor data csorda 0 1,532 01-18-2012 04:06 PM
Last Post: csorda
Music fuppes 0.629 for NMT - dlna, upnp media server [UPDATED: 31-May-2009] Mr Segfault 53 54,882 10-12-2011 01:04 AM
Last Post: spud
  OpenSSH for SFTP server? dony71 0 1,154 09-30-2011 05:32 AM
Last Post: dony71
  web server manifest support harrykausl 0 1,563 07-20-2011 09:35 AM
Last Post: harrykausl
  Help with Server Timeout Error running a script hindibuff 0 2,164 03-29-2011 06:21 AM
Last Post: hindibuff
Bug Executing a script on the server from the NMT? johnk 6 4,152 02-21-2011 10:59 PM
Last Post: johnk
  Popcorn does not see Twonky or PS3 Media Server rgn2000 0 3,996 09-02-2010 09:14 PM
Last Post: rgn2000

Forum Jump: