Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

osTicket-v1.9.15 Prefix already in-use



Hi everyone,

I imported the existing database of OS from the current hosting to a new hosting. While installing, I encountered an error message that says, Prefix is already in-use. On my control panel, I have two databases together. The 2nd database does not have this prefix.

I changed the first database's prefix and still get the similar message. I hit F5 and retype the info with all over again. This time I changed the prefix. Nothing work. Please help. Thank you for your time.
Tagged:

Comments

  • By default osTicket uses ost_ as it's prefix.  If you used a custom pre-fix you will need to manually edit the /include/ost-config.php file to specifcy the DB credentials and prefix.  You should not be running the installer after importing the DB you should tailor the config to use the existing imported DB then go to the site.
  • Can you provide me an example if I use a custom pre-fix, which line do I edit the file?

    # Table prefix
    define('TABLE_PREFIX','%CONFIG-PREFIX');

    Thanks!
  • The line that you just added to your post.
  • That's it. Thanks so much!
  • It says I installed this successfully.  Just curious, as 4:11pm, it show an interface with this big text.

    Support Ticket System Offline

  • It appears that you have the system in offline mode and are going to the User side.
    To change it you would go to the admin side and log in as an admin.

    hint: 
    add /scp to the URL that you are going to.
  • Good morning Ntozier,
    I put the scp to the URL and it brings me to a new page with this message, "Valid CSRF Token Required".
    I don't have a token.So what do I do next?
  • Clear your browser cache and cookies.  And try again.

    The CSRF token is part of the login page and send from the server to ensure that the login attempt is a. recent and b. came from the server.
  • I cleaned up my cache. I still get that message. Also, I tried Chrome and Firefox without any success. What's next?
  • No ideas other than:
    Do a fresh installation.
    Restore your old DB over the new one.

    Alternatively you could invest in Professional Installation or Commercial Support.
  •  Now we are moving to a new hosting and downloaded the latest version here. This is my second time to install OS. Thought I was  an expert, I will try to install again. Thanks for your time. Keep you posted soon.
  • This is still bugging.  We never figure the answer out. What triggered this message at the beginning. We have a problem - another installation with same table prefix exists!

    I have installed the DB first, then OS. If OS picked up the table prefix from this DB, then this popups up my mind, in t theory, I should install the DB last, therefore OS will never pick this up. Right?  Then my problem is solved, I think so.
  • You haven't included any environment information about your old host, or your new host. 

    You should install osTicket first, .
    let it create a new empty DB, 
    then as @ntozier said, 
    restore your old DB over the new one.


  • Hey there
    I am back :-)

    Follow what you said,  this time I installed the latest version successfully.  Told my coworker to sign in and he got an access denied message.
    1. Is it possible to have two OS running and received this message?

    Thanks!
  • edited March 10
    Did you copy your /include/ost-config.php from the old server to the new server?

    Or did you edit the new one?  If you edited the new one, copy the old one.

    I really think that you need to start over.  Drop both databases and delete the dbuser.  remove both installations.

    Create a new database (with the same name as the old one on the old server).
    Create a new dbuser (with the same name as the old on on the old server).
    Give the DB user privs on the new DB.
    Import the database from the old server.
    Install the code from the archive.
    copy the /include/ost-config.php from the old server and put it on the new.
    Browse to the site on the new server.
  • edited March 10
    I started over with a new installation, given user privs and renamed DB with the new name and new user.
    Lastly, I didn't copy the old os-config file from the over server and put it on the new one

    • Create a new database (with the same name as the old one on the old server).I will definitely do  this one next
    • Create a new dbuser (with the same name as the old on on the old server).
      I will definitely do  this one next
    • Give the DB user privs on the new DB.
    • Import the database from the old server.
    • Install the code from the archive  What do you mean archive?
    • copy the /include/ost-config.php from the old server and put it on the new. I will definitely do  this one next
    • Browse to the site on the new server.
  • Q: Install the code from the archive  What do you mean archive? 
    A: the archive that you downloaded from osticket.com/download. Copy the files from the upload folder and put it where you want them on your server.
  • edited March 20
    I imported the old database and get this message. What does this mean?

    Error

    SQL query:


    --
    -- Dumping data for table `ost_api_key`
    --
    INSERT INTO `ost_api_key` ( `id` , `isactive` , `ipaddr` , `apikey` , `updated` , `created` )
    VALUES ( 1, 1, '192.168.1.5', 'siri!', '2013-01-11 12:11:23', '2013-01-11 12:11:23' ) ;



    MySQL said: Documentation


    #1062 - Duplicate entry '1' for key 'PRIMARY'
  • I know most previous contact detail didn't import so I am guessing something is missing under Ost_API_key. Was it table?
  • It means that the record already exists.
  • Hey Ntozier,
    Your instruction from March 10:
    1. Create a new database (with the same name as the old one on the old server).
    2. Create a new dbuser (with the same name as the old on on the old server). 
    3. Give the DB user privs on the new DB.
    4. Import the database from the old server.
    5. Install the code from the archive 
    6. copy the /include/ost-config.php from the old server and put it on the new. 
    7. Browse to the site on the new server.

    Here's the result.
    I followed your instruction exactly. When I reach step 5, I encountered a message "Ost_ is being used" so I typed Ost2_ and then I hit continue to finish off the installation.  Maybe importing the database too soon?

    I clicked the link from email, signed in and then created a ticket.  After 2 minutes I signed out and then  signed back in, I get this message|access denied".

    This time, I imported the database after the OS installation. I didn't get the OS_is being used message this time. However,I get the access denied message again when I signed in.


    On download page, there are two options. I used osTicket Core, v1.9.15. Did I use the wrong version?





  • There is no way that you are getting that error...  That error can only occurs when you visit the site in a web browser, not when you are copying files in the file system.
  • Well It happened.  Any other suggestion?
  • Copying files at the file-system level (via FTP client, or the copy command. or dragging and dropping) could not possibly produce that error.  So go back and do it again. You do not open a web browser until step 7.
  • Hi Ntozier,

    I appreciate  your time. Thank you!
    Before I do it again, I need some clarification.
    1.  From your step by step instruction, it's okay if I added ost2 because it was trigger to ask. You still think it's fine?
    2. I always downloaded OS core 1.9, not OS Core 1.0. That's still okay right?
    3.  You previously said,   That error can only occurs when you visit the site in a web browser, not
    when you are copying files in the file system.

    That error was only occur when I visited my site in a web browser both times. Why is that?
  • Q: 1.  From your step by step instruction, it's okay if I added ost2 because it was trigger to ask. You still think it's fine?
    huh?  You are the only person that has mentions ost2.  I have no idea what you are talking about.

    Q: 2. I always downloaded OS core 1.9, not OS Core 1.0. That's still okay right?
    You can use which ever version you want to use.  I would recommend 1.10 over 1.9 personally.

    Q: That error was only occur when I visited my site in a web browser both times. Why is that?
    because you are visiting the web site before you have completed the steps.
Sign In or Register to comment.