Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4338370
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:04:21+00:00 2026-05-21T11:04:21+00:00

I am in the midst of getting OAuth support set up on a shared

  • 0

I am in the midst of getting OAuth support set up on a shared server. The server side PHP OAuth library I am trying to install is this one:

http://code.google.com/p/oauth-php/downloads/list

And I am following the installation notes found here:

http://code.google.com/p/oauth-php/wiki/ConsumerHowTo

In the notes there was a tip to use an SQL script found in install package to set up the tables and databases for you. When I tried executing the script via the Import (SQL) feature found in phpMyAdmin, I got a “Key Too Long” error on one of the tables. In other words, I ran smack into the maximum key length limitation found when using MySQL/InnoDB tables.

To get around this problem I replaced all instances of “charset=utf8” for “charset=latin1” since utf8 requires 3 bytes per character and latin1 is 1 byte per character. The script executed fine and all tables were created correctly.

As far as I can see, all the fields used in the tables don’t require support of multi-byte international characters. The only way I could see a problem developing is if one of the OAuth connected services I access use international characters in their consumer key or secret, and I have not run into that situation at all so far.

Can anyone tell me if this workaround will bite me in the backside at anytime and where that might be? Also, if anyone has a better solution to fixing the “key too long” problem without sacrificing the use of the utf8 character set I’d like to know about it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T11:04:22+00:00Added an answer on May 21, 2026 at 11:04 am

    Technically, all strings must first be utf8-encoded before urlencoding. See the OAuth 1.0 spec section 5.1: All parameter names and values are escaped using the [RFC3986] percent-encoding (%xx) mechanism. Characters not in the unreserved character set ([RFC3986] section 2.3) MUST be encoded. Characters in the unreserved character set MUST NOT be encoded. Hexadecimal characters in encodings MUST be upper case. Text names and values MUST be encoded as UTF-8 octets before percent-encoding them per [RFC3629].

    So if you have any Latin-1 characters that aren’t also ASCII (bit 7=0) then you’ll have to re-encode the strings as UTF-8 after pulling them from the db and before using them in the OAuth protocol.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in the midst of converting a VB library to C#. One of
I am in the midst of setting up the development environment (PHP/MySQL) for my
holla guys i am midst of creating a php web apps where it allows
I'm trying to use the NSDate dateFromString method but I'm getting an warning and
I'm in the midst of trying to use a UIScrollView and there appears to
I'm in the midst of moving a site from plain old php to the
I am in the midst of refactoring my database to support an upgrade to
Sorry if this question doesn't make any sense. I'm currently in the midst of
I'm in the midst of trying to get my first website up and running
We are in the midst of transitioning from asp, vbscript, SQL Server 2000, to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.