HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Programming/Scripts (http://www.howtoforge.com/forums/forumdisplay.php?f=7)
-   -   413 Request Entity Too Large -PHPMyAdmin - HELP PLEASE (http://www.howtoforge.com/forums/showthread.php?t=59263)

M1ENT 26th October 2012 22:18

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

http://i48.tinypic.com/2dme5s.png

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.
http://i46.tinypic.com/96audj.png


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.

falko 27th October 2012 11:43

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;


M1ENT 28th October 2012 19:40

set info as instructed and no more error..

works fine now.

i appreciate the fast response and help..

thanks again..

andyace 19th December 2012 23:46

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

falko 20th December 2012 14:06

Quote:

Originally Posted by andyace (Post 289864)
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/;
              }
        }

).


All times are GMT +2. The time now is 15:57.

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