Still problem with phpadmin import
Posted by: FuzMic (113.210.138.---)
Date: November 27, 2015 10:04AM

Hi gurus

I exported my database from HostGator via phpAdmin v4.3.8 to .zip file about 400k. When i try to import to my localhost (wamp) phpAdmin v4.0.4, there is now a 300 sec time out due the following file, line 267


C:\WAMP\apps\phpmyadmin4.0.4\libraries\dbi\mysqli.dbi.lib.php

Line 267 of this file cause 300 secs time out.

} elseif ($options == ($options | PMA_DBI_QUERY_UNBUFFERED)) {
$method = MYSQLI_USE_RESULT;
} else { (this is line 267)
$method = 0;
}

What is the significance? Otomatic please help, this the next issue i did not mention the first time.



Edited 1 time(s). Last edit at 11/27/2015 10:09AM by FuzMic.

Options: ReplyQuote
Re: Still problem with phpadmin import
Posted by: Otomatic (Moderator)
Date: November 27, 2015 10:22AM

Hi,

> phpAdmin v4.0.4,
Whence comes this version? It is very old.
You export with 4.3.8 and you want to import with 4.0.4, in addition, it must relate to MySQL versions very different.


Note: I am not a magician.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Still problem with phpadmin import
Posted by: FuzMic (113.210.138.---)
Date: November 27, 2015 11:49PM

Yes Otomatic, you do not realize that your prompt has magical consequences. I have updated my localhost to using phpadmin to 4.3.8 and is now in the process of matching the MySQL version. Thanks magician.

Options: ReplyQuote
Re: Still problem with phpadmin import
Posted by: FuzMic (113.210.138.---)
Date: November 28, 2015 12:25AM

I have installed phpadmin 4.3.8 BUT still there is a time out problem, now at a different file. Because of this, i now think of using wamp 2.5 (currently 2.4) but my pc is running xpwin so it is stated can't be used. Is this true?

My MAIN ISSUE NOW after importing with phpadmin 4.3.8 (with the time out problem), whenever i try to save some articles, there is an error (quoted at the end of this). Is this due to the mysql verions, currently in wamp it is 5.6.12m, Hostgator is using Server version: 5.5.42-37.1 - Percona Server (GPL), Release 37.1, Revision 727. What is your insight mate?



Error
Save failed with the following error: Duplicate entry '0' for key 'PRIMARY' SQL=INSERT INTO `xo57k_ucm_history` (`ucm_item_id`,`ucm_type_id`,`version_note`,`save_date`,`editor_user_id`,`character_count`,`sha1_hash`,`version_data`) VALUES ('26','1','','2015-11-27 23:37:19','43','13219','2a33ff2c2f0ba44d3f2fa23f29d5a2d97a39ef6f','{\"id\":26,\"asset_id\":\"158\",\"title\":\"i Learn Program\",\"alias\":\"a-ilearn\",\"introtext\":\"



Edited 1 time(s). Last edit at 11/28/2015 12:54AM by FuzMic.

Options: ReplyQuote
Re: Still problem with phpadmin import
Posted by: Otomatic (Moderator)
Date: November 28, 2015 09:47AM

Hi,

> i now think of using wamp 2.5 (currently 2.4) but my pc is running xpwin so it is stated can't be used.
Wampserver 2.5 cannot be use on Win XP.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Still problem with phpadmin import
Posted by: Otomatic (Moderator)
Date: November 28, 2015 10:59AM

Hi,


A PRIMARY KEY is a unique index, so if it contains duplicates, you cannot assign the column to be unique index, so you may need to create a new column altogether.

This may be because this column has been declared PRIMARY but you wrote it yourself (or by program) values that already exists.

Can you post the structure of the table 'xo57k_ucm_history', ie CREATE TABLE.....

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Still problem with phpadmin import
Posted by: FuzMic (113.210.139.---)
Date: November 29, 2015 12:04PM

Oto, not sure this is the way to give you the structure, First of all have to repeat, thank you.



xo57k_ucm_history
Column
Type
Null
Default
Links to
Comments
version_id (Primary)
int(10)
No 


ucm_item_id
int(10)
No 


ucm_type_id
int(10)
No 


version_note
varchar(255)
No 


Optional version name 
save_date
datetime
No 
0000-00-00 00:00:00 


editor_user_id
int(10)
No 



character_count
int(10)
No 


Number of characters in this version. 
sha1_hash
varchar(50)
No 


SHA1 hash of the version_data column. 
version_data
mediumtext
No 


json-encoded string of version data 
keep_forever
tinyint(4)
No 


0=auto delete; 1=keep 
Indexes
No index defined!
Keyname
Type
Unique
Packed
Column
Cardinality
Collation
Null
Comment
PRIMARY
BTREE
Yes
No
version_id
709
A
No

idx_ucm_item_id
BTREE
No
No
ucm_type_id
2
A
No

ucm_item_id
64
A
No
idx_save_date
BTREE
No
No
save_date
709
A
No



Edited 1 time(s). Last edit at 11/29/2015 12:04PM by FuzMic.

Options: ReplyQuote
Re: Still problem with phpadmin import
Posted by: Otomatic (Moderator)
Date: November 29, 2015 03:19PM

Hi,

In the export SQL file, you should have lines like this:

CREATE TABLE xo57k_ucm_history ....

It that structure I need.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Still problem with phpadmin import
Posted by: FuzMic (1.32.70.---)
Date: December 01, 2015 07:41AM

Dominique, not sure i understand what i am doing. I look at the exported SQL file and pasted the "create table" line for ucm_history. I did this because there is no menu option in phpadmin to export sql file.

By the way, why are you asking for this; what is the objective? I know you are great help but i think i am not assisting you enough to make it easy for you to help. Sorry & TQ.


CREATE TABLE IF NOT EXISTS `xo57k_ucm_history` (
`version_id` int(10) unsigned NOT NULL,
`ucm_item_id` int(10) unsigned NOT NULL,
`ucm_type_id` int(10) unsigned NOT NULL,
`version_note` varchar(255) NOT NULL DEFAULT '' COMMENT 'Optional version name',
`save_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`editor_user_id` int(10) unsigned NOT NULL DEFAULT '0',
`character_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Number of characters in this version.',
`sha1_hash` varchar(50) NOT NULL DEFAULT '' COMMENT 'SHA1 hash of the version_data column.',
`version_data` mediumtext NOT NULL COMMENT 'json-encoded string of version data',
`keep_forever` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=auto delete; 1=keep'
) ENGINE=InnoDB AUTO_INCREMENT=1623 DEFAULT CHARSET=utf8;



Edited 1 time(s). Last edit at 12/01/2015 07:44AM by FuzMic.

Options: ReplyQuote
Re: Still problem with phpadmin import
Posted by: Otomatic (Moderator)
Date: December 01, 2015 10:06AM

Hi,

> By the way, why are you asking for this; what is the objective?
To see what and how column(s) are declared PRIMARY.

In the file wamp/bin/mysql/mysqlx.y.z/my.ini in the section [wampmysqld], is there a line like :

sql-mode="xxxx xxxx xxxxx"

If the line exists , replace it by

sql-mode=""

If the line doesn't exist, add it under the section [wampmysqld]

then launch Wampserver and try to import the database.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Still problem with phpadmin import
Posted by: FuzMic (113.210.139.---)
Date: December 01, 2015 11:21PM

Dom

I had to add the line sql-mode = "" in the my.ini file as it is not there.

When i import the file using the same version of phpadmin as hostgator, there is this error

C:\WAMP\apps\phpMyAdmin4.3.8\libraries\dbi\DBIMysqli.class.php on line 258 ---
Why this problem??

I think the great change is: when i try to save an article there is no more error as before. --- is this what to expect?

Friend anymore fix to do. Kind regards. Salute to Socrates from PTGiLearn.com



Edited 1 time(s). Last edit at 12/01/2015 11:40PM by FuzMic.

Options: ReplyQuote
Re: Still problem with phpadmin import
Posted by: Otomatic (Moderator)
Date: December 02, 2015 05:39PM

Hi,

> When i import the file using the same version of phpadmin as hostgator, there is this error
> C:\WAMP\apps\phpMyAdmin4.3.8\libraries\dbi\DBIMysqli.class.php on line 258 ---
> Why this problem??
May be because the mysqli extension is not activated or the config file for phpMyAdmin is not configured to use mysqli.

> when i try to save an article there is no more error as before. --- is this what to expect?
Yes. It is because with sql-mode = "" there is no STRICT MODE.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Still problem with phpadmin import
Posted by: FuzMic (---.72.49.60.jb02-home.tm.net.my)
Date: December 09, 2015 06:23AM

Thank you for your reply.

Options: ReplyQuote


Sorry, only registered users may post in this forum.