#1  
Old 25th April 2006, 16:23
oliver.blaha oliver.blaha is offline
Member
 
Join Date: Apr 2006
Posts: 37
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via ICQ to oliver.blaha Send a message via Skype™ to oliver.blaha
Default PHP handling

Hi,

I'm not completely happy about how PHP is enabled/disabled in Vhosts.
IMHO completely disabling PHP for the whole server and only activating it in the vhost statements isn't the best practice.

I've enhanced the apache2_php parameters in config.inc.php with "engine". If you specify this option, an "php_admin_flag on" or "php_admin_flag off" is included in the vhost. This way it is possible to let PHP be activated for the server, without enabling it for every vhost.

From now on you can either use the old format:

Code:
$go_info["server"]["apache2_php"] = 'both';
Or you can pass an array of valid options:

Code:
$go_info["server"]["apache2_php"] = array("filter", "engine");
It should be completely backward compatible.

If you like this way of handling PHP, I'd suggest to:

1) Change the default value to:
Code:
$go_info["server"]["apache2_php"] = array("filter", "addtype", "engine");
2) Remove the commenting of the php AddType clauses in httpd.conf.

This would decrease the amount of configuration when setting up a new server, as you can leave the mime types and the php AddTypes untouched.
Reply With Quote
  #2  
Old 25th April 2006, 22:39
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 19,805
Thanks: 285
Thanked 1,805 Times in 1,357 Posts
Default

Hi Oliver,

looks fine and sounds reasonable.

I'am not sure which notation we shall use in the config.inc.php file, as this file will be edited by poeple not familar with PHP and the PHP array syntax.

Option 1) as you suggested:

Quote:
$go_info["server"]["apache2_php"] = array("filter", "addtype", "engine");
Or option 2)

Quote:
$go_info["server"]["apache2_php"] = "filter,addtype,engine";
What do you think?
__________________
Till Brehm
--
http://www.projektfarm.com/en/
Reply With Quote
  #3  
Old 26th April 2006, 00:48
oliver.blaha oliver.blaha is offline
Member
 
Join Date: Apr 2006
Posts: 37
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via ICQ to oliver.blaha Send a message via Skype™ to oliver.blaha
Default

Hm, I suggest we simply support both *g*

Currently I'm checking if it is an array, and if it's not, I assign it as the only element of a new array.

If we simply replace this assignment by an explode(",", ...) we'd magically support single options, strings with comma seperated options AND arrays.
Reply With Quote
  #4  
Old 26th April 2006, 01:13
oliver.blaha oliver.blaha is offline
Member
 
Join Date: Apr 2006
Posts: 37
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via ICQ to oliver.blaha Send a message via Skype™ to oliver.blaha
Default

Update: As it was a quite trivial change, I simply checked it in with explode. Hope you like it. I changed this for the MySQL priviledges which are changed by the MySQL Quota script, too.
Reply With Quote
  #5  
Old 26th April 2006, 10:19
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 19,805
Thanks: 285
Thanked 1,805 Times in 1,357 Posts
Default

Fine, thanks. It might be easier for the users if they might use comma separated values
__________________
Till Brehm
--
http://www.projektfarm.com/en/
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"unknown filter" growing apache log. wwparrish Installation/Configuration 6 1st September 2006 19:40
Questions in regards to ISP-Server Setup - Ubuntu 5.10 "Breezy Badger" rbrantley HOWTO-Related Questions 16 10th April 2006 19:26
Downgrade php5 to php4.4.2 llizards Installation/Configuration 4 14th March 2006 00:58
all my site go to /var/www/ Absolusteph Installation/Configuration 14 11th March 2006 22:27
Can not access website after uploading brianetilley Installation/Configuration 21 11th January 2006 20:43


All times are GMT +2. The time now is 06:44.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Sponsored Links: Unified Communications: Thoughts, Strategies and Predictions
Join the discussion.
www.seamlessenterprise.com

IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com

Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com

Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com

Red Hat Virtual Experience - a free virtual event. Dec. 9th