Help with PHP.INI

Questions regaring MySQL and PHP may go here

Moderators: Synology Inc, Honorary Moderator

Forum rules
Please note the disclaimer before modifying your Synology Product.

Help with PHP.INI

Postby Techman » Sun Dec 24, 2006 7:20 pm

I am trying to modify my php.ini file in my diskstation ds106e. Would someone please tell me how to locate this file in my diskstation. I need to increase my memory limit.
Thanks in advance.
I have tried to seach this forum for help but couldn't locate any thread that has info.
1-DS-209+ Machine
1-DS-209 Machine
1-DS-107 Machine
2-Ds207+ Machine
4-DS-106e Machine
I'm Proud of Synology!
No one knows it ALL....Help others to help YOU.
Advertise Your Business in Style - Free Link Exchange
http://www.devenlink.com
http://dbd.devenlink.com - Free bid directory
User avatar
Techman
Experienced
Experienced
 
Posts: 107
Joined: Mon Oct 23, 2006 11:05 pm
Location: USA

Postby HarryPotter » Sun Dec 24, 2006 9:10 pm

/usr/syno/etc

By the way, there is a Linux command to find files:

cd ..
find -name php.ini


Please move this thread to the modding room, thanks
**Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!**

DS408 / DSM 2.3 1157 / 4 x Seagate ST31000340AS RAID 0 / SSODS 4.9 / SqueezeboxServer 7.5.1 / 2 x Squeezebox 3 + Boom / Rapsody N35
DS109+ / DSM 2.3 1157 / Samsung HD154UI
DS207+ / DSM 2.3 1169 / 2 x Hitachi HDS721010KLA330 RAID 0
DS-106x / DSM 2.3 1157 (from DS107) / WDC WD5000KS-00MNB0

FRITZ!Box Fon WLAN 7570 VDSL
APC Smart UPS 750
User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
 
Posts: 5829
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

Postby Techman » Sun Dec 24, 2006 11:14 pm

thnx for the info. Exactly what I wanted. Again, thanks.
1-DS-209+ Machine
1-DS-209 Machine
1-DS-107 Machine
2-Ds207+ Machine
4-DS-106e Machine
I'm Proud of Synology!
No one knows it ALL....Help others to help YOU.
Advertise Your Business in Style - Free Link Exchange
http://www.devenlink.com
http://dbd.devenlink.com - Free bid directory
User avatar
Techman
Experienced
Experienced
 
Posts: 107
Joined: Mon Oct 23, 2006 11:05 pm
Location: USA

ehm... and how connect via ssh?

Postby thurgroup » Wed Dec 27, 2006 9:33 pm

Hi all
i being wondered ... when i try to connect my ds101g+ via ssh ==>
connection refused...

can anybody help me?
tnkx roger
thurgroup
I'm New!
I'm New!
 
Posts: 1
Joined: Wed Dec 27, 2006 9:29 pm

Postby HarryPotter » Thu Dec 28, 2006 12:38 am

ssh and telnet are not enabled by default. Use search function in this forum to find out how to enable it, tanks and happy new year.
**Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!**

DS408 / DSM 2.3 1157 / 4 x Seagate ST31000340AS RAID 0 / SSODS 4.9 / SqueezeboxServer 7.5.1 / 2 x Squeezebox 3 + Boom / Rapsody N35
DS109+ / DSM 2.3 1157 / Samsung HD154UI
DS207+ / DSM 2.3 1169 / 2 x Hitachi HDS721010KLA330 RAID 0
DS-106x / DSM 2.3 1157 (from DS107) / WDC WD5000KS-00MNB0

FRITZ!Box Fon WLAN 7570 VDSL
APC Smart UPS 750
User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
 
Posts: 5829
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

php Safe mode

Postby adamszki » Mon Jan 01, 2007 11:58 pm

According to my php.ini in /usr/syno/etc the safe mode is off but whatever php script tries to use the shell_exec() command gets a result saying that shell_exec() is not available in safe mode. Does somebody have an idea where the error might be?

Thanx.
It's life. Deal with it!

DS106e+Seagate320GB
User avatar
adamszki
Trainee
Trainee
 
Posts: 19
Joined: Thu Oct 26, 2006 1:58 pm
Location: Slovakia

Postby neilio » Sun Jan 07, 2007 8:36 am

Did you ever find an answer for this issue? I'm running into the same problem - php.ini shows safe_mode to be off, but running scripts still error out with safe_mode issues.
neilio
I'm New!
I'm New!
 
Posts: 8
Joined: Wed Nov 01, 2006 8:45 pm

Sad but true, I guess

Postby adamszki » Mon Jan 08, 2007 10:42 am

Sorry, but I did not find an answer to the problem. I am not that good with php or html, so I pretty much gave up and started looking for some other solutions to the problem.
It's life. Deal with it!

DS106e+Seagate320GB
User avatar
adamszki
Trainee
Trainee
 
Posts: 19
Joined: Thu Oct 26, 2006 1:58 pm
Location: Slovakia

Re: php Safe mode

Postby joensson » Mon Jan 22, 2007 10:22 pm

adamszki wrote:According to my php.ini in /usr/syno/etc the safe mode is off but whatever php script tries to use the shell_exec() command gets a result saying that shell_exec() is not available in safe mode. Does somebody have an idea where the error might be?

Thanx.


I have got the exact same problem here. I have the old DS-101 (no letters :)) but the software is upgraded to the latest release for the DS-101 (PHP 5.1.2, MySQL 4.1.15, Apache 1.3.33).

I get this error:
Code: Select all
Warning: shell_exec() [function.shell-exec]: Cannot execute using backquotes in Safe Mode in /volume1/web/util/test.php on line 2


When I open a php page with this code:
Code: Select all
<?php
print `ls -la /volume1/web`;
?>


And yes, I have also checked, checked again and then triple checked that Safe Mode is off. I have even tried adding the full path to the directory containing my script to safe_mode_include_dir and safe_mode_exec_dir but that did not work for me either. I would also be very interested in a solution as this is a feature I use very much - and without it - well then - I do not have much use for Apache, PHP and MySQL in my NAS :(
joensson
I'm New!
I'm New!
 
Posts: 3
Joined: Mon Jan 22, 2007 9:50 pm

Postby glem01 » Fri Jan 26, 2007 10:42 pm

Hi,
this seems to be an important and undocumented issue, that is not usual in standard php. I asked Synology about this same point a few months ago:
Regarding the PHP-functionality, I cannot use the group of shell functions in PHP (popen, shell_exec. and others). I know they are potentially risky, but it makes impossible to use certain applications. How can I reactive or reenable these functions? I have telnet/root access to the DS106, but I couldn't find any settings in php.ini or elsewhere, reagrding this issue.

And they answered me:
About the "PHP" issue, please edit /usr/syno/etc/php.ini and set the safe_mode_exec_dir to other dir.
For example, if you want to exec command in /bin, just set it to /bin.
However, we do not take any response in such operation and the warranty will be invalid.

I did so, and it works fine since then. I just put only the reall yneeded executables into the specified directory as defined by the variable safe_mode_exec_dir in php.ini.

Hope this helps you too.

Manuel
glem01
Rookie
Rookie
 
Posts: 33
Joined: Tue Oct 24, 2006 2:46 pm

Postby lookatbowen » Sun Jan 28, 2007 9:09 pm

Here is the "how to enable SSH/Telnet" on your diskstation.

http://oinkzwurgl.org/dl.php?file=syno-telnet-r3.zip
User avatar
lookatbowen
Beginner
Beginner
 
Posts: 20
Joined: Mon Nov 06, 2006 10:00 pm
Location: Greenhithe

Postby vangrieg » Sun Feb 18, 2007 3:10 pm

Has anyone been able to solve this issue on DS-101?
vangrieg
Beginner
Beginner
 
Posts: 21
Joined: Mon Jan 22, 2007 8:54 pm

Postby 4eyes » Sat Feb 24, 2007 5:37 am

lookatbowen wrote:Here is the "how to enable SSH/Telnet" on your diskstation.

http://oinkzwurgl.org/dl.php?file=syno-telnet-r3.zip


Does it work in latest firmware version 428?
4eyes
Novice
Novice
 
Posts: 42
Joined: Fri Jan 19, 2007 5:44 pm

Postby HarryPotter » Sat Feb 24, 2007 11:12 am

Does it work in latest firmware version 428?

Yes, it does
**Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!**

DS408 / DSM 2.3 1157 / 4 x Seagate ST31000340AS RAID 0 / SSODS 4.9 / SqueezeboxServer 7.5.1 / 2 x Squeezebox 3 + Boom / Rapsody N35
DS109+ / DSM 2.3 1157 / Samsung HD154UI
DS207+ / DSM 2.3 1169 / 2 x Hitachi HDS721010KLA330 RAID 0
DS-106x / DSM 2.3 1157 (from DS107) / WDC WD5000KS-00MNB0

FRITZ!Box Fon WLAN 7570 VDSL
APC Smart UPS 750
User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
 
Posts: 5829
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

Postby Bergling » Fri Mar 16, 2007 1:31 pm

glem01 wrote:Hi,
this seems to be an important and undocumented issue, that is not usual in standard php. I asked Synology about this same point a few months ago:
Regarding the PHP-functionality, I cannot use the group of shell functions in PHP (popen, shell_exec. and others). I know they are potentially risky, but it makes impossible to use certain applications. How can I reactive or reenable these functions? I have telnet/root access to the DS106, but I couldn't find any settings in php.ini or elsewhere, reagrding this issue.

And they answered me:
About the "PHP" issue, please edit /usr/syno/etc/php.ini and set the safe_mode_exec_dir to other dir.
For example, if you want to exec command in /bin, just set it to /bin.
However, we do not take any response in such operation and the warranty will be invalid.

I did so, and it works fine since then. I just put only the reall yneeded executables into the specified directory as defined by the variable safe_mode_exec_dir in php.ini.

Hope this helps you too.

Manuel


I am not that experienced with Linux, although I maintain an application running under Unix at work, so I know the basics. I'm just wondering how one would do as it is stated above.

Can you just copy the relevant needed binaries to another directory and point safe_mode_exec_dir to that directory?
Bergling
I'm New!
I'm New!
 
Posts: 3
Joined: Wed Mar 07, 2007 11:22 am

Next

Return to MySQL/PHP Mods

Who is online

Users browsing this forum: No registered users and 1 guest