Jump to content

CSV import time out solution (prestashop 1.6) [solved]


satkauskas

Recommended Posts

Hello,

I have found a solution, that works for me. I had an error (time out) for CSV import.

Some of you may solve this having modified httaccess or php.ini files. But, I dont know why - for me it wasnt a solution. 

 

Now, I added some code into public_html/classes/Product.php

 

right before this text

/**
 * @deprecated 1.5.0.1
 */

add these lines (you can modify as you need)

ini_set('default_charset', 'utf-8');
ini_set('magic_quotes_runtime', 0);
ini_set('magic_quotes_sybase', 0);

ini_set('max_execution_time',9000);
ini_set('max_input_time',9000);
ini_set('default_socket_timeout',9000);

ini_set('upload_max_filesize', '100M');
ini_set('memory_limit', '4000M');
ini_set('query_cache_size', '2000M');
ini_set('post_max_size','100M');

ini_set('session.gc_maxlifetime', 9000);
ini_set('mysql.connect_timeout', 9000);
ini_set('max_input_vars', 100000);
ini_set('expect.timeout', 9000);
ini_set('default_socket_timeout', 9000);

ini_set('max_allowed_packet','500M');

ini_set('suhosin.request.max_vars', 100000);
ini_set('suhosin.post.max_vars', 100000);

@ini_set('max_execution_time', 9600);

 

Moreover, these lines can be added into other classes and controllers!!! 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...