Hi!
My problem = I can't get twitterbridge to work at my 1.0.1 install.
This is what and how i did.
I first registered an app at twitter and enabled it in config.php like this
addPlugin(
'TwitterBridge',
array(
'consumer_key' => 'blahblah_key_blahblah',
'consumer_secret' => 'blahbla_secret_blahblablahblah'
)
);
Then made a restart of apache to clear memcached and executed scripts/checkschema.php.
But still I get these errors when trying to start scripts/startdaemons.sh.
example...
[root@myserver /statusnet ]# sh scripts/startdaemons.sh
Starting /statusnet/plugins/TwitterBridge/daemons/synctwitterfriends.php...
Fatal error: Uncaught PEAR_Exception: DB Error: no database selected in unknown on line unknown
DB_Error: DB Error: no database selected in unknown on line unknown
#0 [internal function]: PEAR_ErrorToPEAR_Exception(Object(DB_Error))
#1 /statusnet/extlib/PEAR.php(890): call_user_func('PEAR_ErrorToPEA...', Object(DB_Error))
#2 /statusnet/extlib/DB.php(966): PEAR_Error->PEAR_Error('DB Error: no da...', -14, 16, 'PEAR_ErrorToPEA...', 'SELECT * ? FROM...')
#3 /statusnet/extlib/PEAR.php(531): DB_Error->DB_Error(-14, 16, 'PEAR_ErrorToPEA...', 'SELECT * ? FROM...')
#4 /statusnet/extlib/DB/common.php(1908): PEAR->raiseError(NULL, -14, NULL, NULL, 'SELECT * ? FROM...', 'DB_Error', true)
#5 /statusnet/extlib/DB/mysqli.php(928): DB_common->raiseError(-14, NULL, NULL, NULL, '2006 ** MySQL s...')
#6 /statusnet/extlib/DB/mysqli.php(387): DB_mysqli->mysqliRaiseError(-14)
#7 /statusnet/extlib/DB/common.php(1216): DB_mysqli->simpleQuery('SELECT * ? FROM... in /statusnet/lib/framework.php on line 163
DONE.
Starting /statusnet/plugins/TwitterBridge/daemons/twitterstatusfetcher.php...
Fatal error: Uncaught PEAR_Exception: DB Error: no database selected in unknown on line unknown
DB_Error: DB Error: no database selected in unknown on line unknown
#0 [internal function]: PEAR_ErrorToPEAR_Exception(Object(DB_Error))
#1 /statusnet/extlib/PEAR.php(890): call_user_func('PEAR_ErrorToPEA...', Object(DB_Error))
#2 /statusnet/extlib/DB.php(966): PEAR_Error->PEAR_Error('DB Error: no da...', -14, 16, 'PEAR_ErrorToPEA...', 'SELECT * ? FROM...')
#3 /statusnet/extlib/PEAR.php(531): DB_Error->DB_Error(-14, 16, 'PEAR_ErrorToPEA...', 'SELECT * ? FROM...')
#4 /statusnet/extlib/DB/common.php(1908): PEAR->raiseError(NULL, -14, NULL, NULL, 'SELECT * ? FROM...', 'DB_Error', true)
#5 /statusnet/extlib/DB/mysqli.php(928): DB_common->raiseError(-14, NULL, NULL, NULL, '2006 ** MySQL s...')
#6 /statusnet/extlib/DB/mysqli.php(387): DB_mysqli->mysqliRaiseError(-14)
#7 /statusnet/extlib/DB/common.php(1216): DB_mysqli->simpleQuery('SELECT * ? FROM... in /statusnet/lib/framework.php on line 163
DONE.
_________________________________________________
I recently upgraded to statusnet 1.0.1 and my database is a updated version of 0.9.7 db.
As said, I have already tried checkschema.php and upgrade.php.
If anyone knows how to fix this, Please let me know! <3<br />
/emp
Comments
I have the same problem. Any clue ?
fran'
My environment included running the site in php-cgi but running daemons (of course) through php-cli, under later versions of Ubuntu.
The default settings for mysqli.reconnect in /etc/php5/cgi/php.ini was:
mysqli.reconnect = On
while the CLI version of PHP had:
mysqli.reconnect = Off
Setting the PHP5 CLI .ini to have mysqli reconnect enabled fixed the issue of the scripts disconnecting from the database, which I believe may be your problem too!
----
Also if you have odd vhost paths you should see if you might have the same problem as I did with % and the function 'printf' in startdaemons.sh (I just changed it to echo, or it reported a bunch of jibberish)
errors look like:
PHP Fatal error: Uncaught PEAR_Exception: DB Error: already exists in unknown on line unknown
#0 [internal function]: PEAR_ErrorToPEAR_Exception(Object(DB_Error))
#1 /var/www/status/extlib/PEAR.php(890): call_user_func('PEAR_ErrorToPEA...', Object(DB_Error))
#2 /var/www/status/extlib/DB.php(966): PEAR_Error->PEAR_Error('DB Error: alrea...', -5, 16, 'PEAR_ErrorToPEA...', 'INSERT INTO for...')
#3 /var/www/status/extlib/PEAR.php(531): DB_Error->DB_Error(-5, 16, 'PEAR_ErrorToPEA...', 'INSERT INTO for...')
#4 /var/www/status/extlib/DB/common.php(1908): PEAR->raiseError(NULL, -5, NULL, NULL, 'INSERT INTO for...', 'DB_Error', true)
#5 /var/www/status/extlib/DB/mysqli.php(928): DB_common->raiseError(-5, NULL, NULL, NULL, '1062 ** Duplica...')
#6 /var/www/status/extlib/DB/mysqli.php(402): DB_mysqli->mysqliRaiseError()
#7 /var/www/status/extlib/DB/common.php(1216): DB_mysqli->simpleQuery('INSERT INTO for...')
#8 /var/www/status/extlib/DB/DataObject.php(2550): DB_common->query('INSERT INTO for...')
#9 /var/www/status/classes/Memcached_D in /var/www/status/lib/framework.php on line 172
Today I dumped the db, then ran some experimental mysql queries while writing a script to delete posts older than 3 months (http://tonyb.us/cm to keep db from growing infinitely and conserve storage), and at one point deleted all posts (doh!). Then I restored from the dump, and it is after this that I am seeing these errors.
I have up-to-date code, pulled from gitorious today.
Lately it is constantly giving this error:
PHP Fatal error: Function name must be a string in /var/www/status/plugins/TwitterBridge/twitterimport.php on line 436
line 436 of said file is simply:
common_log(LOG_WARNING, $id() .
Part of this function:
417 function saveAvatars($user, $id)
418 {
419 global $config;
420
421 $path_parts = pathinfo($user->profile_image_url);
422 $ext = $path_parts['extension'];
423 $end = strlen('_normal' . $ext);
424 $img_root = substr($path_parts['basename'], 0, -($end+1));
425 $mediatype = $this->getMediatype($ext);
426
427 foreach (array('mini', 'normal', 'bigger') as $size) {
428 $url = $path_parts['dirname'] . '/' .
429 $img_root . '_' . $size . ".$ext";
430 $filename = 'Twitter_' . $user->id . '_' .
431 $img_root . "_$size.$ext";
432
433 if ($this->fetchAvatar($url, $filename)) {
434 $this->newAvatar($id, $size, $mediatype, $filename);
435 } else {
436 common_log(LOG_WARNING, $id() .
437 " - Problem fetching Avatar: $url");
438 }
439 }
440 }