Topic on Project:Support desk

Importation failure info

22
Snowfalcon cu (talkcontribs)

Hello,

I am novice and get this message when attempting to template upload an XML file: "Import failed: Loss of session data. Please try again." Surprisingly there are few clues. I have come across some instances to fix such as "switch to 'sign-in' not 'log-in'" or "upload in pieces of 1.8 megabytes." Another error is "Error 500 - Internal server error. An internal server error has occured! Please try again later."

What can I do to correct? Thank you and sorry [for such question].

MediaWiki 1.18.0 PHP 5.2.17 MySql 5.0.91

Bawolff (talkcontribs)

For "Error 500 - Internal server error. An internal server error has occured! Please try again later." Check your apache error log to find the actual error message. (Where that error log is depends on your web server, but commonly in /var/log/apache/error_log )

If you have command line access, try importing from the command line

Snowfalcon cu (talkcontribs)

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.

Bawolff (talkcontribs)
Snowfalcon cu (talkcontribs)

Thank you I am looking at it now.

Snowfalcon cu (talkcontribs)

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."

Bawolff (talkcontribs)

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 for what the number correspond to in that code snippet)

Snowfalcon cu (talkcontribs)

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.

Bawolff (talkcontribs)

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

Snowfalcon cu (talkcontribs)

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 (talkcontribs)

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 (talkcontribs)

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

Snowfalcon cu (talkcontribs)
Snowfalcon cu (talkcontribs)

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.

Bawolff (talkcontribs)

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).

Snowfalcon cu (talkcontribs)

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 (talkcontribs)

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.

Bawolff (talkcontribs)

"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.

Euloiix (talkcontribs)

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.

Applegategh (talkcontribs)

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.

Snowfalcon cu (talkcontribs)

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."

Drdee (talkcontribs)

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.

Reply to "Importation failure info"