Intel giveth, and Microsoft taketh away
By Fabio on Monday November 2nd 2009 11:12 | Category: Tutorials
I can't even tell you how much trouble I've went through to get a decent music server like Jinzora (or any for that matter) to work on my Synology CS407e but now that I did I thought I'd share it with you guys.

I'm pretty sure (google) I'm not the only one that had to deal with open_basedir restrictions and headers that got sent halfway round the world and back. Well turns out the solution is 'as always' easier than you'd think. I'll run you through it in a few snack sized steps.
The following steps apply to Jinzora 2.8 Obsidian on a CS407e Synology device although it should work for all Synology NAS servers.
Step 0 - Enable SSH acces on your Synology device
Since your NAS is a remote system you must find a way to control it externally, SSH is a great way to do so, however telnet is also an option we are going to focus on the SSH way of doing this.
Connect to your Synology device and proceed to next step.
Step 1 - Prepare your php.ini to run Jinzora in the first place
As most of you might already be aware of Jinzora requires some additional settings play nice with Apache. On your synology go to /usr/syno/etc/php.ini you can edit this file using the file editor of your choice.
I prefer to use 'nano' but this is not installed by default so you'd probably use VI for editing.
Now find the lines:
max_execution_time (and set to minimal required 300 or higher)
memory_limit (128 or ++)
post_max_size (32 or ++)
upload_max_filesize (32 or ++)
and this is important!
If you'd like to use the music folder that your Synology has created for you so generously it's likely to be in /volume1/music (unless it's not on your first disk of course or manually placed elsewhere).
Find the line:
open_basedir
by default it might look something like this:
open_basedir = /usr/syno/synoman:/etc:/var/run:/tmp:/var/spool/php:/volume1/@tmp/php:/var/services/web:/var/services/photo:/var/services/blog:/var/services/homes:/var/packages/MailStation/target/roundcubemail
If you want to add your music folder to this list and thereby rid yourself of the open_basedir restriction messages do so by adding the path to your music folder as shown below:
open_basedir = /usr/syno/synoman:/etc:/var/run:/tmp:/var/spool/php:/volume1/@tmp/php:/var/services/web:/var/services/photo:/var/services/blog:/var/services/homes:/var/packages/MailStation/target/roundcubemail:/volume1/music
If you've managed to get this right save the file and reboot your NAS.
Step 3 - Almost ready to install
At this point you have rebooted your Synology and you're about ready to install Jinzora. Once you've downloaded your copy of Jinzora 2.8 from the Official Jinzora webpage it's time for the key alteration to make this work on your NAS.
Extract the archive and enter the root directory of the Jinzora package. Here you will find a file called "index.php" open this file using any editor of your choice and find the following lines:
else if (file_exists(dirname(__FILE__)."/../../mainfile.php")) {
AND
else if (file_exists(dirname(__FILE__)."/../../class2.php")) {
These pieces of code are used for blog integration but trust me... you just want Jinzora to be Jinzora cause it rocks!
This is important!
Once located, replace the two lines with these two lines:
} else if (file_exists(dirname(__FILE__)."mainfile.php")) {
AND
} else if (file_exists(dirname(__FILE__)."class2.php")) {
Looks pretty similar right? Well the difference is that these paths are now no longer trying to achieve sub_root access, taking care of the last of the remaining error messages!
Step 4 - Running through the install
All you have to do now is pretty much install Jinzora according to the documentation on the Jinzora support pages. But I'll run you guys through it in just a sec..
Copy the whole Jinzora folder to your 'web' directory and follow this link in your browser of choice (choice is kind of the keyword in this tut is it?).
http://YOUR NAS IP/jinzora2 (unless renamed of course).
Jinzora will tell you that you meet the minimum requirements (thanks to step one) continue with the installation for it kind of leads itself from here. You might just want to install phpMyAdmin as well in case Jinzora fails to create a database (it happens sometimes). To do so simply download a package from the phpMyAdmin website and place this in your 'web' directory and approach it via your browser like this:
http://YOUR NAS IP/phpmyadmin
You'll figure out what to do I guess, if not.. leave complaints in the comments section below!
I hope you enjoy having Jinzora on your Synology just as I do!
It's been more than a month to figure out how to get this done but for you guys it should be a piece of cake now!
You need to login in order to respond