An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (2 MB) that this server supports - image

Ok I got Drupal 7.19, mySQL 5.1.66-cll PHP 5.3.21
Now I searched for he above error and found various answers of various age, however it doesn't address, my problem.
I get the error for any file bigger than 100k
went through php.ini settings.php as well as account settings, which is now 5000k.
and max post and max file are way higher.
The site has only 2 image fields, the original as well as one other. It doesn't matter which one is used in a content, the field settings for the original one were never changed and the themed installation came with images larger than 500k.
While for the time I can live with resizing images before uploading, it nevertheless is a pain in the .... and I really would appreciate any help.

I had a similar problem which i resolved via the php.ini file as well as the apache mod_security user.conf file.
My httpd is apache2, which has mod_security enabled, which also did not allow me to upload over 100k image file in Drupal. Apparently this is a common problem for the web-hosting provider (liquid web) because it took no more than 3 minutes to resolve.
First the php.ini file was altered (on CentOS it is in /usr/local/lib/) with lines:
;upload_tmp_dir = /tmp (yes it has a semi-colon at the start)
and also the line:
session.save_path = "/tmp"
Second file that was altered is the modsec2.user.conf file located on (CentOS) at /usr/local/apache/conf/
(appended at the bottom of the file in the last 2 lines):
SecUploadDir /tmp
SecTmpDir /tmp
Then /etc/init.d/httpd restart (or reload) apache and you should be able to bypass this limit for file uploads by mod_apache if it is enabled. Best of luck and please know that this is my first answer on stack so please be considerate.

just you can request your hosting provider
to added into the sites whitelist.conf file :
<IfModule mod_security2.c>
<LocationMatch .*>
SecRuleRemoveById 340147
</LocationMatch>
</IfModule>

Related

Configure Xampp for TYPO3

I have to learn how to use TYPO3 for an end-of-study internship. I use the last version of TYPO3.
And I want to use the local server Xampp on Windows 10. But I never used it before and I don't know how to configure it for TYPO3. I try to use the documentation on TYPO3's website but I don't really understand.
Could you help me ?
The first three messages can be resolved by changing the entries in the „php.ini“ file with an editor.
1);extension=php_soap.dll will be activated by removing the semicolon
2) max_execution_time = 30 has to be increased to 240
3) ; max_input_vars = 1000 will be activated by removing the semicolon and has to be increased to 1500 characters
Now restart Apache and MySQL with the XAMPP Control Panel and reload the website.
The „ThreadStackSize“ has to be raised to 8MB. In order to change this setup write the following lines with a text editor in the file „httpd.conf“:
<IfModule mpm_winnt_module>
ThreadStackSize 8388608
</ IfModule>
The last error „PHP OpenSSL extension not working“ can be ignored, since it’s just a local test system. So security is not that important in this case.
This information and more you can find here: https://www.pagemachine.de/blog/install-typo3-8-0-local-test-system-windows-tutorial/

Not able to upload large files via plugin

The problem is from word-press admin panel, I can upload up to 100mb file. without any problem. But when i am uploading it via simple script in plugin. Even 1 mb file its showing 413 "
Request Entity Too Large
I know this is server side error, But my question is How word-press can able to upload large file via ajax and my script don't?
I am using this plugin for upload
http://codecanyon.net/item/html5-file-upload/full_screen_preview/9254506
I have tried every thing like
In PHP Code
ini_set('max_execution_time', "3600");
ini_set('memory_limit', "99M");
ini_set('post_max_size', '3000M');
ini_set('upload_max_filesize','3000M');
ini_set('max_input_time','3600');
ini_set('client_max_body_size','200M');
In .htaccess file
LimitRequestBody 1024000
But i am not able to figure out why?
You're going to want to amend your servers php.ini file.
The code you put in your answer included part of the answer which was messing up which is the memory_limit.
Try this:
memory_limit = 256M
upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 3000
This allows for files up to 256Mb and will allow for up to 5 minutes of execution which can cause problems if you have a slow internet speed.
Amend it to whatever you think the absolute maximum file size will be.

Magento: 500 Internal server error in admin

I keep getting the 500 internal server error. I getting 500 internal server error when I am importing customer records by csv file from magento admin side. I can't found any solution. I have given the 755 permission to all the required files and folders of magento. How i can resolve this error, any one have idea for this solution.
.htaccess by default in Magento has this options disabled that are specific to 1and1 hosting, I would try enabling them:
#AddType x-mapp-php5 .php
#AddHandler x-mapp-php5 .php
You may also want to read over:
http://www.magentocommerce.com/boards/viewthread/2019/
http://www.magentocommerce.com/boards/viewthread/199907/
You should find the server "var/log" but not inside the magento's "var/log"
because this is the server error - 500 internal server
For my experience, it seems the php process is out of memory during importing/exporting data.
Also there are few other reasons about the settings,
e.g. max. post variables are out of limit, upload file size exceed limit , you may check the server log to know what is the exact problem.
Try enable the logging
System - Configuration - Developer - Log Setting

Suhosin changes

I've recently purchased a virtual server in order to use it as a stage development for my site which is based on a forum script (ipb).
Problem is that before the installation and after it, ipb shows me some messages about suhostin limits. For example
'suhosin.post.max_vars' is 1000 and has to be changed to 4096
'suhosin.request.max_vars' is 1000 and has to be changed to 4096
For both occasions, it says that these settings are on my php.ini. After looking up, couldn't find any mention of suhosin there. But I found them at /etc/php5/conf.d/suhosin.ini and I proceed and changed them with the correct values.
Problem is that I keep gettin the error messages and when I load phpinfo, I see that the old values are still there. I restarted apache, I even restarted the server but suhosin still has the old values even if I edit the suhosin.ini file and see my edits are there.
Could anyone explain what I'm doing wrong ? I even added the lines to php.ini but still nothing changed.
Thanks
You need to make a file called "php.ini" in your admin directory (you find this through the root where you have your forums) and put the following in. Change the values as needed.
suhosin.request.max_varname_length = 400
suhosin.get.max_value_length = 2000
suhosin.request.max_vars = 4100
suhosin.post.max_vars = 4100

Magento install stops creating database

I've tried win xp and 7
Apache 2.2.19
php-5.3.6 (tried php 5.1.x)
Mysql 5.1.44
The install process runs ok until the database creation screen.
After 1 minute, the process stops at:
http://127.0.0.1/magento/index.php/install/wizard/installDb/
with a BLANK page
The database has only 199 tables (sometimes stops with less tables)
If i refresh the webpage, sometimes more tables are created, but then i get a database error.
Tried to IMPORT the database manually and start the install, but i get an error at the same step!
Also retried the install (deleting the cached data in the Magento folder).
What am i doing wrong?
thanks.
I used to get the same behavior. Other observation is you do not get the blank screen if you are running installation wizard while magento sample data imported to the database.
I did some googling and find the following poge which resolved my issue.
http://www.magentocommerce.com/boards/viewthread/76240/
that is modify apache httpd.conf and add following lines:
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
I would suggest trying to install via the Command Line Interface:
http://www.magentocommerce.com/wiki/groups/227/command_line_installation_wizard
Open the index.php file (at the root) and write the following line at the top
<?php
set_time_limit(0);
?>
Empty the tables in your database and try again. The white page appears because the script times out and when you refresh that same page Magento gives you an error page where it says the table already exists. The SQL script which creates the tables in the database does not check whether the table exists in the database or not.
A blank screen in PHP is a strong sign of running out of memory. Check the memory limit according to the requirements and then maybe add a bit more too.
Change the name localhost file
with any www.example123.com in
c:\Windows\System32\drivers\etc\hosts
and add
127.0.0.1 www.example123.com
after wards follow these steps through this torrent link.
http://tinyurl.com/3r6dpop
After installing some images may not upload so even uploaded the books.
I got blank screen too, and the following error:
[09-Feb-2012 15:27:43] PHP Fatal error: Maximum execution time of 30
seconds exceeded in D:\creation\software
developer\projects\magento\document root\lib\Zend\Db\Statement\Pdo.php
on line 228
I'm pretty sure, that you have execution timeout too...
You have to setup your php.ini, and increase the max_execution_timeout, and in the iis manager you have to increase the fastcgi request and activity timeouts too.

Resources