Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th January 2007, 23:27
Pasco Pasco is offline
Member
 
Join Date: Aug 2005
Location: Switzerland
Posts: 96
Thanks: 13
Thanked 0 Times in 0 Posts
Default individual per vhost PHP settings

Hi there

Well, you can choose some php options per vhost by the ISPConfig Panel, like PHPSafe mode.

Now I should have the following php "special settings" on a vhost:

register_globals ON
implicit_flush ON
auto_detect_line_endings ON
magic_quotes_gpc ON
ignore_user_abort ON
register_long_arrays ON
allow_url_fopen ON

Is it possible to set these settings only to one of my vhosts? I know how I could do it with the php.ini, but that's global...

Thx for your advice in advance,
so long,
p@sco
Reply With Quote
Sponsored Links
  #2  
Old 8th January 2007, 23:48
Pasco Pasco is offline
Member
 
Join Date: Aug 2005
Location: Switzerland
Posts: 96
Thanks: 13
Thanked 0 Times in 0 Posts
Default Solution

Thx, this forum is great. I found the solution on myself.

I just put the follow apache directives to the "apache directives"-Section of my ISPConfig Site:

php_admin_flag register_globals on
php_admin_flag register_long_arrays on
php_admin_flag implicit_flush on
php_admin_flag auto_detect_line_endings on
php_admin_flag magic_quotes_gpc on
php_admin_flag ignore_user_abort on
php_admin_flag allow_url_fopen on

Now my site works perfectly :-).

Thanks,
p@sco
Reply With Quote
  #3  
Old 9th January 2007, 10:20
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

You can also always add site specific options in a .htaccess file in your webroot. But your solution is just as good.
Reply With Quote
  #4  
Old 9th January 2007, 20:01
vogelor vogelor is offline
ISPConfig Developer
 
Join Date: Jan 2007
Location: Wernau, Germany
Posts: 219
Thanks: 42
Thanked 34 Times in 24 Posts
Default

Quote:
Originally Posted by martinfst
You can also always add site specific options in a .htaccess file in your webroot. But your solution is just as good.
HMM, does this mean, EVERY Customer can create such a file for itself and so change the settings i made for this special side???
__________________
Der neue Luxus heißt Zeit, nicht Geld!

Firma : http://www.muv.com, http://www.computerandservice.de
Privat : http://www.vogelor.de
Reply With Quote
  #5  
Old 9th January 2007, 20:07
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

Quote:
Originally Posted by vogelor
HMM, does this mean, EVERY Customer can create such a file for itself and so change the settings i made for this special side???
No, because its forbidden to set PHP settings in .htaccess files in every ISPConfig installation by default. The best way is to do it in the apache directives field to not open up security holes.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 9th January 2007, 20:07
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

If they have access to that site directory by means of ftp or ssh, yes they can make a .htaccess file. The apache AllowOveride directive may limit what can be changed, but I have not tested php* variables. It's probably easy for you to test? E.g.
Code:
set php_admin_flag register_globals off
and your test site will probably fail immediately. .htaccess files are read/processed after the main Apache configuration file.
Reply With Quote
  #7  
Old 9th January 2007, 20:09
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

Quote:
Originally Posted by till
No, because its forbidden to set PHP settings in .htaccess files in every ISPConfig installation by default. The best way is to do it in the apache directives field to not open up security holes.
But .htaccess can still be used to do other things like RewriteRule's. Or if someone messed enough with the default config files .....
Reply With Quote
  #8  
Old 9th January 2007, 20:14
vogelor vogelor is offline
ISPConfig Developer
 
Join Date: Jan 2007
Location: Wernau, Germany
Posts: 219
Thanks: 42
Thanked 34 Times in 24 Posts
Default

Quote:
Originally Posted by Pasco
I just put the follow apache directives to the "apache directives"-Section of my ISPConfig Site:

php_admin_flag register_globals on
php_admin_flag register_long_arrays on
php_admin_flag implicit_flush on
php_admin_flag auto_detect_line_endings on
php_admin_flag magic_quotes_gpc on
php_admin_flag ignore_user_abort on
php_admin_flag allow_url_fopen on
@Till
Maybe this is a nice feature for v3 (to have a gui to configure this per web and ISPConfig writes the directives itself)
__________________
Der neue Luxus heißt Zeit, nicht Geld!

Firma : http://www.muv.com, http://www.computerandservice.de
Privat : http://www.vogelor.de
Reply With Quote
  #9  
Old 10th January 2007, 00:20
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

Quote:
Originally Posted by martinfst
But .htaccess can still be used to do other things like RewriteRule's. Or if someone messed enough with the default config files .....
Sure. For rewrite rules the .htaccess file is my first choice I just want to say that one must be careful with allowing too much things in .htaccess files if you dont want that your users will take over your server.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 10th January 2007, 00:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
 
Default

Quote:
Originally Posted by vogelor
@Till
Maybe this is a nice feature for v3 (to have a gui to configure this per web and ISPConfig writes the directives itself)
Yes. But there are really many directives and we must be careful that we dont offer too much choices so the user dont gets confused. The current ISPConfig version sets already several variables per user when you enable the apache directives checkbox.

The drawback of these variables is, they wont work with SuPHP or PHP as CGI with SuEXEC. For SuPHP we will have to provide a separate PHP.ini file for every website if we want to have individual PHP settings.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
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
Freebsd 6.1 support misterm Installation/Configuration 10 9th April 2009 10:29
Slightly Confused (DNS & Server Help) JohnnyBGoode Installation/Configuration 26 14th August 2007 10:54
ubuntu ispconfig joomla .htaccess steve1084 General 8 6th January 2007 16:55
VirtualHosts marra87 General 9 12th September 2006 05:09
Downgrade php5 to php4.4.2 llizards Installation/Configuration 4 14th March 2006 00:58


All times are GMT +2. The time now is 04:21.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.