Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Affiliate Sign up gives DB Error


Guest

Recommended Posts

Anyone have any idea why I would be getting the following error when trying to create an Affiliate account?

 

1044 - Access denied for user: '[database user]@localhost' to database '[database]'

 

LOCK TABLES affiliate_affiliate WRITE

 

[TEP STOP]

 

When I go into MYSQL and look at the affiliate_affiliate table I can NOT browse it or look around within this Table. Which leads me to beleave that it is locked. I tried the UNLOCK TABLES; Command which appears that it works (message said it works). However the table remains locked. Has anyone else had this problem? I am running 6.1 with a fresh install. You can view this here:

 

www.wholesalemn.com/new

 

Please let me know what you guys think.

Link to comment
Share on other sites

Check the script code to ensure that it is not issuing a table lock for some reason.

 

Also try removing the table lock with the mysql root user and then see if you can browse the table.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Check the script code to ensure that it is not issuing a table lock for some reason.

 

Also try removing the table lock with the mysql root user and then see if you can browse the table.

 

DJ - Thank you for the response. I am sure that the code is not locking the table as this is a Fresh install of CRELoaded 6.1 and NO ONE else is having this problem. I also tried to unlock the table with the root user and it will not unlock. Someone was saying this may be related to SQL 4.1 however I am running MySQL 4.0.18 so I am thinking this is not related. Is there any other reason this could be locked...

Link to comment
Share on other sites

I have the exact same problem. I have dropped all tables only to reinstall them with the same problem. I also used different versions of OSC Affiliate with the same problem. I can add banners through the admin and see the stats page. Any other ideas on what might be happening?

 

 

 

1044 - Access denied for user: 'xxxxxx@localhost' to database 'xxxxx'

 

LOCK TABLES affiliate_affiliate WRITE

 

[TEP STOP]

Link to comment
Share on other sites

I am sure that the code is not locking the table as this is a Fresh install of CRELoaded 6.1

For support with the CRELoaded application you should ask in the CRELoaded forums.

Search Google for the URL (it's not oscommerce.com) and they should be able to help you with their product.

HTH,

Robert

Link to comment
Share on other sites

I was able to fix the problem, although it may not be the best fix. The problem lies in catalog/includes/functions/affiliate_functions.php.

 

I removed the following:

 

Line 22- // LOCK TABLES

Line 23- tep_db_query("LOCK TABLES " . TABLE_AFFILIATE . " WRITE");

 

and

 

Line 46- // UNLOCK TABLES

Line 47- tep_db_query("UNLOCK TABLES");

 

I imagine by removing these lines and assuming you have 2 people signing up as an affiliate and they both submit the application at the same time it may cause problems, otherwise it works fine. Maybe someone else can figure out what the exact problem is but in the meantime this works for me.

Link to comment
Share on other sites

  • 1 month later...
I was able to fix the problem, although it may not be the best fix.  The problem lies in catalog/includes/functions/affiliate_functions.php.

 

I removed the following:

 

Line 22-  // LOCK TABLES

Line 23-      tep_db_query("LOCK TABLES " . TABLE_AFFILIATE . " WRITE");

 

and

 

Line 46-  // UNLOCK TABLES

Line 47-    tep_db_query("UNLOCK TABLES");

 

I imagine by removing these lines and assuming you have 2 people signing up as an affiliate and they both submit the application at the same time it may cause problems, otherwise it works fine.  Maybe someone else can figure out what the exact problem is but in the meantime this works for me.

 

FYI - we've seen a number of these problems and they seem to be related to a change in default privileges between mySQL 3.x and 4.x series server installs. A quick check of the Server Info can confirm this and contacting your host's Tech Support may be a better solution if they will cooperate with your need to lock the tables from time to time.

 

David

Link to comment
Share on other sites

FYI - we've seen a number of these problems and they seem to be related to a change in default privileges between mySQL 3.x and 4.x series server installs.  A quick check of the Server Info can confirm this and contacting your host's Tech Support may be a better solution if they will cooperate with your need to lock the tables from time to time.

 

David

 

 

I did contact the host but no luck, they claim its a security risk. At any rate I have had so many problems with them as soon as my term expires I am moving to a new host. Thanks for the input

Link to comment
Share on other sites

  • 3 weeks later...

Short of removing the lock code from the php file, has anyone identified a good solution to this problem? I'm having the same error.

 

I'm so close to having this thing work...

 

There's another osc site on my db server that seems to work just fine. I can't tell whether they just deleted the lock code, or what....

 

Thanks,

Ken

Link to comment
Share on other sites

Disregard my last post. I just had the db administrator change the permissions to allow table locking and that cleared up the problem. It definitely is just a mysql settings issue.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...