Guest Posted March 2, 2007 Share Posted March 2, 2007 I've tried in vain to search these forums for anybody else who has had this problem but difficult to know exactly how to word the search. In a nutshell I have semi successfully migrated a heavily modified installation from one server to another. The site now functions exactly as it used to, all files are present and all goods for sale and settings etc are working. Everything except admin/customers.php And even here, it partially works. There are 87 entries in the database in the customers table. But the admin page to view these customers only shows the first 82. I can see the details of the missing 5 customers by browsing the DB, but the admin section just won't show them. There is only one OsC DB on the server. includes/configure.php is reading the correct DB (There's only one to view anyway) I've run the backup SQL numerous times, both in its entirety and in sections. No good! But then, the DB is correct. Problem isn't there. I don't think so anyway. Problem MUST be in customers.php but I have searched in vain for some part of the code that might limit how many records it reads. Can't find anything. The ONLY thought I've had, which makes no sense....is that I backed up the DB on numerous occassions because I never knew exactly when the DNS redirection was going to take place. It's as if the site is reading one of my earlier backups, which didn't include these last 5 customers. But..... The DB on the server HAS the missing five. Like I said.... a mystery. To me anyway. Please, please, pretty please. Somebody make a suggestion where to look next. This is a live shop and 5 customers are dangling in limbo Link to comment Share on other sites More sharing options...
Guest Posted March 2, 2007 Share Posted March 2, 2007 the customers.php script interrogates the customers, address_book and customers_info tables (and not just the customers sql table). If a customers_id is not present with the other tables it wont show up. So you need to verify those 5 that they have valid entries in the other tables Link to comment Share on other sites More sharing options...
Guest Posted March 3, 2007 Share Posted March 3, 2007 Thank you enigma1, I wasn't aware of the customers_info table being involved. I've double checked what I could see in all 3 tables. My memory was wrong in my initial post. There are a total of 8 missing customers. Their customer id numbers are 181 through to 188 inclusive. In the customers table, in the customers_id column, all missing entries are present. As is, all the other relevant details that I am able to check In the customers_info table, in the customers_info_id column, all relevant numbers appear. I'm not able to confirm the other columns as they are merely dates etc, but in the customers_info_date_account_created column which should have one per customer, there APPEARS to be 2 missing. Going on the number of entries that appears in admin/customers.php plus the missing 8 In the address_book_id column of the address_book table, only 181 and 182 appear. 183 to 188 are missing. In the customers_id column of the same table, all missing 8 appear. In the entry_lastname column, all missing entries are present and accounted for Would it seem you may have found the answer in the address_book_id column ? Or have I misunderstood your suggestion? Please be aware of 2 things. Firstly, my knowledge of PhP is minimal. Sometimes when I look back at what I have accomplished with no knowledge astounds me. Second, the list below of the contributions I have installed only shows about half. Keeping the list up to date never seemed important until now. Any one of these mods may have impacted on my problem. And I thank you for your help. May it continue until we solve this thing. Link to comment Share on other sites More sharing options...
Guest Posted March 3, 2007 Share Posted March 3, 2007 ok so in your customers_info table I presume you mean all rows are there but the customers_info_date_account_created column has 2 entries left blank or null. In the customers table the customers_default_address_id must point to a valid entry in the address_book table. That entry is represented by the address_book_id column. In other words for each customer between the customers table and address_book table you must have a match between the tables such that: customers_default_address_id (from customers table) = address_book_id (from address_book table) this is critical. So for those missing customers check if this is the case. Other entries that appear in the address book table are considered secondary entries. The matching one is the primary. Link to comment Share on other sites More sharing options...
Guest Posted March 5, 2007 Share Posted March 5, 2007 ok so in your customers_info table I presume you mean all rows are there but the customers_info_date_account_created column has 2 entries left blank or null. Ah no. Not quite. Actually, my error I was confusing the address book id's with the customer id's In the customers table the customers_default_address_id must point to a valid entry in the address_book table. That entry is represented by the address_book_id column. In other words for each customer between the customers table and address_book table you must have a match between the tables such that: customers_default_address_id (from customers table) = address_book_id (from address_book table) Trying to follow your instructions as carefully as I can, I have browsed both the customers and address book tables. Yes there is a corresponding entry to all customers. Including the missing 8. I have confirmed that the customers_default_address_id (from customers table) does in fact equal the address_book_id (from address_book table) Hopeing this new doesn't lead you to say you can't help then...... Have you any other ideas where my problem may lay? Thinking back for some kind of clue to this I am reminded of the first rule of thumb when dealing with any PC problem. If re-booting doesn't fix it, think of what you have changed or altered. In my case, I dowloaded all the files via FTP and backed up the database via Admin. I then made a new database with appropriate user name etc and ran the SQL backup file. And uploaded all the files. We had gone from a server where our primary domain was domainname.org with domainname.net as an add-on domain to another where only domainname.net exists. Therefore....the database was originally named domainnameorg_osc1 was the new one domainnamenet_osc1 That's it....that's the one and only change. Domain name itself didn't change. Only the domain. Obviously the config file was editted to show the new domain name. I'm still stumped. Are you? Link to comment Share on other sites More sharing options...
Guest Posted March 5, 2007 Share Posted March 5, 2007 I've just noticed something. In thinking that the problem must lay within admin/customers.php I decided to upload a freash copy.....again! But hey! When you don't know the answer...try anything. The copy on my server is 63443 bytes in size. When I upload a fresh copy, my FTP program asks the usual question. "File already exists. Do you wish to overwrite: customers.php 63443 bytes with customers.php 64763 bytes" I click on yes, but the new copy still has only 63443 bytes and if I repeat the process, the exact same message appears. Is it possible the file is corrupting on upload? Link to comment Share on other sites More sharing options...
radders Posted March 5, 2007 Share Posted March 5, 2007 If there are items missing from actual database tables on upload it could be because of invalid characters in the data. It is possible to have stuff in the database that will work fine until you dump it and reload it. I don't know if you regularly check your database tables using phpmyadmin and repair them where necessary. Indexes etc. can get corrupted. This regular maintenance also can help spot errors before they become too major. Link to comment Share on other sites More sharing options...
worldwidetrading Posted March 5, 2007 Share Posted March 5, 2007 Have you changed the configure.php file in shop/admin/includes/? Based on OsCommerce 2.2 MS2 - Mods Including: Customer Approval, STS Template System, OS-CMS, Sage Line 50 Sync, Locate a Stockist, Auto Thumbnailer, Easy Populator, Visitors Stats, Extra Images, Header Tags Controller, Unsold Cart, Products w/o Description/Prices/Images Reports, Backup Customers Table, Login to See Prices. Full customised products_info.php page. OSC Links Manager. Minimum Order Amount. Visitor Web Stats. Google Sitemap. All products page (user sitemap). The OsCommerce Site is hosted on 1 domain with 20 feeder domains extracting data from OS-CMS & the shop catalogue. If you would like to view my website in relation to any of my posts you can google my forum username to find my URL or add a (dot)co(dot)uk to the end of it. Link to comment Share on other sites More sharing options...
worldwidetrading Posted March 5, 2007 Share Posted March 5, 2007 Have you changed the configure.php file in shop/admin/includes/? Based on OsCommerce 2.2 MS2 - Mods Including: Customer Approval, STS Template System, OS-CMS, Sage Line 50 Sync, Locate a Stockist, Auto Thumbnailer, Easy Populator, Visitors Stats, Extra Images, Header Tags Controller, Unsold Cart, Products w/o Description/Prices/Images Reports, Backup Customers Table, Login to See Prices. Full customised products_info.php page. OSC Links Manager. Minimum Order Amount. Visitor Web Stats. Google Sitemap. All products page (user sitemap). The OsCommerce Site is hosted on 1 domain with 20 feeder domains extracting data from OS-CMS & the shop catalogue. If you would like to view my website in relation to any of my posts you can google my forum username to find my URL or add a (dot)co(dot)uk to the end of it. Link to comment Share on other sites More sharing options...
Guest Posted March 6, 2007 Share Posted March 6, 2007 Have you changed the configure.php file in shop/admin/includes/? Yes, I have. The mystery of this thing is that the database appears ok. All info is there. But for some reason, a very few members that are defintely in the DB and visible in PhPMyAdmin, are not appearing in OsC Admin. The shop appears generally, to be connecting to the DB properly. Link to comment Share on other sites More sharing options...
Guest Posted March 6, 2007 Share Posted March 6, 2007 Thank you for your suggestion Radders. No, I didn't repair the DB prior to backup. Wasn't aware such was recommended. I will add this to my backup regime. Have done so now of course but no change. Question....Would such invalid characters be visible in the DB now if such as you suggest happened? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.