Vlad Eugen Nitu Vlad Eugen Nitu - 11 months ago 81
Apache Configuration Question

Postgres DB upload error "No server supplied!"

So, I have to import a database in postgres and I get the following error: "No server supplied!"
I searched a bit and I understood that this is because of the PHP file size limit, post size or memory size.
I'm using a LAMP installation on Linux Ubuntu and I've edited the php.ini file from lampstack/php/etc
I've tried everything I've found until now, most people claiming to solve the problem but apparently not mine.
The settings now are these:

upload_max_filesize = 5000M
post_max_size = 5000M
max_execution_time = 120
max_input_time = 300
memory_limit = 2G

I tried changing anything people talked about, yes I did restart LAMP, the browser, even the computer, I've cleared the cache, nothing...
Any idea what I'm doing wrong? Thank you!

Update: The error log looks like this:
PHP Warning: POST Content-Length of 84394850 bytes exceeds the limit of 83886080 bytes in Unknown on line 0, referer: http://localhost:8080/phppgadmin/redirect.php?subject=database&server=localhost%3A5432%3Aallow&database=ss_dev

Answer Source

POST Content-Length of 84394850 bytes exceeds the limit of 83886080

83886080 byes = 8Mb

There's a mismatch between what your error says the limit is and what you think your configuration says it is.

You've stated your configuration says 5000M. It is possible you have the wrong php.ini file.

Try searching for another one:

grep -r post_max_size /etc/php5

For me this produces:

/etc/php5/fpm/php.ini:post_max_size = 1024M
/etc/php5/fpm/php.ini.ucf-dist:post_max_size = 8M
grep: /etc/php5/apache2/php.ini.old: Permission denied
/etc/php5/cli/php.ini:post_max_size = 8M

Notice that on my system there are a few files called php.ini. You are looking for one with post_max_size or upload_max_filesize set to 8M