Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 26th October 2012, 22:18
M1ENT M1ENT is offline
Junior Member
 
Join Date: Oct 2012
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
Default 413 Request Entity Too Large -PHPMyAdmin - HELP PLEASE

NOT SURE IF THIS HAS BEEN COVERED OR IF POST IS IN THE CORRECT LOCATION FOR POSTING.

I APPOLOGIZE, IF I POSTED IN THE WRONG LOCATION..

OK MOVING ON.

Installed The Perfect Server Cent OS 6.3 x86_x64 NGINX DOVECOT Setup..

ISPCONFIG3 Works Fine..

Problem Is PHPMYADMIN AND IMPORTING...

When I Try To Import a Databases In PHPmyAdmin,
Any .sql Database Over 1mb NGINX Will Receive An Error

ERROR:
413 Request Entity Too Large



Smaller Databases Were Able To Import Fine.

What Ive Tried Changing With No Luck:

READ ONLINE, Found Other's Had The Similar Problems With Nginx And Same Error. Was Instructed To Change

Client Max Body Size 1m

Ive Changed it to,

client_max_body_size 80m

tried also changing to any higher value than 1m, or to even match size of the database file im going to import...

No Luck There.

Changed The PHP.ini Max Upload And Max Post,
To Higher Values 80mb also the time out limits..

Edits to php.ini Work Since PHPMYADMIN NOW SHOWS 80mb Max To Upload.



But Still No Luck With Importing a 17mb .sql On PHPMYADMIN.

Servers NGINX CONFIG:
Code:
# More information about the configuration options is available on
#   * the English wiki - http://wiki.nginx.org/Main
#   * the Russian documentation - http://sysoev.ru/nginx/
#
#######################################################################

#----------------------------------------------------------------------
# Main Module - directives that cover basic functionality
#
#   http://wiki.nginx.org/NginxHttpMainModule
#
#----------------------------------------------------------------------

user              nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

pid        /var/run/nginx.pid;


#----------------------------------------------------------------------
# Events Module
#
#   http://wiki.nginx.org/NginxHttpEventsModule
#
#----------------------------------------------------------------------

events {
    worker_connections  1024;
}


#----------------------------------------------------------------------
# HTTP Core Module
#
#   http://wiki.nginx.org/NginxHttpCoreModule
#
#----------------------------------------------------------------------
http {
map $scheme $fastcgi_https {
          default on;
          https on;
}
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    
    client_max_body_size 80m;
    sendfile        on;
    tcp_nopush      on;
    tcp_nodelay     on;
    server_tokens   off;
    gzip            on;
    gzip_static     on;
    gzip_comp_level 5;
    gzip_min_length 10024;
    keepalive_timeout  3000;
    limit_zone   myzone  $binary_remote_addr  50m;

    # Load config files from the /etc/nginx/conf.d directory
    # The default server is in conf.d/default.conf
    include /etc/nginx/conf.d/*.conf;

}
No Errors When Reloading NGINX.

But I Do Receive The Same Error For Any Large Database .sql I try Importing...

413 Request Entity Too Large


Ive Been Breaking My Sculll Trying To Import A Database That's Only 2mb and cant import clients larger databases,
which is about 17mb and largest i need uploaded is 30mb..

Any Help On Where Else I Can Edit, Up The Limit,

Or Help Resolving This Issue Would Be Greatly Appreciated.

Thanks In Advance.

Last edited by M1ENT; 27th October 2012 at 00:05.
Reply With Quote
Sponsored Links
  #2  
Old 27th October 2012, 11:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Add this to your phpMyAdmin location in your vhost:

Code:
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
                       fastcgi_read_timeout 240;
__________________
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
  #3  
Old 28th October 2012, 19:40
M1ENT M1ENT is offline
Junior Member
 
Join Date: Oct 2012
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
Default

set info as instructed and no more error..

works fine now.

i appreciate the fast response and help..

thanks again..
Reply With Quote
  #4  
Old 19th December 2012, 23:46
andyace andyace is offline
Junior Member
 
Join Date: Oct 2010
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
Default

Sorry could you be a little more precise?

where do i add the

fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_read_timeout 240;

I have the same setup and the same error.

Tnanks

Andy
Reply With Quote
  #5  
Old 20th December 2012, 14:06
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
 
Default

Quote:
Originally Posted by andyace View Post
Sorry could you be a little more precise?

where do i add the

fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_read_timeout 240;

I have the same setup and the same error.

Tnanks

Andy
You must add it to the phpMyAdmin location in your nginx vhost (e.g.

Code:
        location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       include /etc/nginx/fastcgi_params;
                       # To access phpMyAdmin, the default user (like www-data on Debian/Ubuntu) must be used
                       fastcgi_pass 127.0.0.1:9000;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
                       fastcgi_read_timeout 240;
               }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
).
__________________
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
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
Being Spammed/Hacked/Probed not sure PLEASE HELP! kresser General 10 29th October 2010 18:25
Can't access to my website - after install problem pallermo Installation/Configuration 18 4th June 2010 14:29
proFTPd passive mode problems bisbell Server Operation 8 6th August 2008 22:12
Logsize issue cryptic General 46 7th April 2008 23:29
Request entity too large Jazzperson Installation/Configuration 23 24th September 2007 23:14


All times are GMT +2. The time now is 11:31.


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