Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 2nd December 2007, 13:52
mbria mbria is offline
Junior Member
 
Join Date: Jul 2007
Posts: 17
Thanks: 12
Thanked 2 Times in 2 Posts
Default Ignored phpvalues at .htaccess, ISPconfig or PHP

Hi all,

One of my new sites requires some special tunning of php_values, but never mind where I set them, it didn't work.

My server is:
- ubuntu 7.04 (following perfect setup)
- suPHP (following suPHP howto)
- ISPconfig 2.2.16

My goal is setting those variables as follows, just in one site:

* post_max_size=100M
* upload_max_filesize=100M
* max_execution_time=1000
* max_input_time=1000

I tried at ISPconfig setting "Apache Directives" to:

PHP Code:
...
<
Directory /var/www/web3/web>  
Options +Includes +FollowSymlinks -Indexes  
AllowOverride All  
Order allow
,deny  
Allow from all
php_value post_max_size 500
<Files "^\.ht">  
Deny from all  
</Files>  
</
Directory>
... 
And also at it's own .htaccess with multiple variants:

PHP Code:
#php_value post_max_size "100M"
#php_value upload_max_filesize "100M"
#php_value max_execution_time "1000"
#php_value max_input_time "1000"
<IfModule mod_php5.c>
php_flag post_max_size 50
php_value post_max_size 50
</IfModule
Finally I tried directly at the CMS (it's a Drupal) config file... where other variables are set:

PHP Code:
ini_set('post_max_size',            '100M');
ini_set('upload_max_filesize',     '100M');
ini_set('max_execution_time',    '1000');
ini_set('max_input_time',           '1000'); 
As said, non of those solutions work.

Any clue about how to fix this?

Thanks a lot for your self,

m.
Reply With Quote
Sponsored Links
  #2  
Old 2nd December 2007, 22:31
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

You can not set php:admin or php_flag values with SuPHP. This is nothing ISPConfig specific, suphp uses php as cgi internally and you can never set these values for a cgi php.

If you want to set custom values, you will have to make a custom php.ini file and set this in the apache directives (see suphp documentation for details).
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
mbria (3rd December 2007)
  #3  
Old 3rd December 2007, 01:19
mbria mbria is offline
Junior Member
 
Join Date: Jul 2007
Posts: 17
Thanks: 12
Thanked 2 Times in 2 Posts
Default suPHP Custom php.ini

Thanks a lot till for the indications.

If I understand you (and some other posts in this forum about similar issues), if I like different php.inis for each site I just need to change my "ISPconfig Apache Directives" requesting it.

If I catch it, it means:

PHP Code:
<Directory /var/www/web3/web>  
Options +Includes +FollowSymlinks -Indexes  
AllowOverride All  
Order allow
,deny  
Allow from all
php_value post_max_size 500
<Files "^\.ht">  
Deny from all  
</Files>  
</
Directory>
suPHP_ConfigPath /var/www/web3/etc/php.ini 
And after this:

1) cp /etc/php5/cgi/php.ini /var/www/web3/etc/php.ini
2) vim /var/www/web3/etc/php.ini (to include my specific changes)
3) /etc/init.d/apache2 restart

But unfortunately, a phpinfo I run on this site still shows default settings.

Did I miss something?

Sorry in advance for the newbie questions. :-(

Thanks again for your help,

m.
Reply With Quote
  #4  
Old 3rd December 2007, 02:00
mbria mbria is offline
Junior Member
 
Join Date: Jul 2007
Posts: 17
Thanks: 12
Thanked 2 Times in 2 Posts
Smile

Funny... don't ask me why, but now it's perfectly working.

I commented some redirection "Apache Directives" and the magic flows:

PHP Code:
suPHP_ConfigPath /var/www/web3/etc/php.ini

RewriteEngine on
# RewriteCond %{HTTP_HOST}   ^test.mysite.org [NC]
# RewriteRule   ^/(.*)$ /test/$1  [L]
# Rewrite flv files to actual file.
# RewriteCond %{REQUEST_URI}    ^.*flv$
# RewriteRule ^(.*)system\/(.*)$        $1$2 [L]

<Directory /var/www/web3/web>  
  
Options +Includes +FollowSymlinks -Indexes  
  AllowOverride All  
  Order allow
,deny  
  Allow from all
  
<Files "^\.ht">  
    
Deny from all  
  
</Files>  
</
Directory>

<
Directory /var/www/web3/*/files>  
  SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
  Options None
  Options +FollowSymLinks
</Directory> 
Thanks a lot for your help. You can imagine how much happy am I now. ;-)

Cheers,

m.
Reply With Quote
  #5  
Old 19th March 2009, 10:59
paxpacis paxpacis is offline
Member
 
Join Date: Jan 2009
Posts: 31
Thanks: 11
Thanked 0 Times in 0 Posts
Question

I know this post is from 2007 but I just installed suPHP.

Will this change the php.ini path for every website? or just web3?

suPHP_ConfigPath /var/www/web3/etc/php.ini

Regards.
Reply With Quote
  #6  
Old 19th March 2009, 11:00
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

This changes the path onöy for the website were you added it in the apache directives field.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
paxpacis (19th March 2009)
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
ISPConfig 2.3.2-dev released till General 9 4th June 2007 10:46
ERROR: The PHP binary coming with ISPConfig does not work properly on your system! qvindesland Installation/Configuration 22 21st May 2007 16:05
ISPConfig and .htaccess ionut89 Feature Requests 1 17th October 2006 17:45
VirtualHosts marra87 General 9 12th September 2006 04:09
2 domains, 1 site wadims Installation/Configuration 13 31st May 2006 00:21


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


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