Importation failure info

Fragment of a discussion from Project:Support desk
Jump to: navigation, search

Hello,

A tech staffer recommends to find the file to configure the upload size. He shied away at my pointing to your recommendation concerning Apache.

I tried to enact your recommendation but due to my amateurocity I did not. I called the service provider, and explained to a tech staffer that I cannot upload anything above 10 MB. He tried something but it failed. I then discussed /var/log/apache/error_log with the staff but he shied me away from doing it, telling me that he cannot participate in that over the phone.  ?

Anyway, he told me to ask on the forum where to find the file to configure the upload size. There is a ceiling to my uploading effort. Do you know about this? If not, I will re-read the content in your link prompt and try to figure out how to import a dump from the command line.

Thank you.

Snowfalcon cu07:06, 7 February 2012

MediaWiki generally doesn't enforce upload size limits itself, but relies on php/apache's built in limits instead (Well actually we do have $wgMaxUploadSize which can be set in LocalSettings.php - but it defaults to 100mb). Have a look at Manual:Configuring_file_uploads#Set_maximum_size_for_file_uploads.

Bawolff08:29, 7 February 2012

Thank you I am looking at it now.

Snowfalcon cu11:18, 7 February 2012

Hi Bawolf,

I wanted to touch base with you about this problem I have. I followed your prompts and tried but sadly it did not work. I then contacted the hosting company three different times, third time they downloaded an XML file above 10 MB and personally imported it through my Wiki and spent an hour looking and the email response is below.

I then downloaded two different utilities that supposedly "split" XML files. Both failed. I get error messages in the first (SML Splitter Net 4.0), the second one does not do anything. I have literally spent days, perhaps weeks, on and off, trying to fix this issue, which has drained emotional energy and ground parts of my Wiki to a halt. Contributors are clamoring to make some articles using templates that will not upload. It is intensely frustrating. Thanks anyway.

Response from host staffer: "This is in relation of your call earlier pertaining on the issue importing xml file through your wiki site. Upon further checking and replicating we assume that the issue is cause by the upload limit of the application. The following error occurred even after increasing the file upload limit of the php settings on the server. So we concluded that the limit is within the application itself.

Import failed: Upload of import file failed. The file is bigger than the allowed upload size."

Snowfalcon cu (talk)13:36, 18 February 2012

I looked into the source code, The only time we give that error is in these two conditions:

   case 1: # The uploaded file exceeds the upload_max_filesize directive in php.ini.
                                        return Status::newFatal( 'importuploaderrorsize' );
                                case 2: # The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.
                                        return Status::newFatal( 'importuploaderrorsize' );

The first case corresponds to the php directive. The second case corresponds to MAX_FILE_SIZE html form thing, which we don't use (So should never happen). Thus as far as I can tell, that error should only happen if php rejects the image. (See [1] for what the number correspond to in that code snippet)

Bawolff (talk)13:44, 19 February 2012

Hi Sir,

Is that in a php.ini file? Another issue is that I cannot access that. I had a friend of intermediate to somewhat high linux competence look at it and he implored that there is no way for him (through me) to access that php.ini. Somehow there is a ceiling imposed from above that prevents him from capably looking at that file.

This is beyond disheartening. I will, of course, look again through your conditions and that php.net link again and again. Thank you.

Snowfalcon cu (talk)00:56, 23 February 2012

Oh the snippet, that's from MediaWiki code, but the short version is that its only checking stuff from the php.ini file.

Bawolff (talk)02:56, 23 February 2012

Hello,

Thank you for the response. So, what exactly should I do? From the perspective of a beginner user in computers, what is the next logical step? I looked through the pages and understand the content but do not know what to do next...

What is now worse, the host company perhaps did something because *now* I cannot upload any file above 3 MB and now get a new message, which I never got before: "Import failed: Upload of import file failed. The file is bigger than the allowed upload size." This, after importing Template:Cquote onto glps2.org.

I wish Mediawiki professionals could write a section for novices (non-command-prompt/Apache/MySql users, but for writers of content). Sometimes I want to quit the whole enterprise.

Snowfalcon cu (talk)04:59, 24 February 2012

I logged into the server, or what I can see in privileges, and notice that the internet hosting company inserted a php.ini file that apparently screws everything up. I opened it in notepad and see they wrote this:

max_file_uploads = 20M post_max_size = 20M session.auto_start = On

When I use it, I cannot upload higher than 3 MB. When I *delete* the php.ini file, it resumes. Is that not the odd? This is what makes me want to jump out from this window.

Snowfalcon cu (talk)05:12, 24 February 2012

But alas, I cannot upload above 10 MB with it deleted. Good grief...

Snowfalcon cu (talk)05:14, 24 February 2012

Hello Bawolf,

Here are the current directives to my website.

http://glps2.org/wiki/info.php

Snowfalcon cu (talk)04:32, 25 February 2012

Isn't it frustrating to read the directives? It shows upload and post_max are 20 MB, though I now cannot do anything above 5 MB (internal server error while using the special:import feature on my Wiki).

Thank you anyway.

Snowfalcon cu (talk)04:52, 25 February 2012

Sorry, I'm really out of ideas at this point. I guess Double check that those directives only appear once in the file, and there aren't multiple config files that could have competiting upload directives (although splitting up php.ini files is pretty rare).

Bawolff (talk)00:01, 28 February 2012

Hi Bawolf,

Thank you for the response. What do you think about this (you mentioned errors before), at the top of LocalSettings.php:

error_reporting( E_ALL ); ini_set( 'display_errors', 1 );

I found it on this site, http://www.mediawiki.org/wiki/Manual:How_to_debug I looked around many other websites, but their php error log how-to[s] are really complicated. Hosting company said Monday morning "...memory limitation can also be a factor why you get an error message uploading files. You have a wiki site and it is causing lots of processes on the server. You can try to create a php error log script for you to see the exact error message."

More information about this error may be available in the server error log.

I tried and it didn't work. I tried other sites but do not know what to call the filenames, put the lines in php.ini?

>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Snowfalcon cu (talk)01:01, 28 February 2012

I looked up and down that Mediawiki link and sank in its detail. I thought that by looking at a PHP error tutorial, all would be easier to understand

http://www.youtube.com/watch?v=nBAPXqbcKwU&feature=related

It is not easy to digest. I am literally cracking under this pressure to play "system admin" though my job is to provide content on the history of physics.

Thank you anyway for your help the past few weeks.

Snowfalcon cu (talk)01:30, 28 February 2012

"Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request." Is generally an apache error (Or more specifically, its an error about an apache error. The 500 part is the real error, but both are generated by apache), not a php error. Looking in your apache error log (Sometimes located in places like /var/log/apache/error_log ) is more likely to have fruit than your php error log.

Bawolff (talk)02:25, 28 February 2012
 

Did you ever manage to resolve this problem? I am also facing some upload size error while my php.ini and LocalSettings.php variables seem to be set correctly.

Euloiix (talk)17:28, 3 September 2012

For me the 500 error is dependent on the number of pages imported, not the file size. It happens after a couple of hundred pages (it seems to vary with each attempt). I started out importing 5MB and pared it down to 600K after replacing text with template calls, and it still fails after roughly the same number of pages. In order to complete the upload, I go into the XML file and delete the pages already accepted, and try again.

Applegategh (talk)18:47, 5 September 2012
 
 
 
 
 
 
 
 
 
 
 
 
 

Hi Bawolf,

I wanted to touch base with you about this problem I have. I followed your prompts and tried but sadly it did not work. I then contacted the hosting company three different times, third time they downloaded an XML file above 10 MB and personally imported it through my Wiki and spent an hour looking and the email response is below.

I then downloaded two different utilities that supposedly "split" XML files. Both failed. I get error messages in the first (SML Splitter Net 4.0), the second one does not do anything. I have literally spent days, perhaps weeks, on and off, trying to fix this issue, which has drained emotional energy and ground parts of my Wiki to a halt. Contributors are clamoring to make some articles using templates that will not upload. It is intensely frustrating. Thanks anyway.

Response from host staffer: "This is in relation of your call earlier pertaining on the issue importing xml file through your wiki site. Upon further checking and replicating we assume that the issue is cause by the upload limit of the application. The following error occurred even after increasing the file upload limit of the php settings on the server. So we concluded that the limit is within the application itself.

Import failed: Upload of import file failed. The file is bigger than the allowed upload size."

Snowfalcon cu (talk)13:36, 18 February 2012

It's very counter-intuitive, but it seems that you need to set the 'post_max_size' variable instead of the 'upload_max_filesize' variable.

Drdee (talk)01:39, 14 April 2013