Getting error when importing sql file - mysql

when i m trying to load the .sql file into wamp using phpmyadmin
i m getting the fatal error as below
Fatal error: Maximum execution time of 300 seconds exceeded in C:\wamp\apps\phpmyadmin4.5.1\libraries\plugins\import\ImportSql.class.php on line 220

Location: C:\xampp\phpmyadmin\config.inc.php
$cfg['ExecTimeLimit'] = 600;
In C:\xampp\php\php.ini
Look for and Change max_execution_time
you already have execution 300 seconds, so go to that file and increase max_execution_time to to what ever you want of seconds.

Add this line
$cfg['ExecTimeLimit'] = 6000;
to phpmyadmin/config.inc.php
And Change php.ini and my.ini
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M
max_allowed_packet = 200M (in my.ini)
OR
You may also go to xampp\phpMyAdmin\libraries\config.default.php,
and change this line to fix that error.
$cfg['ExecTimeLimit'] = 600;

You are uploading huge sql file. So php cannot executed all queries within a default time limit. You need to change the php execution time limit.
Your Answer is solved in Fatal Error while trying to export a result of a query in mysql

Hope this would help you please refer: http://www.nginxtips.com/configure-max_execution_time-in-php-fpm-using-nginx/

Related

Word press Not Displaying Theme

Internal Server Error
The server encountered an internal error or mis configuration and was unable to complete your request.
Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
You can increase memory limit in 3 ways,
Edit your wp-config.php file
define('WP_MEMORY_LIMIT', '256M'); // if this is not in your wp-config file.
Edit your PHP.ini file
If you have access to your PHP.ini file, change the line in PHP.ini
memory_limit = 256M ; Maximum amount of memory a script may consume (64MB) //If your line shows 64M try 256M:
Edit your .htaccess file
If you don’t have access to PHP.ini try adding this to an .htaccess file:
php_value memory_limit 256M
Hope this will help you.

Error: Internal Server Error (500) How to resolve this issue?

I will install theme and plugins successfully. When i will click on import demo data button after activate plugins, i get an error. Error: Internal Server Error (500) How to resolve this issue?
Note: I have LAMP Centos 7 Linux Server with 1GB RAM, 25GB Storage
Follow these steps to help in troubleshooting Internal Server Error (500) error:
First of all, Go FTP into your website
Open the file named wp-config.php on the root.
Find the line where you see define('WP_DEBUG', false);
Change false to true and save the file
And now you refresh the page you were getting an error on you should now see more descriptive error messages which will help in troubleshooting.
Create a new file in your /wp-admin/ folder and name it php.ini
Add these to the file :
memory_limit = 256M
always_populate_raw_post_data = -1
max_execution_time = 180
upload_max_filesize = 32M
post_max_size = 32M
Save it. This worked for me :)

Config xampp to import csv's to prestashop

I have a copy of my e-shop in my local server (XAMPP). The computer it's an i7 3820 16gb ram with xampp installed in SSD.
I change this values in php.ini file:
memory_limit -1
max_input_time 9999999999
max_execution_time 9999999999
max_file_uploads 1024
post_max_size 2048M
upload_max_filesize 120M
I'm trying to import by the csv importations tool included in Prestashop (v1.6) a file with more or less 9000 rows. The file is like this:
ID: 1
Attribute: AAA:select:1%BBB:select:2%CCC:select:3%DDD:select:4%EEE:select:5%FFF:select:6
Value: UUU:1%VVV:2%WWW:3%XXX:4%YYY:5%ZZZ:6
Price impact: 999
(I used "%" instead of "," to split rows because otherwise I have problems when the strings have "," in text)
Well. I am not able to import more than 1000 rows by file. And still takes about 60-90 minutes by file. If I try with larger files the browser returns me a timeout error.
Therefore, the question is, do you know some trick to optimize this process? another option? more parameters to change in php.ini? I appreciate any advice to help me improve the process.

MySQL sort_buffer_size

I have received this error:
Bad SQL query Incorrect key file for table '/tmp/#sql_659_0.MYI'; try to repair it
So, following this suggesttion, I try to edit:
sort_buffer_size=4M
join_buffer_size=4M
But I can not find them. Where are they located on Ubuntu 14.04 machine? There are no such options in /etc/mysql/my.cnf
You can run the command find / -name my.cnf on the terminal.This would work as mentioned here
try finding the location of my.cnf as explained here
Secondly i think the title of this question should be:
Where to find my.cnf in Ubuntu 14.04
If you just want to change the values in the running instance you could do (just fire it as a query from anywhere):
SET #FourMegs = 1024 * 1024 * 4;
SET GLOBAL sort_buffer_size = #FourMegs;
SET GLOBAL join_buffer_size = #FourMegs;

Php Myadmin upload large file error

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 262145 bytes)
I try to Import a csv file 199MB into mysql database.
upload_max_filesize = 300M
post_max_size = 300M
memory_limit = 32M
It's keep pop the error, what should I change in php.ini
33554432 bytes is exactly 32M.
Try to boost up your memory_limit alot.
You shoul try to increase the memory limit. In PHP > 5.2.1 the default value is 128M.
; Maximum amount of memory a script may consume (128MB)
; http://www.php.net/manual/en/ini.core.php#ini.memory-limit
;memory_limit = 32M
memory_limit = 128M