Current time: 11-14-2024, 07:08 AM Hello There, Guest! (LoginRegister)


Post Reply 
Per-domain properties (php version, variables etc)
Author Message
ispcomm Offline
Junior Member
*

Posts: 93
Joined: Apr 2008
Reputation: 3
Post: #1
Per-domain properties (php version, variables etc)
I need to implement per-domain properties for simple things like:
-) php version (4/5)
-) php customizations of php.ini (i.e. global_vars and url fopen base)
-) other fastcgi's (like ruby etc)

I'm looking for advice on what's the best place to put such custimizations (i.e. what table of the database) and whether such type of change is likely to be accepted in the main trunk code (I will not do it if it won't...).

What I have in mind is this:
-) Change some of the php.ini etc templates to accept more variables for the se parameters.
-) Add defaults to database of ispcp.conf (which is better?)
-) Change the daemons if needed (i.e. for creating the appropriate fastcgi stuff).
-) Change the web interface and templates so that the tunables can be tuned via web.

Thanks,
ispcomm

PS: I don't want to start an argument on global_vars and similar because it's not the point (I don't like global_vars, but I need to support sites that use it and that have been around for a decade now and have withstand most global_vars exploiting worms).
(This post was last modified: 06-04-2008 10:22 PM by ispcomm.)
06-04-2008 06:14 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: Per-domain properties (php version, variables etc)
ispcomm, you may exploit the fact that the last declaration of the same key in php.ini is what php will use. Given this, you may:

-) Add a "domain_hosting_props" table (domain_id, scope, key, value) so ie the "register_globals" setting would end up here as (XX, 'php', 'register_globals', 'On').
-) Modify the engine to add all the defined 'php' domain props at the end of the generated php.ini (simply appending them would work)
-) Modify the GUI so admins (maybe resellers) can set up any php configuration key
-) Allow the user to change some keys, like 'display_errors' or 'register_globals' maybe.
06-29-2008 06:12 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)