open_basedir restriction even though dir is in the list?!

Questions regaring MySQL and PHP may go here
Forum rules
Please note the disclaimer before modifying your Synology Product.

open_basedir restriction even though dir is in the list?!

Postby cread » Mon Mar 05, 2012 3:41 am

I have been developing a php/sql web app to control my thermostat. I would like to place the common files/classes in an separate include path so I can separate my web scripts and cron scripts. I have added the include_path directive to php.ini (including adding the default one that was added elsewhere). I found that the open_basedir restriction was also in effect for included files, so in the DS GUI I added this new include dir to the open_basedir list.
info.php shows the following:
Code: Select all
include_path   .:/volume1/homes/me/php_include:/usr/syno/php/lib/php   .:/volume1/homes/me/php_include:/usr/syno/php/lib/php

and
Code: Select all
open_basedir   /volume1/homes/me/php_include:/etc.defaults:/usr/bin/php:/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

Yet I get the following error
Code: Select all
Warning: require_once(): open_basedir restriction in effect. File(/volume1/homes/me/php_include/tstat_configuration.php) is not within the allowed path(s): (/volume1/homes/me/php_include:/etc.defaults:/usr/bin/php:/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) in /volume1/web/tstat/tstat_common.php on line 16 Warning: require_once(/volume1/homes/me/php_include/tstat_configuration.php): failed to open stream: Operation not permitted in /volume1/web/tstat/tstat_common.php on line 16 Fatal error: require_once(): Failed opening required 'tstat_configuration.php' (include_path='.:/volume1/homes/me/php_include:/usr/syno/php/lib/php') in /volume1/web/tstat/tstat_common.php on line 16

If you notice the error states that the path of the file is indeed in the "allowed path(s)"
I restarted PHP and apache, I also have rebooted the server. I also searched here, but there were no similar problems and some seem to have this working. Could this be a new issue with 4.0b? Is there more to mod than open_basedir and include_path?

Thanks
- Chip
DS211 5.1-5004, 2x samsung HD204UI 2T, USB backup of DS
PC= Win7, I7-860 Trubo@3.5G, 8G, and 5T HD's installed
User avatar
cread
Versed
Versed
 
Posts: 217
Joined: Sat Jan 08, 2011 5:56 am

Re: open_basedir restriction even though dir is in the list?

Postby cread » Fri Mar 16, 2012 3:19 am

Update:
It is working now. I moved to a mapped drive rather than a user's home directory. No idea why it made a difference. All of the unix properties are the same. :?: (Owner, group, RWX...) :?:
- Chip
DS211 5.1-5004, 2x samsung HD204UI 2T, USB backup of DS
PC= Win7, I7-860 Trubo@3.5G, 8G, and 5T HD's installed
User avatar
cread
Versed
Versed
 
Posts: 217
Joined: Sat Jan 08, 2011 5:56 am

Re: open_basedir restriction even though dir is in the list?

Postby Eduardo » Mon Nov 12, 2012 9:49 pm

Hi,

The same here. DSM 4.1. Open_basedir without results when including a /volume1/homes/...
I can't understand why.
Eduardo
Novice
Novice
 
Posts: 46
Joined: Wed Nov 07, 2012 3:20 pm
Location: Spain


Return to MySQL/PHP Mods

Who is online

Users browsing this forum: No registered users and 0 guests