Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Can't set upload_max_file_size in php.ini

Posted on 2006-03-20
4
Medium Priority
?
1,452 Views
Last Modified: 2013-12-13
I have a problem setting the upload_max_file_size. I have changed php.ini. I set the upload_max_file_size to 25M in php.ini, saved it, restarted the webserver and I still can't upload files larger than 2M. When I look at a phpinfo() page it says that the upload_max_file_size is 2M. When I open php.ini the upload_max_file_size is correctly set at 25M. Help! Apache 2, Suse Linux, PHP 5.0.4
0
Comment
Question by:mdkgeurts
  • 2
4 Comments
 
LVL 9

Expert Comment

by:Rob_Jeffrey
ID: 16238455
I had a similar problem - and ended up having two ini files.  
You can set the limit in the .htaccess file as well as in your php file (I believe).
0
 
LVL 14

Accepted Solution

by:
ppfoong earned 500 total points
ID: 16243581

Perhaps php loads a different php.ini file than the php.ini that you have edited.

Type the command "php -i | more" or run phpinfo() and look for the config path info under this line:

Configuration File (php.ini) Path => /etc/php.ini

0
 
LVL 1

Author Comment

by:mdkgeurts
ID: 16247755
The config path pointed to a non-existing folder, I created the folder with the php.ini and it worked.
0
 
LVL 9

Expert Comment

by:Rob_Jeffrey
ID: 16247861
That was the same problem I had. :)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month20 days, 20 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question