shris Posted June 21, 2003 Posted June 21, 2003 Hi. I'm very new to all this. That said, I have been searching the forums for other folks who have no error but no success uploading, and I didn't find anything. I could be looking in the wrong place, but if not, here's what I have. I have a very basic, very new test install of the latest snapshot of OSCommerce. Downloaded the latest Easy Populate last week, got it installed OK. Successfully downloaded a file containing three test products. First, being ambitious, I added a bunch of stuff (maybe 15 new products) and deleted the three that were originally in the file using Excel 97. Saved to tab-delimited txt. Tried to upload. No error messages, just a blank screen with Easy Populate at the top, not even returning to the three upload options. Thought I might be too ambitious, so I downloaded the same three test products (a 'complete' download, mind you). Edited just the description using notepad. Tried to upload. No error message, just a blank screen with the Easy Populate title. Things I have checked: * Existence of Temp directory confirmed. Security confirmed, tested it by having EP download a file to that same Temp directory (worked fine). * Entered a model number. First just a bogus number (unique per product) with a single digit, then tried three digits in case one wasn't enough. * Even tried deleting the three test products using the GUI and freshly uploading the same file I downloaded previously. No good. No error message, just a blank screen. I am working with lists of just three products, so I would hope that timeouts aren't a problem. Further, the test server is on my local 100Mbit LAN, so network latency problems are probably not entering into the equation. I think I have successfully ruled out Excel as a source of corrupting characters, since Notepad didn't give me any better results. I don't think Notepad inserts anything weird, never had any trouble with it in other tasks.. One question I had about special characters--the text file I downloaded includes things like HTML paragraph marks. I assume it would download in the format it would want to see on upload, but that might not be the case. Do greater-than and less-than characters require something else to 'buffer' them during the upload? Does anyone have any clues about what could be wrong? Is this documented somewhere that I just didn't see? shris Quote
loxly Posted June 21, 2003 Posted June 21, 2003 There are several threads about easy populate that contain everything you need to know to get it working. I also suggest reading all the files that came in the package, not just the readme. Quote [no external urls in signatures please, kthanks]
shris Posted June 21, 2003 Author Posted June 21, 2003 After having fiddled with the code in easypopulate.php to make it tell me a little more about where it's failing, I have come to the conclusion that the problem lies somewhere in here: <?php if ($localfile or (is_uploaded_file($usrfl) && $split==0)) { //******************************* //******************************* // UPLOAD AND INSERT FILE //******************************* //******************************* echo "I'm starting now!"; echo "trying to upload usrfl " . $usrfl . "<br>"; if ($usrfl){ // move the file to where we can work with it $file = tep_get_uploaded_file('usrfl'); if (is_uploaded_file($file['tmp_name'])) { tep_copy_uploaded_file($file, DIR_FS_DOCUMENT_ROOT . $tempdir); } echo "<p class=smallText>"; echo "File uploaded. <br>"; echo "Temporary filename: " . $usrfl . "<br>"; echo "User filename: " . $usrfl_name . "<br>"; echo "Size: " . $usrfl_size . "<br>"; // get the entire file into an array $readed = file(DIR_FS_DOCUMENT_ROOT . $tempdir . $usrfl_name); } echo "trying to upload localfile " . $localfile . "<br>"; if ($localfile){ // move the file to where we can work with it $file = tep_get_uploaded_file('usrfl'); if (is_uploaded_file($file['tmp_name'])) { tep_copy_uploaded_file($file, DIR_FS_DOCUMENT_ROOT . $tempdir); } echo "<p class=smallText>"; echo "Filename: " . $localfile . "<br>"; Actually, to be more precise, the problem lies in this subset: $file = tep_get_uploaded_file('usrfl'); if (is_uploaded_file($file['tmp_name'])) { tep_copy_uploaded_file($file, DIR_FS_DOCUMENT_ROOT . $tempdir); That's not to say I think the problem lies in *this* code--I don't. I think my OSCommerce install must be having trouble with the functions in that little section. What I don't know is where those functions come from in a recent snapshot of OSCommerce. I know the EP docs talk about using the _functions file if you have an early snapshot--but I don't. So what file do the tep_get_uploaded_file, is_uploaded_file, and tep_copy_uploaded_file come from in the newer snapshots? Perhaps I can check those files and see if they've been damaged somehow. shris Quote
loxly Posted June 22, 2003 Posted June 22, 2003 YOU tell EP where your temp dir is located in the easypopulate.php file after the change log and at the beginning of user configuration. Quote [no external urls in signatures please, kthanks]
shris Posted June 22, 2003 Author Posted June 22, 2003 Yeah, I know that. That part is working. What I asked was where the three functions came from--which files include the code for those functions? I've been searching for them, and I'm obviously not looking in the right place. Furthermore, it's the tep_get_uploaded_file that appears to be the stopping point. I've inserted echoes in before and after, and the ones after never show up. So something is wrong there--I don't know what. When I uncomment the section that enables the easypopulate_functions include, I don't even get a drawn page to *do* an upload or download. I don't have an older snapshot, so I'm not supposed to need that anyway. One thing I *have* found about temp files is this: the one that I tell it to use--/catalog/temp/--is working just fine. The tep_get_uploaded_file appears to be attempting to start the move process that moves the file temporarily to another location--in the portion of the code that's commented "move the file to a place we can work on it". I've had it echo back to me where it's trying to put those files, and the location exists with valid security, but the files don't show up. But without any error messages and without knowing exactly what the function is supposed to do, I'm having a rough time figuring out why. Anyway, my web designer and I have decided to scrap this installation and start fresh to see if maybe something in the installation process (both of OSCommerce and EasyPopulate) went wrong without telling us. shris Quote
jbrolin Posted August 20, 2004 Posted August 20, 2004 Hi Kristina! I have a similair problem as you. I think it has something to do with that the server runs php 4.1.2 where register globals is off... on my previous (lousy) server it worked, but now when transfered to a new fast server I can't upload any files... the variables $usrfl_name and $localfile is empty. Have you solved the issue? Regards Jonas Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.