Forums / All Other Contributions/Addons / OsCommerce Data Importer - Errors

OsCommerce Data Importer - Errors

Views: 37,960

Results 61 to 80 of 252
26 Sep 2008, 3:29 PM
#61
digidiva_kathy avatar

digidiva_kathy

Zen Follower

Join Date:
May 2006
Posts:
323
Plugin Contributions:
0

OsCommerce Data Importer - Errors

Not sure what you mean. I've never had this problem before with any cart I've installed (and I have done quite a few) and the only thing about this one that is unique is this import. I don't think any of these were set up manually, they imported the entire database from OSCommerce and that is what set up the categories as far as I know.

26 Sep 2008, 3:47 PM
#62
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: OsCommerce Data Importer - Errors

Not seeing the input records of categories I am guessing that there is a bad charter in a field.
Look at the input data for "Designer Resources/Comm. Use" which woks but then "Extended Use Licenses" which is bad so I would look around these records to see if there is some bad data.

If you need to pm me the input sql data and I will look at it.

• 446F63746F722057686F •

27 Dec 2008, 6:15 AM
#63
gisco avatar

gisco

New Zenner

Join Date:
Nov 2008
Posts:
12
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

Hello, all,

I tried to apply this OsCommerce Data Importer but meet difficulties of characteres cannot be copied to the new database.

My Database includes UTF8 characters, and it seems to be typical "UTF8 in ADODB" problem.

Normally, use set names query like this once when firstly connect to DB to solve this problem, but I have no skill to write script.

---- sample -----

somewhat and somewhere need to write something like this:
================================================== ==========
$db->Connect( $dbhost, $dbuser, $dbpasswd, $dbname );
// Make sure any results we retrieve or commands we send use the same charset and collation as the database:
$db_charset = $db->Execute( "SHOW VARIABLES LIKE 'character_set_database'" );
$db->Execute( "SET NAMES '" . $db_charset->fields['Value'] . "'" )
$db_charset->Close(); // Optional
================================================== ==========
Resources:
http://phplens.com/lens/lensforum/topics.php?id=4
http://adviesenzo.nl/examples/php_mysql_charset_fix/

note: this was copied from PAP suport forum, but the nature is the same. This error is quite a lot for scripts from "Lain1" countries...

Is it possible to rewrite some code to apply this???

Or is there anyone who can show me where to change in the OSC data importer???

Thank you!

27 Dec 2008, 4:31 PM
#64
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: OsCommerce Data Importer - Errors

gisco

This mod is not using ADODB it is using traditional mysql.
So the script would look like this.

mysql_query("set names 'utf8'",$con);

Find the connect sql lines .

$connected = mysql_connect($target_db_host, $target_db_username, $target_db_password);

And change to this.

$connected = mysql_connect($target_db_host, $target_db_username, $target_db_password);
mysql_query("set names 'utf8'",$con);

I have not tested let us know if this worked.

• 446F63746F722057686F •

2 Jan 2009, 7:30 PM
#65
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

This will make my life much easier! However when trying to import customers and/or oders the export freezes before import happens, there's no error message it just stops. How to fix this? Importing products works just fine.

Here's what the end of my page looks like:

Starting Exportation of osCommerce testDB Data Base
Exporting Customers ...

.......................................................................................................................................................................................................200 -|
.......................................................................................................................................................................................................400 -|
.......................................................................................................................................................................................................600 -|
.......................................................................................................................................................................................................800 -|
.......................................................................................................................................................................................................1000 -|
.......................................................................................................................................................................................................1200 -|
.......................................................................................................................................................................................................1400 -|
.......................................................................................................................................................................................................1600 -|
.......................................................................................................................................................................................................1800 -|
.......................................................................................................................................................................................................2000 -|
.......................................................................................................................................................................................................2200 -|
.............................2229 -|

Done 2229 Records Exported
Exporting Address Book ...
.......................................................................................................................................................................................................200 -|
.......................................................................................................................................................................................................400 -|
.......................................................................................................................................................................................................600 -|
.......................................................................................................................................................................................................800 -|
.......................................................................................................................................................................................................1000 -|
.......................................................................................................................................................................................................1200 -|
.......................................................................................................................................................................................................1400 -|
.......................................................................................................................................................................................................1600 -|
.......................................................................................................................................................................................................1800 -|
.......................................................................................................................................................................................................2000 -|
.......................................................................................................................................................................................................2200 -|
.................................................................................................................................................................................................2393 -|

Done 2393 Records Exported
Exporting Customers Info ...
.......................................................................................................................................................................................................200 -|
.......................................................................................................................................................................................................400 -|
.......................................................................................................................................................................................................600 -|
.......................................................................................................................................................................................................800 -|
.......................................................................................................................................................................................................1000 -|
.......................................................................................................................................................................................................1200 -|
.......................................................................................................................................................................................................1400 -|

2 Jan 2009, 9:40 PM
#66
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: OsCommerce Data Importer - Errors

Not seeing the input records of Customers Info I am guessing that there is a bad charter in one of the records around 1400 and up.

With phpmyadmin look at the table customers_info and see if there is any bad data above record 1400.

Bad data could be as simple as a ' that would upset the array content.

• 446F63746F722057686F •

10 Jan 2009, 8:56 AM
#67
gisco avatar

gisco

New Zenner

Join Date:
Nov 2008
Posts:
12
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

skipwater:

gisco

This mod is not using ADODB it is using traditional mysql.
So the script would look like this.

mysql_query("set names 'utf8'",$con);

> 
> Find the connect sql lines .
> ```
$connected = mysql_connect($target_db_host, $target_db_username, $target_db_password);

And change to this.

$connected = mysql_connect($target_db_host, $target_db_username, $target_db_password);
mysql_query("set names 'utf8'",$con);

> 
> I have not tested let us know if this worked.


Hello, thank you for the info. I have been working on this code but still not get desired result. I will try also changing some configuration of mysql.

Need more time to report the result...
10 Feb 2009, 9:44 PM
#68
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: OsCommerce Data Importer - Errors

My Database includes UTF8 characters, and it seems to be typical "UTF8 in ADODB" problem.
gisco
Here is a fix for storing data in mysql with the utf8 Character Set.

Find the following two lines that start with. (there are more then one set in each script fix all of them)

	$connected = mysql_connect( 
	$dataopened = mysql_select_db(

Add this line below them

	mysql_set_charset('utf8',$connected);

I should look like this:

	$connected = mysql_connect(
	$dataopened = mysql_select_db(
	mysql_set_charset('utf8',$connected);

If you need other then utf8 character coding just replace utf8 with the required character code.

Skip

• 446F63746F722057686F •

12 Feb 2009, 5:23 AM
#69
kaddie avatar

kaddie

New Zenner

Join Date:
Feb 2009
Location:
In the Woods of Texas
Posts:
63
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

When trying to switchover customer from OSC to ZC it starts from 200 and ends at 5200. The next line I get is this:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 16 bytes) in /home/xxxxx.com/public_html/import_osc_customers.php on line 251

Any help would be apreciated.

Kaddie

12 Feb 2009, 2:14 PM
#70
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: OsCommerce Data Importer - Errors

kaddie:

When trying to switchover customer from OSC to ZC it starts from 200 and ends at 5200. The next line I get is this:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 16 bytes) in /home/xxxxx.com/public_html/import_osc_customers.php on line 251

Any help would be apreciated.

Kaddie

If you have a Shared Hosting account you need, if you don't have already, a 'php.ini' file which is put in your DOCUMENT ROOT dir.

In it, add the following statement:

memory_limit = 16M

Try the above setting and keep doubling till the error msg. goes away.

Skip

• 446F63746F722057686F •

12 Feb 2009, 6:49 PM
#71
kaddie avatar

kaddie

New Zenner

Join Date:
Feb 2009
Location:
In the Woods of Texas
Posts:
63
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

skipwater:

If you have a Shared Hosting account you need, if you don't have already, a 'php.ini' file which is put in your DOCUMENT ROOT dir.

In it, add the following statement:

memory_limit = 16M

Try the above setting and keep doubling till the error msg. goes away.

Skip

Thank you Skip that worked. However It completes exporting but when importing customers I get an sql error noted below.

Importing Customers ...
.......................................................................................................................................................................................................200 -|
.................................................................................................................................................................................................You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[email protected]', customers_default_address_id = '507', customers_teleph' at line 7

What can I do to dismiss this problem?

Help is appreciated,
Kaddie

12 Feb 2009, 8:20 PM
#72
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: OsCommerce Data Importer - Errors

Importing Customers ...
................................................................................ ................................................................................ .......................................200 -|
................................................................................ ................................................................................ .................................You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[email protected]', customers_default_address_id = '507', customers_teleph' at line 7

What can I do to dismiss this problem?

Do you have Magic Quotes ON?
My guess is that you have magic quotes off.

If this is unknown to you below these two lines about line 320

	// Test access and connect to source data base
	$connected = mysql_connect(
	$dataopened = mysql_select_db(

add this code it will test and set magic quotes

	// Test Magic Quotes
	    if(get_magic_quotes_gpc()) {
	    	echo 'Magic Quotes = ON'; 
        } else {
	    	echo 'Magic Quotes = OFF';
	    	echo '<br />I will turn Magic Quotes ON';
	        set_magic_quotes_runtime(true);
			if(get_magic_quotes_gpc()) {
				echo 'Magic Quotes NOW ON';
			} else {
				echo 'Magic Quotes FAILED';
			}
        }

You should also place the code above this line about 530.

echo 'Starting Importation of osCommerce Data Into <b>'.$target_db.'</b> Zen Cart Data Base<br />';

• 446F63746F722057686F •

12 Feb 2009, 8:22 PM
#73
kaddie avatar

kaddie

New Zenner

Join Date:
Feb 2009
Location:
In the Woods of Texas
Posts:
63
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

kaddie:

Thank you Skip that worked. However It completes exporting but when importing customers I get an sql error noted below.

Importing Customers ...
.......................................................................................................................................................................................................200 -|
.................................................................................................................................................................................................You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[email protected]', customers_default_address_id = '507', customers_teleph' at line 7

What can I do to dismiss this problem?

Help is appreciated,
Kaddie

My own server stats:

PHP Version: 5.2.8
Database: MySQL 5.0.67

13 Feb 2009, 2:43 AM
#74
kaddie avatar

kaddie

New Zenner

Join Date:
Feb 2009
Location:
In the Woods of Texas
Posts:
63
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

skipwater:

do you have magic quotes on?
My guess is that you have magic quotes off.

If this is unknown to you below these two lines about line 320

// test access and connect to source data base
$connected = mysql_connect(
$dataopened = mysql_select_db(
> add this code it will test and set magic quotes
> ```
	// test magic quotes
	    if(get_magic_quotes_gpc()) {
	    	echo 'magic quotes = on'; 
        } else {
	    	echo 'magic quotes = off';
	    	echo '<br />i will turn magic quotes on';
	        set_magic_quotes_runtime(true);
			if(get_magic_quotes_gpc()) {
				echo 'magic quotes now on';
			} else {
				echo 'magic quotes failed';
			}
        }

you should also place the code above this line about 530.

echo 'starting importation of oscommerce data into <b>'.$target_db.'</b> zen cart data base<br />';


the page already has some magic quote info already in it.
13 Feb 2009, 2:58 AM
#75
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: OsCommerce Data Importer - Errors

Are the magic quotes on?

You could pm me a couple customer records around the customers_default_address_id = '507' to see what is in the record that the script dislikes.

Skip

• 446F63746F722057686F •

13 Feb 2009, 5:03 AM
#76
kaddie avatar

kaddie

New Zenner

Join Date:
Feb 2009
Location:
In the Woods of Texas
Posts:
63
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

skipwater:

Are the magic quotes on?

You could pm me a couple customer records around the customers_default_address_id = '507' to see what is in the record that the script dislikes.

Skip

I just got thru with installing the orders, products and metatags. All went fine. I am just stuck on the customers. The page I should look at is the admin/customers.php for line 507 correct or maybe not?

Kaddie

13 Feb 2009, 6:06 AM
#77
kaddie avatar

kaddie

New Zenner

Join Date:
Feb 2009
Location:
In the Woods of Texas
Posts:
63
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

skipwater:

Are the magic quotes on?

You could pm me a couple customer records around the customers_default_address_id = '507' to see what is in the record that the script dislikes.

Skip

Magic quotes are on. I finally got it. Now all info is in zc. There was an apostrophe in that customers email address. I removed it and walla!

Thanks for helping me research the issue.

kaddie :clap:

13 Feb 2009, 1:54 PM
#78
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: OsCommerce Data Importer - Errors

Glad that it worked out for you.

Skip

• 446F63746F722057686F •

20 Feb 2009, 1:08 PM
#79
igrossiter avatar

igrossiter

New Zenner

Join Date:
Feb 2009
Location:
Brazil
Posts:
43
Plugin Contributions:
1

Re: OsCommerce Data Importer - Errors

hi, i'm having the folliwng problem, when i use the import_osc_produtcs.php, i got everything done, but the products don't show on my site, i can see them on the database records, an on the sidebox of my site, but when i click on them, says that the product can't be found. what can i do?
Thank you for the help and sorry about my poor english.

http://casasnossasenhoradosprazeres.com/loja
is my zencart store

Artigos Religiosos Católicos Casas N. Sra. dos Prazeres
http://lojasnsp.com.br

20 Feb 2009, 2:30 PM
#80
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: OsCommerce Data Importer - Errors

igrossiter:

hi, i'm having the folliwng problem, when i use the import_osc_produtcs.php, i got everything done, but the products don't show on my site, i can see them on the database records, an on the sidebox of my site, but when i click on them, says that the product can't be found. what can i do?
Thank you for the help and sorry about my poor english.

http://casasnossasenhoradosprazeres.com/loja
is my zencart store

The site link you supplied is no good. Could you resubmit the link.

Skip

• 446F63746F722057686F •