Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8425591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:18:49+00:00 2026-06-10T04:18:49+00:00

I am using nginx as web server and when I do phpinfo(); it uses

  • 0

I am using nginx as web server and when I do phpinfo(); it uses /etc/php5/fpm/php.ini

Now in my php code I am trying to set file upload size and max file uploads using following code.

ini_set('max_file_uploads', "50");     
ini_set('upload_max_filesize', '250M');

But when I do ini_get(‘max_file_uploads’) and echo the value it shows the default value as 20, infact I am not able to change any of the ini values in run time using ini_set().

Any ideas on how to change these values in run time using php code?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:18:51+00:00Added an answer on June 10, 2026 at 4:18 am

    Not all PHP ini directives can be changed at runtime (via ini_set). See the file uploads section of the PHP manual and the definition of the changeability values, which are PHP_INI_SYSTEM and PHP_INI_PERDIR for your desired settings, neither of which can be set at runtime.

    To get these settings in only one part of your app, you’ll likely need to compromise and set max_file_uploads setting globally in your php.ini file (since it is PHP_INI_SYSTEM), and then use your favorite per-directory config mechanism (.htaccess, .user.ini (in >5.3), etc) to set upload_max_filesize for that particular part of your app. See here for good instructions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Capistrano to deploy a Django application (it uses Nginx as the web
I've developed some web-based applications till now using PHP, Python and Java. But some
I only have one VPS hosting and using nginx for Django web application. Now,
I am trying to using Nginx to redirect from /t/latest/2 to /topics/latest/page/2 rewrite ^/t/latest$
I run 2 servers, 1 web (nginx/php), 1 database (mysql). Nginx has about 1500
I'm quite new to using Tornado Web as a web server, and am having
I'm attempting to implement a Catalyst application using nginx as a frontend web proxy
I'm using Rackspace Cloud Servers. I have installed NGINX with PHP and Memcache. When
I'm using Express.js to create a server to which I can connect using web
I'm using Python Flask to run Python for web through FCGI with nginx. My

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.