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 899317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:11:52+00:00 2026-05-15T15:11:52+00:00

I have to upload a pdf file with 34MB. My site is in Linux

  • 0

I have to upload a pdf file with 34MB. My site is in Linux with php. But my site support only 8MB. (I know this from phpinfo). How I increase the size? I heared that we can change it in php.ini through. htaccess. But where I get php.ini? How I change the size?. Does any one give me a solution ?

  • 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-05-15T15:11:52+00:00Added an answer on May 15, 2026 at 3:11 pm

    There are multiple settings that can affect the maximum file upload size:

    PHP_INI_PERDIR: The following settings can be set in php.ini, .htaccess or httpd.conf:

    upload_max_filesize
    The maximum size of an uploaded file.

    post_max_size
    Sets maximum size of post data allowed. To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by your configure script, memory_limit also affects file uploading.

    max_input_time
    This sets the maximum time in seconds a script is allowed to parse input data, like POST, GET and file uploads.

    PHP_INI_ALL: The following settings can be set in php.ini, .htaccess, httpd.conf, or with ini_set():

    max_execution_time
    This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. If this limit is too low, your script will terminate before a large file has had time to upload.

    memory_limit
    This sets the maximum amount of memory in bytes that a script is allowed to allocate. If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size.

    POST upload method
    When uploading files via the POST method, you also need to set MAX_FILE_SIZE in your HTML form. See this for more details:

    http://www.php.net/manual/en/features.file-upload.post-method.php

    Shared hosting
    If you are using shared hosting, it is unlikely that you will be able to access the system php.ini file. However, you can set the values in .htaccess or in a per-directory php.ini file. Some shared hosting providers may prevent you from doing this, so you will need to check if this is the case.

    .htaccess
    Here’s a sample .htaccess file:

    <IfModule mod_php5.c>
      php_value upload_max_filesize 70M
      php_value post_max_size 80M
      php_value memory_limit 90M
      php_value max_execution_time 240
      php_value max_input_time 240
    </IfModule>
    

    Per-directory php.ini
    The above settings can also be changed in a per-directory php.ini file. Again, the ability to do this may be restricted by your hosting provder. For more information on this, see here:

    http://www.askapache.com/php/custom-phpini-tips-and-tricks.html

    Changeable:
    For a description of the PHP_INI_* modes, which show where configuration directives may be set, see here:
    http://php.net/manual/en/configuration.changes.modes.php

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

Sidebar

Related Questions

In my site, user want to upload a pdf file and I have to
I have an upload box... <form action=upload_file.php method=post enctype=multipart/form-data><BR> <label for=file>Filename:</label><BR> <input type=file name=file
i have saved the pdf file to the database using file upload . now
I have the following code to upload a pdf file through ftp : try
When I upload a pdf file of 30MB it shows a 500 error, but
I have to upload images and pdf files from client side to server side,
For some reason my PDF upload form is failing consistently, I have this code:
I´m trying to upload a file which is fetched from a server. But when
I have a very simple file upload that allows users to upload PDF files.
I'm using PHP to upload a pdf. I now have to edit the code

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.