MyBB Community Forums

Full Version: [TUTORIAL]Integrate Twitter Logins with MyBB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
I am running myBB 1.4.11 and am getting the same Fatal error as Walkman listed below.

I have a dedicated server running PHP 5.2.13, sqlite 3.3.6-5, and Apache 2.2.

Fatal error: Call to a member function fetchSingle() on a non-object in /home/*****/public_html/walkman/callback.php on line 70

The error is shown upon returning to callback.php.

I tried upgrading to PHP 5.3.1 and it then it generated this error:

Deprecated: Function split() is deprecated in /home/truth/public_html/twitterOAuth/OAuth.php on line 719

Deprecated: Function split() is deprecated in /home/truth/public_html/twitterOAuth/OAuth.php on line 723

Deprecated: Function split() is deprecated in /home/truth/public_html/twitterOAuth/OAuth.php on line 723

Deprecated: Function split() is deprecated in /home/truth/public_html/twitterOAuth/OAuth.php on line 723

Deprecated: Function split() is deprecated in /home/truth/public_html/twitterOAuth/OAuth.php on line 723

Fatal error: Uncaught exception 'SQLiteException' with message 'SQLiteDatabase::__construct() [<a href='sqlitedatabase.--construct'>sqlitedatabase.--construct</a>]: unable to open database: /home/truth/public_html/twtusers.db' in /home/truth/public_html/callback.php:65 Stack trace: #0 /home/truth/public_html/callback.php(65): SQLiteDatabase->__construct('./twtusers.db') #1 {main} thrown in /home/truth/public_html/callback.php on line 65

Any thoughts on what the problem might be?
(2010-06-17, 07:20 PM)mark-in-dallas Wrote: [ -> ]I am running myBB 1.4.11 and am getting the same Fatal error as Walkman listed below.

I have a dedicated server running PHP 5.2.13, sqlite 3.3.6-5, and Apache 2.2.

Fatal error: Call to a member function fetchSingle() on a non-object in /home/*****/public_html/walkman/callback.php on line 70

The error is shown upon returning to callback.php.

I tried upgrading to PHP 5.3.1 and it then it generated this error:

Deprecated: Function split() is deprecated in /home/truth/public_html/twitterOAuth/OAuth.php on line 719

Deprecated: Function split() is deprecated in /home/truth/public_html/twitterOAuth/OAuth.php on line 723

Deprecated: Function split() is deprecated in /home/truth/public_html/twitterOAuth/OAuth.php on line 723

Deprecated: Function split() is deprecated in /home/truth/public_html/twitterOAuth/OAuth.php on line 723

Deprecated: Function split() is deprecated in /home/truth/public_html/twitterOAuth/OAuth.php on line 723

Fatal error: Uncaught exception 'SQLiteException' with message 'SQLiteDatabase::__construct() [<a href='sqlitedatabase.--construct'>sqlitedatabase.--construct</a>]: unable to open database: /home/truth/public_html/twtusers.db' in /home/truth/public_html/callback.php:65 Stack trace: #0 /home/truth/public_html/callback.php(65): SQLiteDatabase->__construct('./twtusers.db') #1 {main} thrown in /home/truth/public_html/callback.php on line 65

Any thoughts on what the problem might be?

The first error should only happen when PHP5 and SQLite is missing. The second group of errors stems from PHP 5.3 still being fairly new(a few days short of a year I believe) and the scripts were not coded on it(I use a 5.2 version) so it is complaining about code that uses old functions.
(2010-06-17, 07:26 PM)afrothunder Wrote: [ -> ]The first error should only happen when PHP5 and SQLite is missing. The second group of errors stems from PHP 5.3 still being fairly new(a few days short of a year I believe) and the scripts were not coded on it(I use a 5.2 version) so it is complaining about code that uses old functions.

I do have both PHP 5 and sqlite on my server, and get the same error messages with both the Twitter and Windows Live logins.

Do you know what version of sqlite your server is running. I'm wondering if 3.3.6-5 might not support the fetchSingle() query

I went back to PHP 5.2.13, cause 5.3 was causing issues on another site too.
(2010-06-17, 08:54 PM)mark-in-dallas Wrote: [ -> ]Do you know what version of sqlite your server is running. I'm wondering if 3.3.6-5 might not support the fetchSingle() query

I believe I have 3.3.7.
I'm pretty sure 3.3.6-5 is the latest, at least that's what yum told me when I checked to make sure it was compiled.

I'm going to install a fresh copy of myBB on a freebie server, and see if I can get the logins to work on that install. If so I'll have to look to see if I can't figure out anything else that needs compiling.

If you wouldn't mind taking a look and seeing if maybe you see something else that I need, I'll include a link to view my current Apache configuration.

Current config
http://www2.sqlite.org/oldnews.html

Has 3.3.7 from way back in August 2006 has latest at 3.6.17.

You might want to look into that.

Also in your configure arguments you have:
Quote:--with-pdo-sqlite=shared
--with-sqlite=shared

I'm not sure if it will make a difference but Screeze's server has:
Quote:--with-sqlite
--enable-sqlite-utf8
instead.
Fatal error: Call to undefined method MyLanguage::sprintf() in /home1/tutoria3/public_html/surfnlearn/forum/callback.php  on line 180

why would i get this error?

Everything seems to be working fine if I remove it but if I login from the same twitter account again it still keeps saying you've logged in from this twitter account the first time and creates a new account every time..
Ok, I managed to get both the Twitter and Windows Live logins working. The problems I had were due to permission settings of the public_html directory, it was set to 755 and needed to be chmoded to 777 to allow the db files to be written.

Another problem I was having was that I did not use the mybb_ prefix when I setup the database and had to remove it from all the posts to the userfields table.

Windows Live now works beautifully. I am having another problem with the Twitter login though, in that once a user logs in with Twitter if they try to use it again, instead of being logged in and redirected to index.php they are taken to the callback.php page and are not able to login, as they get a that username is already in use message.

Any thoughts on why this might be?
(2010-06-20, 02:49 AM)mark-in-dallas Wrote: [ -> ]Windows Live now works beautifully. I am having another problem with the Twitter login though, in that once a user logs in with Twitter if they try to use it again, instead of being logged in and redirected to index.php they are taken to the callback.php page and are not able to login, as they get a that username is already in use message.

Any thoughts on why this might be?

Try clearing cookies, cache, etc. If that doesn't work try PMing me for contact info to work on fixing that.
Got both the Twitter and Windows Live logins working perfectly now.

All the problems were my fault, and the only things I have to say to insure that you can get them working too, is to make sure the permisssions on your public_html directory are set to 777, if you're not using the mybb_ prefix on your database, change the settings in the callabck.php file to reflect you database tables, make sure you created the Custom Profile Fields and Templates and have created the apps in Twitter and Azure. And that should allow the connects to work just fine.

Excellent job afrothunder!!!
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14