Solved

Mediawiki 2MB file upload failing; PHP/Apache

Posted on 2007-03-24
5
1,707 Views
Last Modified: 2013-12-13
I am running Mediawiki 1.9.3 under PHP 5.2.1 and trying to import a relatively large (>2MB) file using Special:Import. It is failing each time due to some limit somewhere.

I suspect the error I am seeing is more of a PHP/Apache issue than Mediawiki.

The issue is that once the file uploads to the server I immediately get an error message, below:

Upload of import file failed; perhaps the file is bigger than the allowed upload size.

I have checked phpinfo which shows upload_max_filesize as being 8MB. post_max_size is also 8MB.

I don't know where these are set as I don't see them in the httpd.conf file in usr/local/apache/conf

I have also checked and the Mediawiki file (includes/SpecialImport.php) is set to 20000000 (20MB).

Why is it that anything above @1.8MB is failing?

Thanks,
Paul
0
Comment
Question by:pcoghlan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 10

Accepted Solution

by:
wildzero earned 250 total points
ID: 18786346
Is your script timming out after 30 seconds?
Perhaps you should set the time out to 2 minutes
http://nz.php.net/set_time_limit

set_time_limit(120); at the top of your php file.
0
 

Author Comment

by:pcoghlan
ID: 18786370
Thanks but when the file upload I immediately get the error. The message seems to indicate the file size is the issue and not the timing. I will of course try it though.


Thanks,
0
 
LVL 4

Assisted Solution

by:secondv
secondv earned 250 total points
ID: 18804750
Those values you mentioned are in php.ini

   locate php.ini

Look into the following:

upload_max_filesize
post_max_size
max_input_time

0
 
LVL 4

Expert Comment

by:secondv
ID: 18804759
Also

       "If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size."

You can learn more about php.ini and it's directives at:

http://www.php.net/manual/en/ini.core.php
0
 
LVL 16

Expert Comment

by:Kiran Paul VJ
ID: 18865181
also check for a line similar to
<input type="hidden" name="MAX_FILE_SIZE" value="1800000">

in your script

search for MAX_FILE_SIZE in your php file

kiranvj
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Node.js 11 82
Windows 10, 64 bit WAMP - won't start 9 30
Change background images after 5 seconds. 12 47
Ajax success not firing alert 6 45
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question