Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problems with easy populate


TimD

Recommended Posts

i managed to upload the file the instructions said to upload, and set the temp file permissions to 777.

 

each time i try to upload the product file of mine it throws out this error:

 

File uploaded. 

Temporary filename: /tmp/phpHV8ZhM

User filename: DFLSTOCK.txt

Size: 73308

ERROR! - Too many characters in the model number.

12 is the maximum on a standard OSC install.

Your maximum product_model length is set to 12

You can either shorten your model numbers or increase the size of the field in the database.

 

i've changed what i think to be the products_model field in the products table of the database to the size of 100 varchars. and yet it still throws out this erorr.

 

please help

 

Tim [/code]

Link to comment
Share on other sites

i managed to upload the file the instructions said to upload, and set the temp file permissions to 777.

 

each time i try to upload the product file of mine it throws out this error:

 

File uploaded. 

Temporary filename: /tmp/phpHV8ZhM

User filename: DFLSTOCK.txt

Size: 73308

ERROR! - Too many characters in the model number.

12 is the maximum on a standard OSC install.

Your maximum product_model length is set to 12

You can either shorten your model numbers or increase the size of the field in the database.

 

i've changed what i think to be the products_model field in the products table of the database to the size of 100 varchars. and yet it still throws out this erorr.

 

please help

 

Tim [/code]

 

EasyPopulate does it's own checking of the length. There is a variable in easypopulate.php that you can change to tell EP how big your product_model field is. Look for a line like this:

// set this to the size of your model number field in the db.  We check to make sure all models are no longer than this value.

// this prevents the database from getting fubared.

global $modelsize;

$modelsize = 12;

and change the modelsize to whatever your db has. Then it should work fine

 

Tim

Link to comment
Share on other sites

Thanks to Tim I realized that all I had to do when trying to deal with that problem is ensure that I was running 2.1. Make sure that you upload the new easypopulate.php file and hopefully all will be well.

 

-Chris

Chris Sullivan

Link to comment
Share on other sites

I encoutered the same problem, exceeding the default modelsize = 12. I changed the variable to 15 and it worked fine during the upload of the database file, but then the database is not functing properly during the checking of existing product. It treats some of the existing product (the ones exceeding 12 char) as new product and creates a new entry in the database.

 

Patrick.

Link to comment
Share on other sites

I encoutered the same problem, exceeding the default modelsize = 12.  I changed the variable to 15 and it worked fine during the upload of the database file, but then the database is not functing properly during the checking of existing product.  It treats some of the existing product (the ones exceeding 12 char) as new product and creates a new entry in the database.  

 

Patrick.

 

It sounds like at some point an upload succeeded enough to put the stuff into the db with truncated product_model numbers. So the complete longer numbers of course don't match the shorter numbers.

 

If you can, just use phpmyadmin to delete everything from the products and products_to_categories tables, then reimport with EP, and then things should be good to go.

 

Tim

Link to comment
Share on other sites

I figured out the solution. There is one additional step that needs to be done inorder to make all of this to work. I login in phpmyadmin, and edit the product_model variable size from 12 to 15.

 

Patrick

Link to comment
Share on other sites

I figured out the solution.  There is one additional step that needs to be done inorder to make all of this to work.  I login in phpmyadmin, and edit the product_model variable size from 12 to 15.

 

Patrick

 

Yes, that would have done it, because the numbers would get truncated before they'd go in.

 

Glad it's working for you now.

 

Tim

Link to comment
Share on other sites

  • 2 months later...

I have carefully read your documentation and I JUST downloaded the latest MS1 release tonight. I found that indeed the default product_model field size is 12 in the OSC stock database and I changed it to 32. BUT when I edited easypopulate.php file I found it said 100! Based on all the posts to this forum, wouldn't that cause problems because EasyPopulate is thinking it can push a 100 character field through, but the DB was still set up for 12? I changed my EasyPopulate config file to be 32 as well, but based on the documentation it seems confusing that this should work "out of the box" without causing major problems. I am IGNORANT still, so forgive me if I missed something!!

 

Also if I had set the field in the Db to 32 and left EP alone, would I have been fine if my product_model would have never exceeded 32 characters, or would I have gotten an error because EP wants to match with the 100 it's been set for?

 

Thanks!

Idahoan

Link to comment
Share on other sites

It would have been ok as long as you never went over the 32. And in the documentation it does say to change the number to match what you have in your database, The default number was set so high because so many people had longer model numbers and it was causing lots of problems :)

 

So go ahead and use it, you should be fine.

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

I am trying to figure out what is going on with EP, so I tried to split the file, and it gets WORSE!!

 

*******************************

Easy Populate 2.41beta7 - Default Language : English(1)

 

Warning: Unable to create '/catalog/temp/test.txt': No such file or directory in /home/solvers1/isaiah54-www/catalog/admin/includes/functions/general.php on line 789

 

Warning: Unable to move '/tmp/phpJ0O5Jf' to '/catalog/temp/test.txt' in /home/solvers1/isaiah54-www/catalog/admin/includes/functions/general.php on line 789

 

Warning: fopen("/catalog/temp/test.txt", "r") - No such file or directory in /home/solvers1/isaiah54-www/catalog/admin/easypopulate.php on line 665

 

Warning: fgets(): supplied argument is not a valid File-Handle resource in /home/solvers1/isaiah54-www/catalog/admin/easypopulate.php on line 668

Creating file EP_Split1.txt ...

Warning: fopen("/catalog/temp/EP_Split1.txt", "w+") - No such file or directory in /home/solvers1/isaiah54-www/catalog/admin/easypopulate.php on line 674

 

Warning: fwrite(): supplied argument is not a valid File-Handle resource in /home/solvers1/isaiah54-www/catalog/admin/easypopulate.php on line 675

 

Warning: fgets(): supplied argument is not a valid File-Handle resource in /home/solvers1/isaiah54-www/catalog/admin/easypopulate.php on line 678

Added 0 records and closing file...

 

 

Warning: fclose(): supplied argument is not a valid File-Handle resource in /home/solvers1/isaiah54-www/catalog/admin/easypopulate.php on line 704

 

Warning: fclose(): supplied argument is not a valid File-Handle resource in /home/solvers1/isaiah54-www/catalog/admin/easypopulate.php on line 705

You can download your split files in the Tools/Files under /catalog/temp/

 

*******************************

 

Any suggestions??

I can read instructions!!

Link to comment
Share on other sites

Just for the heck of it I created a directory called /catalog/tmp/ and CHMOD 777.

 

The error is slightly different, but similar:

 

*****************************

Warning: Unable to create '/catalog/temp/test.txt': No such file or directory in /home/solvers1/isaiah54-www/catalog/admin/includes/functions/general.php on line 789

 

Warning: Unable to move '/tmp/phpKxCGf4' to '/catalog/temp/test.txt' in /home/solvers1/isaiah54-www/catalog/admin/includes/functions/general.php on line 789

 

 

File uploaded.

Temporary filename: /tmp/phpKxCGf4

User filename: test.txt

Size: 35510

 

Warning: file("/catalog/temp/test.txt") - No such file or directory in /home/solvers1/isaiah54-www/catalog/admin/easypopulate.php on line 621

 

Warning: Invalid argument supplied for foreach() in /home/solvers1/isaiah54-www/catalog/admin/easypopulate.php on line 625

 

Upload complete

 

******************************

 

Let the GURUS arise!!!

Jay

Link to comment
Share on other sites

Did you check the "temp" vs. "tmp" issue yet???? It appears to be trying to write to "temp" and read from "tmp"

 

How many products are you trying to upload?

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

Actually Tim helped me by telling me to look at DIR_FS_DOCUMENT_ROOT in my configure.php files. This had just ' ' rather than the proper /home/solvers1/htdocs/ path statements BECAUSE when I did the install I had to leave the first box BLANK to avoid the DOUBLE URL problem I was getting on the installation.

 

There must be a bug somewhere, because I followed the instructions to the letter, but it took me 3 hours to get the thing to install by trial and error, mostly error!! The issue is only with shared servers it seems, Tim says his dev stores have not this problem!!

 

Now my FILE MANAGER doesn't work, but I will post that on another topic.

Thanks!

Jay

Link to comment
Share on other sites

I finally got my Easy Populate to work on MY server. It was really weird, nothing worked except this:

 

In the easypopulate.php just down from all the comments there is a default setting:

$tempdir = "/catalog/temp/";

$tempdir2 = "catalog/temp/";

 

I COULD NOT get File Manager to work AND EP, so I went back and got File Manager to work and then I carefully analyzed why I was getting the double slashes and double paths. Now my setting here reads:

$tempdir = "//";

$tempdir2 = "catalog/temp/";

 

I have a query into Tim to find out what the $tempdir2 is for, it doesn't seem to be used unless the script can't find the first one.

 

I AM WORKING, but I don't know what will happen on other servers!

Thanks!

Jay

Link to comment
Share on other sites

There are 3 files that affect all the path statements concerning File Manager and Easy Populate that I have had to study a bunch to finally get it right.

NOTE: My admin is UNDER my catalog = /catalog/admin on the server.

 

:oops: :oops: :oops: :oops:

I HAD EP working then I made a bunch of changes to my /admin/configure.php to get file manager working and posted my last comments BEFORE I went back and tested EP. Now this is what I really have, and I have tested EVERYTHING 3 times to make sure:

 

Settings in /catalog/admin/configure.php

define('DIR_FS_DOCUMENT_ROOT', '/home/solvers1/isaiah54-www/catalog'); NOTE there is no trailing "/"

define('DIR_WS_ADMIN', '/catalog/admin/');

define('DIR_FS_ADMIN', '/home/solvers1/isaiah54-www/catalog/admin/');

define('DIR_WS_CATALOG', '/catalog/');

define('DIR_FS_CATALOG', '/home/solvers1/isaiah54-www/catalog/');

 

Settings in /admin/easypopulate.php

$tempdir = "/temp/";

$tempdir2 = "/catalog/temp/";

 

Settings in /catalog/configure.php (I never touched these, but here is how I discovered that I had an extra trailing "/" in /catalog/admin/configure.php

define('DIR_FS_DOCUMENT_ROOT', '/home/solvers1/isaiah54-www');

define('DIR_FS_CATALOG', '/home/solvers1/isaiah54-www/catalog');

[/b]

 

THIS DID NOT AFFECT /images as stated in another post, I am able to upload through the file manager there! I would like to know HOW to log in the admin script as the OWNER like you do in an FTP program so I don't have to deal with the permissions all the time!

 

Whew, I wish all this had been posted before I started!

Good Luck!

Jay :P :P :P

Link to comment
Share on other sites

I have a question regarding EP.

My site is a download only site..

I can download the txt file and use access to add items.. Is is possible to add the filename for the download into this txt file too?

That would make my life so much easier..

 

This really is a great mod..

 

Thanks for your help

 

Tracy

Link to comment
Share on other sites

  • 2 weeks later...
I have a question regarding EP.

My site is a download only site..  

I can download the txt file and use access to add items.. Is is possible to add the filename for the download into this txt file too?

That would make my life so much easier..

 

This really is a great mod..

 

Thanks for your help

 

Tracy

 

It's very doable, there are three places to change in EP: The download queries, the file layout, and the upload (insert) queries.

 

I keep meaning to come up with a cool way to abstract this out nicely, but no time so far....

 

Tim

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...