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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 6th June 2012, 01:13
morten44 morten44 is offline
Member
 
Join Date: Apr 2012
Posts: 37
Thanks: 3
Thanked 0 Times in 0 Posts
Default php.ini max_upload only 2MB,despite set to 10MB

Hi
I have used
http://www.howtoforge.com/perfect-se...04-ispconfig-3
pritty mutch default

I am using the server for joomla websites

Problem is that I can not upload bigger than 2MB files

I have checked my PHP.ini in /etc/php5/apache2 and /cgi

This is what it says:
Quote:
upload_max_filezise = 10MB
However when i make a phpinfo file it shows 2MB only. See link:
http://new.dapp-malawi.org/phpinfo.php

I have no clue where to look now. I have not done any work in .htaccess files or local php.ini files

Any hint on what can cause this?
I think this is the right php.ini files within the install?

Kind Regards
Morten
Reply With Quote
Sponsored Links
  #2  
Old 6th June 2012, 07:03
orasis orasis is offline
Senior Member
 
Join Date: Mar 2007
Posts: 169
Thanks: 11
Thanked 7 Times in 7 Posts
Default

I use ispconfig 3 on ubuntu 12.04 since 3 days ago (I was previously on ubuntu 10.04), and had to once again alter the upload_max_filezise to 50M once I had to import large databases via phpmyadmin.

I only had to edit /etc/php5/apache2/php.ini and restart apache
Then, it right away appeared in phpmyadmin as: (Max: 50MiB)

Try to check if using MB instead of M is the problem:
Code:
upload_max_filezise = 10M
instead of
Code:
upload_max_filezise = 10MB
Also try to touch the php.ini files of the system the less the possible and only if needed, once you can do most of the job with custom php.ini files within your website directory (outside the public webroot /web/ of course), or by using the Sites > Website > Options tab > Custom php.ini settings. You can paste there the entire default /etc/php5/apache2/php.ini contents and alter it. Or copy the default php.ini and upload to your website (outside the public dir) and then point to it by setting an .htaccess file in your site public directory, with this code (I use suphp):
Code:
### Use custom php.ini for this Joomla site
<IfModule mod_suphp.c>
suPHP_ConfigPath /var/www/clients/client1/web1/my_custom_dir_name/for_this_joomla_site/php.ini
<Files php.ini>
order allow,deny
deny from all
</Files>
</IfModule>
EDIT:
by the way, exposing your phpinfo is not secure.
If you use Joomla, set this in your php.ini:

Code:
disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
more info here: http://docs.joomla.org/Security_Chec...d_Server_Setup

cheers

Last edited by orasis; 6th June 2012 at 07:15.
Reply With Quote
  #3  
Old 6th June 2012, 21:46
morten44 morten44 is offline
Member
 
Join Date: Apr 2012
Posts: 37
Thanks: 3
Thanked 0 Times in 0 Posts
Default php.ini issue

Hi
Thanks alot of for your explenation and advise. It was very usefull

Despite chaning 10M to 10MB, it still shows 2MB in my phpoinfo (only published it for you to see it)
I cant understand where it takes it from
I have done a search on the server and there are 3 php.ini files:
/etc/php5/apache2/php.ini
/etc/php5/cgi/php.ini
/etc/php5/cli/php.ini

I have set them all to 10MB, restarted the server and still it shows 2M!!
In site-webiste-option I also added this line
Quote:
upload_max_filezise = 10MB
but still no joy. Not sure if i need to add anything else?
I have no idea where it takes from

I therefore would like to look into using local php.ini instead

I saw your example and I understand what you mean.
However i use CGI(not fast CGI) and not suphp (the only one i managed to generally do upload with)

Do you know the code i have to use in .htaccess as the one you show probably only work with suphp

Hope anyone has some input as I start to get quite lost!

Kind Regards
Morten
Reply With Quote
  #4  
Old 6th June 2012, 23:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,726 Times in 2,565 Posts
Default

I think you made a typo:

Code:
upload_max_filezise = 10M
should be

Code:
upload_max_filesize = 10M
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 7th June 2012, 00:43
morten44 morten44 is offline
Member
 
Join Date: Apr 2012
Posts: 37
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Thanks for the English Lesson Falko
Stupid mistake
However I have changed it now as pr attached file, but still showing 2M in phpinfo
I have checked 3 different site on the server and they all show 2M

So 2 questions
1. Why does it not change when I change php.ini
2. Why can I not get it to read the setting on the "option" tab?

I am also still interesting on howto add code for CGI to .htaccess to refere to local php.ini as that might be an option

Kind Regards and thanks for comming back to me
Morten
Attached Images
 
Reply With Quote
  #6  
Old 7th June 2012, 08:56
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,457
Thanks: 813
Thanked 5,240 Times in 4,108 Posts
Default

Quote:
1. Why does it not change when I change php.ini
Have you resated apache after you cahnged the files?
Have you edited the correct file? You see the path to the php.ini which is used for this site in the phpinfo() output.

Quote:
2. Why can I not get it to read the setting on the "option" tab?
You might have not waited until the cahnges were written to disk or you used mod_php instead of cgi, fastcgi or suphp.

Quote:
I am also still interesting on howto add code for CGI to .htaccess to refere to local php.ini as that might be an option
You can do that directly inside ispconfig, so no need to add any code. Just insert the lines that you want to have in the custom php.ini field on the options tab of the website in ispconfig and wait until the changes have been processed. You see that in the jobqueue in the ispconfig monitor. Beaware thet a ciustom php.ini is only possible for cgi, fcgi and suphp and not for mod_php.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 7th June 2012, 20:27
morten44 morten44 is offline
Member
 
Join Date: Apr 2012
Posts: 37
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Hi
I have restarted Webserver
I have waited 2 hours after doing changes to "Advanced"

It still does not want to change away from 2M
I have also tried to change other settings and still no joy

as pr phpinfo file i have to edit

/etc/php5/cgi/php.ini
and
/var/www/conf/web13/php.ini

As pr screenshot i have hanged them to 6MB, rebooted still no joy.
Still showing 2MB

I have chaged from CGI to FastCGI, same thing
Joomla 2.5 also have a setting so I can see the php.ini and that shows 2MB as well

Have have done differnt test with 6M and 6MB
I have settled with M as the rest of the php.ini file uses only M to define MB

Is there a chance that the websites for some reason can not read the php.ini files?
Any other idears?

Kind Regards
Morten
Attached Images
 
Reply With Quote
  #8  
Old 7th June 2012, 22:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,726 Times in 2,565 Posts
Default

Do you have any .htaccess files where upload_max_filesize is set?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 7th June 2012, 23:01
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,138
Thanks: 4
Thanked 53 Times in 49 Posts
Default

and you might also want to alter:

Code:
post_max_size
memory_limit
__________________
"Common sense is not as common as commonly believed" by sjau

Auto-Install Script for ISPConfig and Horde on a Vanilla Debian Stable

Need more Repos for Ubuntu? Repository Generator
Need more Repos for Debian? Debian Repository Generator
Reply With Quote
  #10  
Old 8th June 2012, 22:38
morten44 morten44 is offline
Member
 
Join Date: Apr 2012
Posts: 37
Thanks: 3
Thanked 0 Times in 0 Posts
 
Default

Hi
Sorry for some delay. Was testing and test but still no joy

I have a .htaccess file but all it does is the Rewrite URL
There are no more infomration in this file

As you see from phpinfo file there are only 2 locations for the php.ini file:
/etc/php5/cgi/php.ini
and
/var/www/conf/web13/php.ini

I have changed it both places to 6M but no joy. It does not change.
I have also tried to change "post_max_size" and "memory_limit" but its the same with that. It does not change.

I have also in Option Tab in ISPConfig for this domain added:
upload_max_filesize = 5M
max_execution_time = 60

Its not reading it.

I have no idea where it takes this settings from if its not reading the php.ini files.

Is there anything I can check in order to see if the folders with the PHP files are readable for the webuser?

You think this is the problem or you think its something else?

Is there any log files I can look it, post here?

Kind Regards
Morten
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
Grub problems after How To Set Up Software RAID1 On A Running LVM System newfield_no1 HOWTO-Related Questions 1 28th March 2012 13:15
yum issues el-sid Installation/Configuration 4 10th August 2011 11:01
Error 12 Invalid Device blinx Installation/Configuration 0 15th January 2011 05:27
Can't access to my website - after install problem pallermo Installation/Configuration 18 4th June 2010 13:29
newbie ububtu 6.0.6 error PHP binary line 816 davidsky73 Installation/Configuration 8 17th September 2006 11:51


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


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