Reply to PHP5 as a CGI: how to set OPEN_BASEDIR per user using PHP.INI

Your name:

Reply:


Posted by janvdberg on 02/26/07 16:13

Hi,

up until now I have used PHP4 as an Apache module which works lovely.
I used to have the following line per VHost for a userdir:
php_admin_value open_basedir /var/www/user/

This allowed users to only browse/open their own dir. Also I had a
couple of open_basedir entries in my global php.ini file like /tmp for
instance. So users could both open /tmp and /var/www/user?

Now I have switched to PHP5 as a CGI and I can't use the
"php_admin_value" settings anymore since running PHP as a CGI works
differently.
This however causes a problem for me: how do I set the specific
open_basedir per user?

I can't put the entries in the global php.ini because _all_ users will
be able to use this. So what I'd need is a way to use
a.) either a specific php.ini file per user. But how does this work:
I've tried putting a php.ini in the DocumentRoot -> no effect.
b.) Rewrite the php.ini on the fly somehow, to add the userdir to the
list op open_basedir values when the PHP CGI is invoked.
c.) You tell me...

Any good pointers would be appreciated.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация