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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th April 2012, 20:57
softstein softstein is offline
Junior Member
 
Join Date: Apr 2012
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default upload_max_filesize unchangeable?

Hello!

I am running into problems changing upload_max_filesize on a Debian Squeeze Ispconfig3 installation (which works like a charm btw .
Normally this should be a rather trivial task, but as it turns out it is not:

I am running a website under FastCGI with SuExec.

In /etc/php5/cgi/php.ini I changed:
upload_max_filesize = 20M
memory_limit = 129M

(i made these changes to all php.ini's (mod_apache,cgi,cli) as well to make sure).

Nevertheless Apache remains unimpressed by my changes, all values still remain default (upload_max_filesize 2M, memory_limit 128M). # apache2ctl restart makes no difference.
Interestingly, however AllowOverride All is set properly, I cannot even override the values with ini_set(...) neither.

Now I am really running out of ideas. Has anybody any idea where I am missing the point?

Any idea/help is very appreciated!
Reply With Quote
Sponsored Links
  #2  
Old 5th April 2012, 00:13
kwickcut kwickcut is offline
Senior Member
 
Join Date: Nov 2005
Location: nj usa
Posts: 223
Thanks: 14
Thanked 11 Times in 10 Posts
Default

did you restart apache if not then try that

i know with ubuntu there are 3 locations, and ubuntu is a spin off of Debian Squeeze so maybe its the same check the following and see all should be set the same

/etc/php5/apache2/php.ini
/etc/php5/cgi/php.ini
/etc/php5/cli/php.ini
__________________
Operating system Ubuntu Linux 10.04.4
ISPConfig Version: 3.0.4.3
Webmin version 1.580
Kernel and CPU Linux 2.6.32-40-server on x86_64
Processor information AMD Phenom(tm) II X4 945 Processor, 4 cores
Real memory 4.0 GB total
Reply With Quote
  #3  
Old 5th April 2012, 00:26
softstein softstein is offline
Junior Member
 
Join Date: Apr 2012
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes kwickcut, I did restart the apache. no effect. And I changed the value in all three php.ini's. No effect either.

But meanwhile I found other workarounds. They do not work on global scope but that's better than no scope at all

#1: pimping the starter script (in this case /home/www/php-fcgi-scripts/web2/.php-fcgi-starter ) so that it reads (mind the last line before $1)

Code:
#!/bin/sh
PHPRC="/var/www/conf/web2"
export PHPRC
PHP_DOCUMENT_ROOT="/var/www/clients/client1/web2"
export PHP_DOCUMENT_ROOT
# The variable PHP_FCGI_CHILDREN is onyl useful for lighty or nginx as apache
# mod_fcgi will control the number of childs themself and never use the additional processes.
# PHP_FCGI_CHILDREN=8
# export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php-cgi \
 -d open_basedir="/var/www/clients/client1/web2/web:/var/www/clients/client1/web2/tmp:/usr/share/php5:/tmp:/usr/share/typo3" \
-d upload_tmp_dir=/var/www/clients/client1/web2/tmp \
-d session.save_path=/var/www/clients/client1/web2/tmp \
-d upload_max_filesize=20M \
 $1
or, way more elegantly

#2: using .user.ini
by creating a file .user.ini in the web/ folder (should be found automatically) which contains
Code:
upload_max_filesize=20M
And that's just it. Hope it helps anyone.
Reply With Quote
  #4  
Old 5th April 2012, 08:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,176
Thanks: 829
Thanked 5,414 Times in 4,257 Posts
Default

You have set some custom php.ini values in the php.ini field in ispconfig, so this website uses its own php.ini. The recommended solution for your problem is to add:

upload_max_filesize=20M

in the php.ini field in the website settings.

Altering the fcgi starter script will not last long as your changes will get removed and adding a user ini file can be used but why adding a third config option when everything is available from within the ispconfig interface without editing any files
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 5th April 2012, 10:13
softstein softstein is offline
Junior Member
 
Join Date: Apr 2012
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Till, thanks for your help.
I tried this in the first place. But setting something in the php.ini field does surely work if you use apache_mod.

But with FastCGI it seems there is no effect (at least in my installation).
Reply With Quote
  #6  
Old 5th April 2012, 10:37
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,176
Thanks: 829
Thanked 5,414 Times in 4,257 Posts
Default

Quote:
I tried this in the first place. But setting something in the php.ini field does surely work if you use apache_mod.
No,you mix up two fields here: for mod_php, you add the settings in the apache directives field, not the php.ini field. mod_php does not support separate php.ini files for each vhost, so you have to set the values inside the vhost file (apache directives field) as php_admin_value and php_admin_flag settings and not in a custom php.ini.

Quote:
But with FastCGI it seems there is no effect (at least in my installation).
The php.ini field is especially for fastcgi. Maybe you you did not wait until the changes were written to disk (which take at least one minute, see jobqueue in moinitor) or you entered the values as php_dmin_flag or php_admin_value instead of the normal php.ini file format.. The values of the php.ini field are written to a php.ini file in the directory /var/www/conf/web2/ and this directory is set in the fcgi strater script:

PHPRC="/var/www/conf/web2"
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 13th March 2014, 21:43
crypter crypter is offline
Junior Member
 
Join Date: Oct 2013
Posts: 21
Thanks: 2
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by till View Post
You have set some custom php.ini values in the php.ini field in ispconfig, so this website uses its own php.ini. The recommended solution for your problem is to add:

upload_max_filesize=20M

in the php.ini field in the website settings.

Altering the fcgi starter script will not last long as your changes will get removed and adding a user ini file can be used but why adding a third config option when everything is available from within the ispconfig interface without editing any files
Sorry to bump such an old thread, but I had a question regarding this. Basically I have gone into ISPConfig->Sites->domain.com->Options and added the following to the "Custom php.ini settings" input:

upload_max_filesize=100M

I have checked the jobqueue to make sure the job was still not running. I have also restarted apache. But I'm still unable to upload anything over ~2MB.

One thing I'm wondering if it makes a difference, is I'm trying to do this on a subdomain that I have set up in ISP. Meaning, I'm applying these settings to the php.ini settings for domain.com, but want to make sure that in doing that it will apply to subdomain.domain.com as well?

EDIT: This will probably help out a little. Here is an excerpt from my error log...

mod_fcgid: HTTP request length 135568 (so far) exceeds MaxRequestLen (131072)

Last edited by crypter; 13th March 2014 at 21:59.
Reply With Quote
  #8  
Old 13th March 2014, 22:24
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,176
Thanks: 829
Thanked 5,414 Times in 4,257 Posts
Default

http://www.faqforge.com/linux/fix-ht...-debian-linux/
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 13th March 2014, 22:28
crypter crypter is offline
Junior Member
 
Join Date: Oct 2013
Posts: 21
Thanks: 2
Thanked 1 Time in 1 Post
Default

Thanks for the link till!

This is what I ended up doing though that made it work:
http://www.wallpaperama.com/forums/apxxxw.html

It's the same concept, but easier for those who don't like manually editing conf files and prefer the GUI of ISPConfig.

I love ISPConfig so much!
Reply With Quote
  #10  
Old 14th March 2014, 15:27
concept21 concept21 is offline
Senior Member
 
Join Date: Dec 2011
Posts: 146
Thanks: 28
Thanked 18 Times in 13 Posts
 
Question

Quote:
Originally Posted by till View Post
You have set some custom php.ini values in the php.ini field in ispconfig, so this website uses its own php.ini. The recommended solution for your problem is to add:

upload_max_filesize=20M

in the php.ini field in the website settings.

Altering the fcgi starter script will not last long as your changes will get removed and adding a user ini file can be used but why adding a third config option when everything is available from within the ispconfig interface without editing any files

But where can I change the upload_max_filesize from within IPSConfig 3.053? I can't find what you said.
Reply With Quote
Reply

Bookmarks

Tags
debian squeeze, ispconfig3, php.ini, upload_max_filesize

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


All times are GMT +2. The time now is 18:28.


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