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

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
Line 10: Line 10:
 
# [[Articles/PPCGD | GD]]
 
# [[Articles/PPCGD | GD]]
 
# [[Articles/PPCApache | PHP]]
 
# [[Articles/PPCApache | PHP]]
<font color=red>Note: MySQL is not required for Oxyl~box. This is a good way of saving resources on the Linkstation! Because Oxyl~box doesn't require MySQL, don't forget to leave out the MySQL commands whilst installing php. When I have got time I will make a new Apache + PHP Article.</font>
+
<font color=red>Note: MySQL is not required for Oxyl~box. This is a good way of saving resources on the Linkstation!</font>
  
 
=== Installation ===
 
=== Installation ===
Line 54: Line 54:
 
Group nogroup
 
Group nogroup
  
Make a symbolic link for the libformat.so
+
You will now be required to replace the nconvert and libformat.so files, that are in the /mnt/opt/apache/htdocs/oxylbox/bin directory, with a ppc compatible nconvert and libformat.so.
 
+
ln -s /mnt/opt/apache/htdocs/oxylbox/bin/libformat.so /bin/libformat.so
+
 
+
You will now be required to replace the nconvert file, that is in the /mnt/opt/apache/htdocs/oxylbox/bin directory, with a ppc compatible nconvert.
+
  
Download the xnview rpm, which contains the nconvert file.
+
Download the xnview rpm, which contains the nconvert and libformat.so.3.87 files.
  
 
  cd /mnt/misc
 
  cd /mnt/misc
Line 69: Line 65:
 
  rpm2cpio XnView-static.ppc.rpm | cpio -idv
 
  rpm2cpio XnView-static.ppc.rpm | cpio -idv
  
The above mentioned command parameters -idv creates a 'usr' directory in the /mnt/misc directory. Copy the nconvert file from the /mnt/misc/usr/X11R6/bin directory to the /mnt/opt/apache/htdocs/oxylbox/bin directory.
+
The above mentioned command parameters -idv creates a 'usr' directory in the /mnt/misc directory. Copy the nconvert file from the /mnt/misc/usr/X11R6/bin directory to the /mnt/opt/apache/htdocs/oxylbox/bin directory. Copy the libformat.so.3.87 file from the /mnt/misc/usr/lib directory to the /mnt/opt/apache/htdocs/oxylbox/bin directory.
  
  cd /mnt/misc/usr/X11R6/bin/
+
  cp -R /mnt/misc/usr/X11R6/bin/* /mnt/opt/apache/htdocs/oxylbox/bin
  cp * /mnt/opt/apache/htdocs/oxylbox/bin
+
  cp /mnt/misc/usr/lib/libformat.so.3.87 /mnt/opt/apache/htdocs/oxylbox/bin
  cd /mnt/opt/apache/htdocs/
+
  cd /mnt/opt/apache/htdocs/oxylbox
 +
mv libformat.so libformat.soOLD
 +
mv libformat.so.3.87 libformat.so
  
 
In the above mentioned /mnt/misc/usr/X11R6/bin/ directory are three files, 'nconvert', 'nview', and 'xnview'. Only the nconvert is required, but it doesn't hurt to copy all three files to the /mnt/opt/apache/htdocs/oxylbox/bin directory.
 
In the above mentioned /mnt/misc/usr/X11R6/bin/ directory are three files, 'nconvert', 'nview', and 'xnview'. Only the nconvert is required, but it doesn't hurt to copy all three files to the /mnt/opt/apache/htdocs/oxylbox/bin directory.
  
 +
Make a symbolic link for the libformat.so
  
 +
ln -s /mnt/opt/apache/htdocs/oxylbox/bin/libformat.so /bin/libformat.so
  
 
The following commands were also required:
 
The following commands were also required:

Revision as of 17:15, 13 December 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

You will now be required to replace the nconvert and libformat.so files, that are in the /mnt/opt/apache/htdocs/oxylbox/bin directory, with a ppc compatible nconvert and libformat.so.

Download the xnview rpm, which contains the nconvert and libformat.so.3.87 files.

cd /mnt/misc
wget http://download.xnview.com/XnView-static.ppc.rpm

Unpack the rpm file.

rpm2cpio XnView-static.ppc.rpm | cpio -idv

The above mentioned command parameters -idv creates a 'usr' directory in the /mnt/misc directory. Copy the nconvert file from the /mnt/misc/usr/X11R6/bin directory to the /mnt/opt/apache/htdocs/oxylbox/bin directory. Copy the libformat.so.3.87 file from the /mnt/misc/usr/lib directory to the /mnt/opt/apache/htdocs/oxylbox/bin directory.

cp -R /mnt/misc/usr/X11R6/bin/* /mnt/opt/apache/htdocs/oxylbox/bin
cp /mnt/misc/usr/lib/libformat.so.3.87 /mnt/opt/apache/htdocs/oxylbox/bin
cd /mnt/opt/apache/htdocs/oxylbox
mv libformat.so libformat.soOLD
mv libformat.so.3.87 libformat.so

In the above mentioned /mnt/misc/usr/X11R6/bin/ directory are three files, 'nconvert', 'nview', and 'xnview'. Only the nconvert is required, but it doesn't hurt to copy all three files to the /mnt/opt/apache/htdocs/oxylbox/bin directory.

Make a symbolic link for the libformat.so

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

The following commands were 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:nogroup /mnt/opt/apache/htdocs/oxylbox


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

Using your browser, access oxylbox on your Linkstation via LinkstationIPAddress on port 81

http://<LinkstationIPAddress>: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 v36. Update and install all plugins and skins that become visible on setup page after the update to 36.


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