osCmax v2.5 User Manual
Results 1 to 8 of 8

Can't Create Account

This is a discussion on Can't Create Account within the osCmax v2 Installation issues forums, part of the osCmax v2.0 Forums category; I'm getting this error when creating account from guest cart: Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource ...

      
  1. #1
    New Member
    Join Date
    Apr 2010
    Posts
    29
    Rep Power
    0


    Default Can't Create Account

    I'm getting this error when creating account from guest cart:

    Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in /mnt/w0801/d37/s07/b00e48fc/www/PJBOUTIQUE/catalog/includes/functions/database.php on line 114

    Warning: Cannot modify header information - headers already sent by (output started at /mnt/w0801/d37/s07/b00e48fc/www/PJBOUTIQUE/catalog/includes/functions/database.php:114) in /mnt/w0801/d37/s07/b00e48fc/www/PJBOUTIQUE/catalog/includes/functions/general.php on line 34

    Also I found a similar thread here in the forum but couldn't post there because the thread was 'CLOSED'.

    Thanks for any help!

    UPDATE: Actually looks like it is creating the account but that's not going to make much difference when my customers see that error page. Why is the error appearing? How to fix?
    Last edited by bethbud; 04-20-2010 at 06:14 PM. Reason: update

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Can't Create Account

    Can't reproduce the error on a clean install, so how about you give a step by step as to what you are doing leading up to the error and what exactly you do to get the error.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    New Member
    Join Date
    Apr 2010
    Posts
    29
    Rep Power
    0


    Default Re: Can't Create Account

    The error is appearing when going through the steps a regular customer would to create an account in the shop. I was testing the shop- using it as a regular customer would.

    Some changes I've made since clean install:
    *changed admin folder name
    *limited htaccess to my own IP address



  4. #4
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Can't Create Account

    Link to the site so I can test? It is not a problem with the osCmax package, it is specific to your installation.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  5. #5
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Smile Re: Can't Create Account

    Line 114 of database.php is:

    Code:
     
        function tep_db_insert_id($link = 'db_link') {
        global $$link;
        return mysql_insert_id($$link);
      }
    So I strongly suspect you have a database setup issue.

    Regards,
    pgmarshall
    _______________________________

  6. #6
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Can't Create Account

    You have 2 options:

    1. Turn of warnings to the screen (only go to logfile, which is what you should have on production sites).

    2. Apply this fix: r221 - oscmax2 - Project Hosting on Google Code
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  7. #7
    New Member
    Join Date
    Apr 2010
    Posts
    29
    Rep Power
    0


    Default Re: Can't Create Account

    I don't understand. Sorry, I have very limited knowledge of all this.
    If I've only installed the program and made the suggested security changes, why would this cause so many problems?

    1. Turn of warnings to the screen (only go to logfile, which is what you should have on production sites).
    Where do I do this? What is 'production sites?

    Why is my site totally down now? I'm getting this on the index page:
    Fatal error: Call to a member function add_current_page() on a non-object in /mnt/w0801/d37/s07/b00e48fc/www/PJBOUTIQUE/catalog/includes/application_top.php on line 350


  8. #8
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Smile Re: Can't Create Account

    bethbud,

    Simply open the file shown in the bugtraker ...

    ie. catalog/includes/functions/database.php

    And edit the line shown in the bugtraker ... ie.

    Replace
    Code:
     return mysql_insert_id($$link);
    With
    Code:
    return mysql_insert_id();
    At line 114.

    Regards,
    pgmarshall
    _______________________________

Similar Threads

  1. Possible Bug In Create Account
    By jmdesign in forum osCMax v2 Features Discussion
    Replies: 4
    Last Post: 03-13-2010, 03:18 PM
  2. Admin Create Account 1.0
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 12-17-2009, 06:01 PM
  3. create account
    By jschafer52 in forum osCMax v2 Features Discussion
    Replies: 1
    Last Post: 06-15-2007, 07:38 AM
  4. Why can't create a new account ?
    By kellycog in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 06-29-2004, 09:58 AM
  5. Create Account,Checkout,My Account, Language Pictures probs!
    By Mikey in forum osCommerce 2.2 Installation Help
    Replies: 0
    Last Post: 03-08-2004, 10:20 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •