Difference between revisions of "Oxyl~box (ppc)"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{Template:Articles}}
 
{{Template:Articles}}
<center><font color=red>''Created by Brummierob using help from various site including ''fast'' from the oxyl forum</font></center>
+
<center><font color=red>''Created by Brummierob using help from various sites including "fast" from the oxyl forum</font></center>
  
 
=== Requirements ===
 
=== Requirements ===

Revision as of 19:07, 16 October 2006

Created by Brummierob using help from various sites including "fast" from the oxyl forum

Contents

Requirements

You will need to install:

  1. PPC Tools
  2. Apache
  3. GD
  4. PHP

Note: MySQL is not required for Oxyl~box. This is a good way of saving resources on the Linkstation!!!

Installation

Create an Oxylbox directory in apache's DocumentRoot (/mnt/opt/apache/htdocs)

mkdir /mnt/opt/apache/htdocs/oxylbox

Download Oxyl~box into previously created directory then do a changemod

cd /mnt/opt/apache/htdocs/oxylbox
wget http://www.oxyl.de/load.php?ticket=e92b77137cf76b3f4af510fdc44efe2e&file=oxylbox-V2.50_lin.tar.gz
chmod a+r /mnt/opt/apache/htdocs/oxylbox

untar the oxyl tar file in the directory

tar xzvf oxylbox-V2.50_lin.tar.gz

Change user:group

chown -R nobody:nogroup /mnt/opt/apache/htdocs/oxylbox

Edit the file /mnt/opt/apache/conf/httpd.conf in the following way:

vi /mnt/opt/apache/conf/httpd.conf

Search for and add/alter the following to the file (You will, at the very least, need to change your port to 81 (or some other port) as 80 is the port that the Linkstation uses for its Webinterface.):

-Port: The port to which the standalone server listens. For -ports < 1023, you will need httpd to be run as root initially. Listen 81

-Oxyls Documentroot; set accordingly DocumentRoot "/mnt/opt/apache/htdocs/oxylbox"


-so that photos/pictures and videos can be displayed Alias /root/ "/"


-Change the group parameter to the following: Group nogroup

Make a hard link for the libformat.so

ln -s /mnt/opt/apache/htdocs/oxylbox/bin/libformat.so /bin/libformat.so

The following was also required

find /mnt/opt/apache/htdocs/oxylbox -type f -print0 | xargs -0 chmod 644
find /mnt/opt/apache/htdocs/oxylbox -type d -print0 | xargs -0 chmod 755

Then

chown -R nobody:everyone /mnt/opt/apache/htdocs/oxylbox

Access the oxylbox via LinkstationIPAddress at port 81 and setup the oxylbox via oxyl-setup. Make sure you set the playlist directory, choose the language, set showcenter ip and last but not least update the software to v31. Update and install all plugins and skins that become visible on setup page after the update to 31.

Modify the file functions.inc in the directory /mnt/opt/apache/htdocs/oxylbox/common in the following way:

A. in the getthumbhref function is needed to submit the original image extension to the do_imgconvert function:

search for

if(!do_imgconvert($fn,$back,$new_size[0],$new_size[1],$img_ext2))

and change it to

if(!do_imgconvert($fn,$back,$new_size[0],$new_size[1],$img_ext2,$img_ext))


B. in the do_imgconvert function initialisation the parameter $org_ext is set to "". Because of this, the if selection would never use the GD lib functions. Since we now submit this parameter (see 1.) we have to remove this initialisation:

search for

function do_imgconvert($orgpfad,$newpfad,$width,$height,$new_ext,$org_ext=,$quali= 80,$o_width=0,$o_height=0){

and change it to

function do_imgconvert($orgpfad,$newpfad,$width,$height,$new_ext,$org_ext,$quali=80, $o_width=0,$o_height=0){


C. in the do_imgconvert function a check is done for the image extensions, which can't be converted by nconvert (to use GD Lib only for the unsupported formats by nconvert). Since we are using GD Lib for all extensions, we have to remove this check:

search for

if($org_ext!=&&in_array($org_ext,$GLOBALS['imageextensions_nonc'])&&$GLOBALS['GDLIB_SUPPORT']){

and change it to

if($org_ext!=&&$GLOBALS['GDLIB_SUPPORT']){

D. at last the image creation in do_imgconvert does not work, because the $o_width and $o_height variables are initialised with 0, but not changed afterwards (the same bug like with $org_ext):

search for

if($create_img){

and change it to

if($create_img){ $img_size= getimagesize($orgpfad); $o_width=$img_size[0]; $o_height=$img_size[1];


E. as an additional info - here is my complete version of the image creation (from D.)

if($create_img){ $img_size= getimagesize($orgpfad); $o_width=$img_size[0]; $o_height=$img_size[1]; $img = imagecreatetruecolor($width,$height); $ppp =imagecopyresized ($img,$simg,0,0,0,0,$width,$height,$o_width,$o_height); ImageJPEG($img, $newpfad, $quali); ImageDestroy($img ); }

Restart apache

/mnt/opt/apache/bin/apachectl restart

Run it

Go to your Oxylbox on your Linkstation

http://<LinkstationIPAddress>:81


Troubleshooting

In the event of something not working as it should, do this and ask for help

Create a file to see your php settings

vi /mnt/opt/apache/htdocs/oxylbox/config/test_php.php 

and put this in it

<?
phpinfo();
?>

It should output your PHP settings when you try to reach it.

Screenshots

To come...


For screenshots go to from here

Brummierob