spacer
spacer search

SwissCenter

Search
spacer
Main Menu
Home
Documentation + FAQ
Screenshots
Downloads
Forums
Bug Tracking
History
Login
Username

Password

Remember me
?
No account yet?

Locations of visitors to this page

 
Home arrow Forums

SwissCenter Forums  


SwissCenter on Synology DS107+ - 2007/12/26 09:15 Hi all,

First of all Merry Christmas to everyone.

I’ve installed the SwissCenter on the Synology DS107+, but I’m encountering two problems:

[1] there is no sound and no PLAY NOW screen
[2] there is no internet connectivity

All menus of the SwissCenter are there except for the internet related pages. However, when trying to play a file, you can see the progress bar, but the screen remains black and there’s no sound. The same occurs when playing the songs with WinAmp.

I already tried the alterations mentioned in an earlier thread, but without success. Moreover, I compared the PHP.info in the same thread with mine (included), but I don’t see much differences and where there are I’m not sure what it means.

Who can help me out?

regards, Klaas


File Attachment:
File name: logfile.txt
File size:21202 bytes


-------------------
SwissCenter 1.40
Apache 2 / PHP 5.2.0
Linux Synology 2.6.15
Synology DS107+ (128)
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/26 09:35 This is the bit of the logfile that looks wrong to me on a first glance:

Code:

 [2007.12.26 14:49:42File details from "ls -l /volume1/photo/Muziek/Aerosmith/Aerosmith - Come Together.mp3" command [2007.12.26 14:49:42] Array [2007.12.26 14:49:42] ( [2007.12.26 14:49:42]     [0] =>  [2007.12.26 14:49:42] )


It looks like Swisscenter is unable to determine the filesize of your audio file - which is done via a call to the large_filesize() function in base\file.php.

In linux/unix environments, the function uses the PHP exec() call to determine the filesize using the "ls" command because PHP is often unable to handle files larger than 2Gb (depending on how it was compiled).

The log message is indicating that the "ls" command isn't returning any information, hence the code thinks the file is 0 bytes in size, and the file isn't being streamed corrently.

You could test this whole theory out by replacing the large_filesize() function (in base/file.php) as follows:

Code:

 function large_filesize$fsp ) {   return filesize($fsp); }


NOTE: this is not a fix - this will just determine that the problem is the exec("ls -l") call failing. You'll need to determine *why* that is the case on your system (permissions? or maybe the php.ini on your system is set to block system calls such as exec(), system(), etc).

Rob
Server : Windows Home Server (HP MediaSmart EX470)
Player #1: Pinnacle Showcenter 200 (wired ethernet)
Player #2: Popcorn Hour A110 (wired ethernet)


  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/26 10:03 Hi Rob,

Thanks for your swift reply. Indeed after changing the “large_filesize () function, there is sound when playing the files, but still no PLAY NOW screen. Also no internet connectivity; could this be interrelated with each other?

I’ll digging in the system to find out where the problem might be.

regards, Klaas



File Attachment:
File name: df2fd009fe1791ca99723858879d07b4.
File size:484214 bytes


-------------------
SwissCenter 1.40
Apache 2 / PHP 5.2.0
Linux Synology 2.6.15
Synology DS107+ (128)
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/26 10:25 As a guess:

1. No now playing screen is probably related to (lack of) GD support and/or fonts from within PHP.

2. No internet connectivity could be:
a) Network connectivity (the synology really can't access the internet)
b) Security (is there any kind of firewall running on the synology?)
c) Apache/PHP configuration preventing internet access for security reasons
d) A bug in Swisscenter. Highly unlikely of course...

Rob
Server : Windows Home Server (HP MediaSmart EX470)
Player #1: Pinnacle Showcenter 200 (wired ethernet)
Player #2: Popcorn Hour A110 (wired ethernet)


  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/26 10:26 I am glad with the reply from Rob. I have a similar problem for a long, long time with Swisscenter on my Synology Diskstation 106. Possibly we can identify the problem by now.

The help file in my Diskstion says the following (see the text in italics written below) about to enable a webserver on a Diskstation: system() and exec() are not supporterd. Is there a sollution for us so we can use Swisscenter on a Diskstation?

"Enable Web Station

Web Station is a function of personal web pages on Disk Station. Disk Station provides the default share folder, "web" for Web Station. You can store web page files in this shared space to build your own web site immediately.

When applications require that option register_globals to be turned on, check the Turn on PHP configuration option register_globals option. However, it is recommended that it is turned off for security reasons.

Support and limitations:

1. Support HTML format.
2. Support PHP 5.2.0.
3. The functions are not supported for PHP: system(), exec().
4. When you use the PHP mail() function, the system will automatically retrieve and use the SMTP server information on Mail page. Make sure you have entered correct SMTP server information.
5. The real path of the shared folder web is /volume1/web. Some applications require user to set the path in the configuration file.
6. The names "photo", "photosrc", and "webdefault" are reserved folder names. Because these names can not be used by Web Station, please do not create folders with these names under the web shared folder.
7. You can customize the error page by creating a .html file, a .htm file, or a .php file yourself. Please enable Web Station. Name the file "missing", and place it under the "web" shared folder on server. When users link to a page which does not exist, they will view this customized error page.
SwissCenter 1.22 without SVN-updates
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS106 (64MB ), firmware: DSM 2.0-0731
Pinnacle SC1000g
  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/26 10:32 Hoorna,

Could you find the php.ini file on the synology and post it here please? I suspect that it may be a config setting that prevents the use of system() and exec().

Rob
Server : Windows Home Server (HP MediaSmart EX470)
Player #1: Pinnacle Showcenter 200 (wired ethernet)
Player #2: Popcorn Hour A110 (wired ethernet)


  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/26 11:02 Here is the file you requested.


I think this is not so simple. On the Synology-forum a have read that the php.ini file is overwritten each time the Diskstation boots.
SwissCenter 1.22 without SVN-updates
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS106 (64MB ), firmware: DSM 2.0-0731
Pinnacle SC1000g
  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/26 11:09 I am sorry. I do not get a file attached. So here is the content of php.ini:

Code:

 ; ; Safe Mode ; safe_mode Off By default, Safe Mode does a UID compare check when opening files. If you want to relax this to a GID compare, ; then turn on safe_mode_gid. safe_mode_gid Off When safe_mode is onUID/GID checks are bypassed when including files from this directory and its subdirectories. ; (directory must also be in include_path or full path must be used when including) safe_mode_include_dir = ; When safe_mode is ononly executables located in the safe_mode_exec_dir will be allowed to be executed via the exec family of functions. safe_mode_exec_dir = /usr/syno/bin Setting certain environment variables may be a potential security breach. ; This directive contains a comma-delimited list of prefixes.  In Safe Mode, ; the user may only alter environment variables whose names begin with the prefixes supplied here.  By default, users will only be able to set environment variables that begin with PHP_ (e.gPHP_FOO=BAR). ; ; Note:  If this directive is empty, PHP will let the user modify ANY environment variable! safe_mode_allowed_env_vars PHP_ This directive contains a comma-delimited list of environment variables that the end user wont be able to change using putenv().  These variables will be ; protected even if safe_mode_allowed_env_vars is set to allow to change them. safe_mode_protected_env_vars LD_LIBRARY_PATH open_basedir, if setlimits all file operations to the defined directory ; and below.  This directive makes most sense if used in a per-directory ; or per-virtualhost web server configuration fileThis directive is ; *NOTaffected by whether Safe Mode is turned On or Off. open_basedir = /volume1/web:/volume2/web:/volume3/web:/volume4/web:/volume1/photo:/volume2/photo:/volume3/photo:/volume4/photo:/usr/syno/synoman/phpsrc:/etc:/var/run:/tmp:/var/spool/php:/volume1/@tmp/php:/var/services/web:/var/services/photo This directive allows you to disable certain functions for security reasons. ; It receives a comma-delimited list of function namesThis directive is ; *NOTaffected by whether Safe Mode is turned On or Off. disable_functions = ; This directive allows you to disable certain classes for security reasons. ; It receives a comma-delimited list of class namesThis directive is ; *NOTaffected by whether Safe Mode is turned On or Off. disable_classes =


[EDIT: Part of the PHP.ini file has been removed to make the thread more readable - Admin]
SwissCenter 1.22 without SVN-updates
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS106 (64MB ), firmware: DSM 2.0-0731
Pinnacle SC1000g
  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/26 11:47 Damn, I was hoping we'd be able to change the php.ini file to enable the exec() call, but unfortunately not.

I was expecting to see that either safe_mode had been turned on, or that the disable_functions option had been set - but as can be seen from the ini file this is not the case

Rob
Server : Windows Home Server (HP MediaSmart EX470)
Player #1: Pinnacle Showcenter 200 (wired ethernet)
Player #2: Popcorn Hour A110 (wired ethernet)


  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/26 12:42 Coming back to the PLAY NOW issue. GD support is enabled (see attachment). As all SC screens work well, I suppose there should no problem with the fonts (or am I wrong)?

What can I do to make it work, regards, Klaas


File Attachment:
File name: phpinfo.txt
File size:19359 bytes


-------------------
SwissCenter 1.40
Apache 2 / PHP 5.1.2
Linux Synology 2.6.15
Synology DS107+ (128)
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/26 13:42 @Rob,
What should we do now?

@Klaasvaak
You have sound now when playing a track. What did you do?
SwissCenter 1.22 without SVN-updates
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS106 (64MB ), firmware: DSM 2.0-0731
Pinnacle SC1000g
  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/26 14:14 Hi Hoorna,

I changed the code of the "large_filesize"-function in "base/file.php according Rob's suggestion above into:

Code:

function large_filesize( $fsp )
{
return filesize($fsp);
}


regards, Klaas

-------------------
SwissCenter 1.40
Apache 2 / PHP 5.1.2
Linux Synology 2.6.15
Synology DS107+ (128)
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/26 14:14 Hi Hoorna & Rob,

I'm not sure, but this thread might bring us a bit further. I'll try tomorrow and let you know the results.

regards, Klaas

-------------------
SwissCenter 1.40
Apache 2 / PHP 5.2.0
Linux Synology 2.6.15
Synology DS107+ (128)
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/27 11:14 I tried the suggestion in the earlier thread to alter "safe_mode_exec_dir" from

/usr/syno/bin/

into

/volume1/

in order to try to enable the PHP functions {like system() and exec()} on the entire drive (see attache php.ini row 17) However, no luck. The only result was that the mediaservers were not accessible anymore, so I had to put it back. Limiting the "safe_mode_exec_dir" to /volume1/photo/swisscenter" (the folder in which Swisscenter is installed) had no effect at all.

I sure I'm doing something wrong here, but I cannot figure out what it is (my knowledge re PHP is highly limited).

So, what can I try now? regards, Klaas


File Attachment:
File name: phpini.txt
File size:4362 bytes


-------------------
SwissCenter 1.40
Apache 2 / PHP 5.2.0
Linux Synology 2.6.15
Synology DS107+ (128)
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/27 11:44 My interpretation of the thread you quoted is that /usr/syno/bin/ is the directory that the synology is searching when PHP tries to run standard unix commands using the exec() system call.

You need to change safe_mode_exec_dir to be the directory that contains the standard unix commands, such as ls. Now, as I don't have a synology I'm only guessing here... but I would suspect that you'd need to set it something like /bin

Code:

 safe_mode_exec_dir=/bin



alternatively, you could create symbolic links for the commands that SwissCenter uses in the /usr/syno/bin/ directory and leave the PHP.ini file as it is:

As the root user:
Code:

  ln -/bin/ls /usr/syno/bin/ls



Rob
Server : Windows Home Server (HP MediaSmart EX470)
Player #1: Pinnacle Showcenter 200 (wired ethernet)
Player #2: Popcorn Hour A110 (wired ethernet)


  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/27 15:43 Thanks Rob,

I changed in the code into “safe_mode_exec_dir=/bin” and put back the original large_filesize() function in base\file.php. This works fine as with the change of the “safe_mode_exec_dir”-command I do have sound with the original file.php. So far so good.

Problems that have not been solved yet are:

[1] no PLAY NOW screen
[2] no internet connectivity
[3] not able to play video files (see attached log-file)
[4] not able to view image files

Re [2] it's probably a problem with forwarding some specific ports (no problem with that) Regarding the other problems I don’t know how to solve them.

Any ideas?

Regards, Klaas


File Attachment:
File name: log.txt
File size:98974 bytes


-------------------
SwissCenter 1.40
Apache 2 / PHP 5.2.0
Linux Synology 2.6.15
Synology DS107+ (128)
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/27 17:59 @Klaasvaak en Rob,

Thank you very much. This sounds great. I am going to try this "safe_mode" solution this weekend.

About your problems:
1. No PLAY NOW screen. I have never seens that on my Diskstation. I think it has to do with missing fonts but I am not sure.

2. At my earlier attempds to install Swisscenter on my Diskstation I remember that the internetconnetction was working. So I will inform you of my experiences this weekend. On this moment I think it has nothing to do with specific ports.

3.Play videos. I never see that working

4. This is also the case with images. Does Swisscenter resize images and if it does, is it using an special program for that? Probably this program is written for x86 processors and not for ppc-processors (as my Diskstation has).
SwissCenter 1.22 without SVN-updates
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS106 (64MB ), firmware: DSM 2.0-0731
Pinnacle SC1000g
  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2007/12/31 11:41 Hi,

Part of the problems may be caused by incorrect permissions (see here and here).

From the same sources I understand that the permissions can be changed by:

find /opt/share/www/swisscenter -type f -print0 | xargs -0 chmod 644
find /opt/share/www/swisscenter -type d -print0 | xargs -0 chmod 755
chown -R nobody /opt/share/www/swisscenter
chown nobody /opt/share/www/swisscenter


However, after telnetting the DS107 I got this result:

Synology> find /volume1/web/svr/swisscenter -type f -print0 | xargs -0 chmod 644
BusyBox v1.1.0 (2007.11.01-13:20+0000) multi-call binary

Usage: find [PATH...] [EXPRESSION]

xargs: invalid option -- 0
BusyBox v1.1.0 (2007.11.01-13:20+0000) multi-call binary

Usage: xargs [COMMAND] [OPTIONS] [ARGS...]


What's going wrong and how to address this?

Happy New Year & regards, Klaas

------------------
SwissCenter 1.40
Apache 2 / PHP 5.2.0
Linux Synology 2.6.15
Synology DS107+ (128)
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: SwissCenter on Synology DS107+ - 2008/01/01 08:00 Hi Klaas,

First your last question. On the Diskstation you have to set the permissions for the Swisscenter-files as follows.

Telnet to the Diskstation as user: root (with the admin password). Go to the subdirectory /volume1/web (with the command: cd /volume1/web); I assume that you put the subdirectory for Swisscenter here and that you called it swisscenter.

Then give the following two commands:
chown -R admin:users swisscenter
chmod -R 777 swisscenter
I hope that this will helps you out. By the way i hope you didn't forget to enable MySQL on the Diskstation.

Now, i have a question for you. I am trying to install Swisscenter on my Diskstation again on a fresh Diskstation install with firmware 518.

I can get the config-screen from Swisscenter by now but when i click on Systemtest (Systeemtesten in Dutch) the screen remains empty. What did I forgot to do or what am I doing wrong?

At last I want to ask you if you like to mail each other. This works quicker. I you likes this proposition then we should our emailadresses. I looking out for your answer.

greetings,
SwissCenter 1.22 without SVN-updates
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS106 (64MB ), firmware: DSM 2.0-0731
Pinnacle SC1000g
  | | The administrator has disabled public write access.
spacer
 

Screenshots

www.flickr.com
This is a Flickr badge showing public photos from swisscenter. Make your own badge here.


 

Mambo is Free Software released under the GNU/GPL License.
spacer