• Home
  • Releases
  • Submit Vuln
  • Press
  • About
  • PGP
  • Contact
    • Contact
    • Submit Vuln
    • VDP
  • Tutorials
    • All Posts
    • Photoshop on Linux
    • macOS on Linux
  • Supporters
  • Projects
  • Training
Sick Codes - Security Research, Hardware & Software Hacking, Consulting, Linux, IoT, Cloud, Embedded, Arch, Tweaks & Tips!
  • Home
  • Releases
  • Submit Vuln
  • Press
  • About
  • PGP
  • Contact
    • Contact
    • Submit Vuln
    • VDP
  • Tutorials
    • All Posts
    • Photoshop on Linux
    • macOS on Linux
  • Supporters
  • Projects
  • Training
No Result
View All Result
Sick Codes - Security Research, Hardware & Software Hacking, Consulting, Linux, IoT, Cloud, Embedded, Arch, Tweaks & Tips!
  • Home
  • Releases
  • Submit Vuln
  • Press
  • About
  • PGP
  • Contact
    • Contact
    • Submit Vuln
    • VDP
  • Tutorials
    • All Posts
    • Photoshop on Linux
    • macOS on Linux
  • Supporters
  • Projects
  • Training
No Result
View All Result
Sick Codes - Security Research, Hardware & Software Hacking, Consulting, Linux, IoT, Cloud, Embedded, Arch, Tweaks & Tips!
No Result
View All Result
Home Tutorials

How To Increase PHP File Upload Limit on CentOS 7

by Sick Codes
July 14, 2016 - Updated on June 24, 2020
in Tutorials
0

How To Increase PHP File Upload Limit on CentOS 7 with one line of bash.

SSH into your server as root and execute the following command:

[cce_bash]replace “upload_max_filesize = 2M” “upload_max_filesize = 20M” — /etc/php.ini && service httpd restart[/cce_bash]

That will replace your 2mb upload limit with a 20mb upload limit and it will restart the web server so changes to php.ini are made:

Done.

P.S. you can verify your new maximum PHP file upload size is by executing:

[cce_bash]grep upload_max_filesize /etc/php.ini[/cce_bash]

Sample output:

[cce_bash]upload_max_filesize = 20M[/cce_bash]


Universal way to increase PHP Upload Limit:

SSH into your server as root. Use vi or nano to edit the php.ini file:
[cce_bash]
vi /etc/php.ini
[/cce_bash]
Press / and type upload_max
(Pressing backslash (/) allows you to search a file while editing with Vi)

You should see:

[cce_bash]upload_max_filesize = 2M[/cce_bash]

Press i and change that value to 20M
(Pressing “i” allows you to insert type in characters while editing with Vi)

[cce_bash]upload_max_filesize = 20M[/cce_bash]

To exit Vi, press Esc and type [cce_bash]:x[/cce_bash] and hit enter.

Now either [cce_bash]reboot[/cce_bash] your server or restart httpd:

[cce_bash]service httpd restart[/cce_bash]

Your PHP upload limit is now 20mb.

Next Post

How To Delete The First Column In A CSV File Inside a Bash Script

This plugin is vulnerable flash linux fail

How To Update Flash on Firefox & Iceweasel Debian or Ubuntu

How To Download & Install Launchpad & PPA Programs/Files Super Easy

No Result
View All Result
  • Home
  • Releases
  • Submit Vuln
  • Press
  • About
  • PGP
  • Contact
    • Contact
    • Submit Vuln
    • VDP
  • Tutorials
    • All Posts
    • Photoshop on Linux
    • macOS on Linux
  • Supporters
  • Projects
  • Training

© 2017-2021 Sick.Codes

@sickcodes

@sickcodes

@sickcodes

Discord Server

sickcodes.slack.com

t.me/sickcodeschat

./contact_form