Mediawiki 1.39.1 issue with upload size - mediawiki

All,
I just moved Mediawiki from a hosting provider installation on my own server (local installation). So far it is working, but I have smaller issues like the upload size of files.
By checking in the web I found out that size limits are configured at the php.ini file (+ LocalSettings.php) and the variables for it are (which I would like to set to 2048 MB like below):
post_max_size = 2048M
upload_max_filesize = 2048M
After I configured that I restarted my apache2, but still at the Mediawiki upload page 8 M is shows as the limit and if i try to upload a file which is a bit over 10 MB I get an advice that it is to big. Additional I would like to add that I set in the Mediawiki config file LocalSettings.php the variable:
$wgMaxUploadSize = 2147483648;
But still no change!
Maybe someone has an idea about this issue?
Thanks and regards
wolpi

My idea was to add as a simple comment, but I do not have enough points yet :-)
Have a look here : https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads for some other suggestions.
Also Adam's suggestion might be a thing. If you use WAMP or MAMP you might have more than one ini files.

Related

Error messege at the time of wordpress theme uploading

Hey there I am trying to install a wordpress theme localy on my xampp server. At the time of doing this I got this error messege.
Warning: POST Content-Length of 14409615 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
Are you sure you want to do this?
Please provide me sufficient solution of this problem(error messege).
You need to edit your php.ini file to allow a larger file upload size:
See here:
PHP change the maximum upload file size
You can create a phpinfo page to find the php.ini file that is loaded:
http://php.net/manual/en/function.phpinfo.php
Please provide me sufficient solution of this problem(error messege).
I don't use xampp, so you might have to actually read the docs yourself to find where the php.ini is, but it shouldn't be too hard.

Trying to increase file upload limit for phpmyadmin

I'm having an issue with phpmyadmin where the max file upload size stays constant at 128MiB. I have read other issues extensively and have already run phpinfo() to make sure i'm loading the right file. The ini files it is loading are:
Configuration File (php.ini) Path = C:\Windows
Loaded Configuration File = C:\wamp\bin\apache\apache2.4.9\bin\php.ini
These files have been updated so that the following parameters are as follows:
memory_limit = 1500M
upload_max_filesize = 1028M
post_max_size = 1028M
max_execution_time = 500
Further more the phpinfo() function returns these values for both local and master values. Additonally, I am using wamp server and have not only restarted all the services as well as restarted my computer. Despite this the phpmyadmin file upload function stays at 128MiB.
The reason this is an issue is due to the fact the data I need to import is an extremely large .csv the current one is 350MB however I expect to have to import one that is at least 3GB. I'm completely at a loss as to how I should continue with this.
Find the php.ini file.
Find this and change it:
post_max_size = 128M
Change the values of theese like this
memory_limit = 2000M
post_max_size = 4000M
upload_max_filesize = 5000M
Restart apache, and you are good to go.
EDIT:
As you can see, memory_limit is lower than post_max_size that is lower than upload_max_filesize. You need to put values like these in order to workaround upload.

Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING

I've been having some problems with my application not loading the views (sometimes).
I am running a Debian server with php-fpm and nginx (php5.6.8 and nginx 1.8.0) Both compiled from source. On top of that I am running Lavavel 4.2.
So far I've had the problem in both Chrome and Firefox (chrome simply stops loading and shows the error, firefox does not show an error but shows a incomplete version of the view).
So far I've checked the permissions of both nginx and PHP, they both run as the same user (www-data:www-data).
My php-fpm socket is configured as:
[sitename]
listen = /var/run/php5-fpm/sitename.sock
listen.backlog = -1
listen.owner = www-data
listen.group = www-data
listen.mode=0660
; Unix user/group of processes
user = folderuser
group = www-data
; Choose how the process manager will control the number of child processes.
pm = dynamic
pm.max_children = 75
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.max_requests = 500
; Pass environment variables
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
Note that I set user to folderuser because the folder where the files for the site are located is owned by folderuser (folderuser:www-data).
Furthermore, permissions inside laravel folders are configured as 755 (775 for cache and upload folders so that www-data can write cache files)
I have disabled any kind of serverside php cache (except for zend opcache).
I've also tried disabling "prefetch resources to load pages more quickly" feature in chrome, which did not solve the problem.
As a last resort I've tried this solution:
/*
|--------------------------------------------------------------------------
| Fix for Chrome / PHP 5.4 issue
| http://laravel.io/forum/02-08-2014-another-problem-only-with-chrome
|--------------------------------------------------------------------------
*/
App::after(function($request, $response)
{
$content = $response->getContent();
$contentLength = strlen($content);
$response->header('Content-Length', $contentLength);
});
And some variants to this script, but I got some content length mismatches (more often than the net::ERR_INCOMPLETE_CHUNKED_ENCODING errors.
So to sum up, I've checked permissions and user/group settings serverside, I've disabled serverside caching (except for zend), I've messed around with chrome settings and I've tried a script for laravel, none of which solved the issue I am having. Note that the issue happens at random intervals at random pages on the site.
I really do not know what the next step towards solving my problem would be as the solutions above are the only ones I've found on the internet.
I would really appreciate some help.
Edit: I have a beta version of the same application running off another server with the exact same configuration (only difference is in hardware, more memory though), the issue does not present there.
Also, I forgot the mention that the application does not run with HTTPS (currently). The beta version however is running with HTTPS.
Edit The server where the issue is present has 2048 MB RAM, the beta server has 8192 MB RAM.
Edit I inspected the response with fiddler when the error occured, it simply cuts of the response at some point for no reason.
You might want to check if the folder /var/lib/nginx is owned by www-data too. I had this problem that, when the response page was too big, the Nginx worker process tried to use this folder and failed, because it was owned by nginx and the worker process ran under www-data. By doing chown -R www-data:www-data /var/lib/nginx, the problem was fixed.
If anyone finds this in the future, my net::ERR_INCOMPLETE_CHUNKED_ENCODING were as a result of having run out of space. Have a look at your disk usage and see if that's why!
I've seen a similar problem on my Nginx Server running on the latest Debian. I'm running a Wordpress site with Advanced Custom Fields installed. On the advanced custom fields it says that the problem could potentially be with the max_input_vars value in the php.ini file. I increased my value from 1000 to 3000 and that fixed the issue on one of my sites.
You can check out this link to see if it might help you. http://www.advancedcustomfields.com/faq/limit-number-fields/

Uploading small .sql file to MySQL database file returns error (XAMPP on OS X)

I am running a fresh install of XAMPP 1.8.2 for OSX and am currently trying to upload an exported database that is 171kb in size.
Getting hit with this error
Warning: File upload error - unable to create a temporary file in Unknown on line 0
From what I have discovered it may have something to do with write permissions to a /tmp file which doesn't seem to exist on my system.
Trying to set this up so I can make changes locally on a clients website without breaking the live site.
Cheers and thanks for taking a look.
Solved
within the file uploads section of your php.ini there resides this:
;upload_tmp_dir =
To allow for uploads uncomment and give the tmp dir a home:
upload_tmp_dir = "/tmp"
The the most recent default installation of XAMPP on Lion has a couple of very important lines commented out (in regards to phpmyadmin/mysql). Not sure why, but I would love to learn the reasoning behind it.

phpmyadmin "no data received to import" error, how to fix?

I am using XAMPP on a pc atwork to host a database. I exported a backup ("bintra.sql") using phpmybackuppro. I use xampp on a mac at home, and when I try to import the sql file located on my desktop, I get this error.
No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.
Now, the file size of bintra.sql is 922kb. The max size allowed indicated on the phpmyadmin screen is 3,072KiB, so I don't think it is the size that is preventing the import.
I'm using phpmyadmin v2.11.7
Does anyone have any ideas why no data is being received to import?
Comment Responses:
These are my upload settings from php.ini
;Whether to allow HTTP file uploads.
file_uploads = On
;Temporary directory for HTTP uploaded files (will use system default if not specified).
//upload_tmp_dir =
;Maximum allowed size for uploaded
files.
upload_max_filesize = 3M
;Maximum size of POST data that PHP will accept.
post_max_size = 8M
EDIT:
Tried using Mamp instead. Works fine with the same sql file. I don't know why.
I HAD THE SAME PROBLEM AND THIS WORKED FOR ME :
Try these different settings in C:\wamp\bin\apache\apache2.2.8\bin\php.ini
Find:
post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 8M
Change to:
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M
Then restart your xampp or wamp to take effect
or stop then start only apache in xammp
I had the same problem on Windows. Turns out it was caused by the temporary directory PHP uses for uploads. By default this is C:\Windows\Temp, which is not writable for PHP.
In php.ini, add:
upload_tmp_dir = C:\inetpub\temp
Make sure to remove any other upload_tmp_dir settings. Set permissions on C:\inetpub\temp so IUSR and IIS_IUSRS have write permission. Restart the web server and you should be fine.
Check permissions for you upload directory. You can find its path inside /etc/phpmyadmin/apache.conf file.
In my case (Ubuntu 14.04) it was:
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
So I checked permissions for /var/lib/phpmyadmin/tmp and it turns out that the directory wasn't writable for my Apache user (which is by default www-data). It could be the case especially if you changed your apache user like I do.
Open your php.ini file use CNTRL+F to search for the following settings which may be the culprit:
file_uploads
upload_max_filesize
post_max_size
memory_limit
max_input_time
max_execution_time
Make sure to save a copy of the php.ini prior to making changes. You will want to adjust the settings to accommodate your file size, and increase input and/or execution time.
Remember to restart your services after making changes.
Warning! There may be some unforeseen drawbacks if you adjust these settings too liberally. I am not expert enough to know this for sure.
Source: http://forum.wampserver.com/read.php?2,20757,20935
It’s a common error and it can be easily fixed. This error message is an indication of that the file you are trying to import is larger than your web host allows
No data was received to import. Either no file name was submitted, or
the file size exceeded the maximum size permitted by your PHP
configuration. See FAQ 1.16.
Solution:
A solution is easy, Need to increase file size upload limit as per your requirement.
First of all, stop the XAMPP/Wamp and then find the php.ini in the following locations. Windows: C:\xampp\php\php.ini
Open the php.ini file. Find these lines in the php.ini file and replace it following numbers
upload_max_filesize = 64M
And then restart your XAMPP/Wamp
NOTE: For Windows, you can find the file in the C:\xampp\php\php.ini-Folder (Windows) or in the etc-Folder (within the xampp-Folder)
xampp in ubuntu
cd /opt/lampp/etc
vim php.ini
Find:
post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 8M
Change to:
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M
sudo /opt/lampp/lampp restart
Kind of cheating I guess...but you can also zip the sql file and then import it. I've had that issue in the past when I was working with forum software and was always a simple fix.
If you are using xampp you can find php.ini file by going into xampp control panel and and clicking config button in front of Apache.
if in any case you haven't found a fix that you needed that were written above, a simple fix is to zip your .sql file and import the zipped file on phpMyAdmin.
This should work as long as the zip file size would not be more than the maximum upload bytes in your phpMyAdmin
I never succeeded importing dumb files using phpmyadmin or phpMyBackupPro
better is to go to console or command line ( whatever it's called in mac ) and do the following:
mysql -u username -p databasename
replace username with the username you use to connect to mysql, then it will ask you to enter the password for that username, and that's it
you can import any size of dumb using this method
No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.
These are my upload settings from php.ini
upload_tmp_dir = "D:\xampp\xampp\tmp" ;//set these for temp file storing
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 10M ;//change it according to max file upload size
I am sure your problem will be short out using this instructions.
upload_tmp_dir = "D:\xampp\xampp\tmp"
Here you can set any directory that can hold temp file, I have installed in D: drive xampp so I set it "D:\xampp\xampp\tmp".
Change your upload settings in php.ini configuration file
Change the below settings to these values:
Change to:
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M
just copy your source DataBase(from your PC C:\xampp\mysql\data\"your data base"), then copy it to the destination folder in your MAC (/Application/Xampp/xamppfiles/var/mysql).
don't forget to set the permission of the new copied folder(your DataBase) in your MAC otherwise you can't see your tables!
to set the permission:
-go to the folder of your DataBase(/Application/Xampp/xamppfiles/var/mysql/"your data base")
-right click on it
-select Get info
-in the sharing&permissions you must add your user account(i.e. administrator or everyone)
-choose its privilege to Read & Write
-choose Apply to enclosed items
enjoy your Database ;)
if none of the above solutions worked for you.
in my case phpmyadmin was using a deferent configuration file(php.ini). to know what config file used by phpmyadmin :
go /usr/share/phpmyadmin then edit index.php file and make it start with this
<?php
phpinfo();
die();
// ...
now when you visit localhost/phpmyadmin you can search for php.ini.
you can tell where the config file is , in my case it was /etc/php/7.3/apache2/php.ini
now you need to update upload_max_filesize and post_max_size and you may need to change upload_tmp_dir
save your changes and then run sudo service apache2 restart
now everything should be OK
I tried all these answer but none succeed. even with heidisql
Then I open my.ini files
it turned out this line
performance_schema = off
So I turned it on, performance_schema = on,
the importing with heidisql works, but phpmyadmin still not woking
Finally I update phpmyadmin to the latest version (ver 5.2 at this time), and it works, importing works again