Hello guys!
I've recently installed a fresh 1.1.0-alpha1 statusnet instance on my server,
http://status.cat/. It works perfectly under PHP-FPM 5.4 and a NGINX (engine-x) web server, the web interface doesn't give any errors at all. I've also activated a few plug-ins through config.php, as follows:
-- config.php --
<?php<br />if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
$config['site']['name'] = 'Status.cat';
$config['site']['server'] = 'status.cat';
$config['site']['path'] = false;
$config['site']['logdebug'] = false;
$config['site']['logfile'] = '/var/log/statusnet/statuscat.log';
$config['site']['theme'] = 'neo-light';
$config['site']['fancy'] = true;
$config['daemon']['user'] = "http";
$config['daemon']['group'] = "http";
$config['daemon']['piddir'] = "/var/run/statusnet/";
$config['db']['database'] = 'mysqli://___:___@localhost/___';
$config['db']['type'] = 'mysql';
$config['queue']['enabled'] = true;
$config['site']['profile'] = 'public';
$config['public']['localonly'] = false;
$config['sms']['enabled'] = false;
$config['twitter']['enabled'] = true;
$config['twitterimport']['enabled'] = true;
$config['integration']['source'] = 'statuscat';
$config['admin']['panels'][] = 'twitter';
addPlugin('InProcessCache');
addPlugin('Memcached');
addPlugin('Gravatar');
addPlugin('InfiniteScroll');
addPlugin('WikiHashtags');
addPlugin('SubMirror');
addPlugin('LinkPreview');
addPlugin('Blacklist');
addPlugin('TwitterBridge', array(
'consumer_key' => '_______________',
'consumer_secret' => '__________________________________'));
addPlugin('recaptcha', array('private_key' => '____________________',
'public_key' => '___________________________________',
'display_errors' => true));
addPlugin('Autocomplete');
addPlugin('TabFocus');
--
They all work. The problem I'm having with TwitterBridge is that for some reason, "sudo -u http php scripts/getvaliddaemons.php" only gives imdaemon.php and queuedaemon.php, making scripts/startdaemons.sh forget about the twitter ones. As an ugly work-around to this problem, I made a backup of getvaliddaemons.php and added manually the three under plugins/TwitterBridge/daemons/, but they won't get daemonized. No errors are thrown in the shell.
Any idea as to why would this happen? TwitterBridge was enabled after I switched to 5.4, so I don't know if that's the problem. Although since everything else seems to work flawlessly, I suppose there's something I'm doing wrong. Posts from status.cat get forwarded correctly to twitter, by the way. The app in twitter has full read/write access.
Thanks!
P.S. I don't want to start new threads, but here are two quick questions:
1. My linode machine runs their kernel, which doesn't include /dev/urandom, thus bringing OpenID unusable. I tried using /dev/random and even /dev/null in its php file, but to no luck. Any workaround available?
2. The InifiniteScroll plugin works, but the icon won't show up. This error is thrown:
"GET /mvdan/allplugins/InfiniteScroll/ajax-loader.gif HTTP/1.1" 404 1532 "http://status.cat/"
Why is it looking under /mvdan/allplugins instead of /plugins? I'm confused.
Comments
I don't know anyone who is using PHP 5.4 yet (except possibly @jpope). He's also running the alpha version of SN. Hopefully, he or someone else who is using these versions knows what is going on.
One question: What distro are you using?
I am currently at a loss as to why getvaliddaemons.php doesn't pick up the twitter daemons. I do only have two twitter related daemons that run on my instance, The twitterdaemon.php script doesn't daemonize for me at all, maybe try removing that one from getvaliddaemons.php and see if that helps.
I just looked at status.cat and it looks that the InfiniteScroll is working (ajax-loader.gif loads for me), did you fix this or do you still get the error? The times that I've had that plugin running, my httpd error log gets hammered with errors. Instead of the InfiniteScroll, I've just increased the number of notices that show per page.
@Hmm, at this time your link seems to be down. Nevertheless, all we were talking about is mentioned in this thread.
[EDIT] Hah, took me so long to write this comment that it works now.
About the ajax plugin thing... Darn it. It is not the server, it's my browser. Now that I look at it from Firefox, it works. It doesn't from dwb. Definitely not statusnet's issue :)
And just to make sure there was nothing I messed up, yesterday night I deleted both database and directory, restarted mysql and flushed memcached. Fresh install once again, copying back config.php after /install.php was run. But the same issues are not gone.
I'll just go ahead and post here all my poking around with php:
# Getting daemons
[root@linode] [/srv/http/mvdan/statuscat]
# sudo -u http scripts/checkschema.php
[root@linode] [/srv/http/mvdan/statuscat]
# sudo -u http scripts/getvaliddaemons.php
/srv/http/mvdan/statuscat/scripts/queuedaemon.php
/srv/http/mvdan/statuscat/scripts/imdaemon.php
# Same as running "sudo -u http scripts/startdaemons.sh"
[root@linode] [/srv/http/mvdan/statuscat]
# sudo -u http php scripts/queuedaemon.php && php scripts/imdaemon.php
[root@linode] [/srv/http/mvdan/statuscat]
# ps aux | grep -i php
root 19980 0.0 1.0 228772 5448 ? Ss May20 0:01 php-fpm: master process (/etc/php/php-fpm.conf)
http 19981 0.0 8.3 242820 41584 ? S May20 0:46 php-fpm: pool www
http 19982 0.0 7.3 238956 36844 ? S May20 0:45 php-fpm: pool www
http 24689 0.2 3.2 211740 16188 pts/0 S 12:11 0:00 php scripts/queuedaemon.php
http 24690 0.0 3.2 212020 16456 pts/0 S 12:11 0:00 php scripts/queuedaemon.php
http 24694 0.0 3.1 211236 15644 pts/0 S 12:11 0:00 php scripts/imdaemon.php
http 24695 0.0 3.1 211512 15948 pts/0 S 12:11 0:00 php scripts/imdaemon.php
http 24697 0.0 3.2 212020 16452 pts/0 S 12:11 0:00 php scripts/queuedaemon.php
http 24699 0.0 3.2 212020 16452 pts/0 S 12:11 0:00 php scripts/queuedaemon.php
http 24701 0.0 3.2 212020 16452 pts/0 S 12:11 0:00 php scripts/queuedaemon.php
root 24717 0.0 0.2 8652 1076 pts/0 R+ 12:11 0:00 grep --color=auto -i php
http 24922 0.0 6.8 238460 34328 ? S May20 0:22 php-fpm: pool www
# And still stuck at those errors. Before I said there were no errors, my apologies. I forgot there are. php-pear is installed from [extra] and configured as default. Also, mysqli_reconnect is on. Maybe this thread is closely related to this one: http://forum.status.net/discussion/1932/twitterbridge-and-pear-db-errors
[root@linode] [/srv/http/mvdan/statuscat]
# sudo -u http php plugins/TwitterBridge/daemons/twitterstatusfetcher.php && php plugins/TwitterBridge/daemons/synctwitterfriends.php
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 /srv/http/mvdan/statuscat/extlib/PEAR.php(890): call_user_func('PEAR_ErrorToPEA...', Object(DB_Error))
#2 /srv/http/mvdan/statuscat/extlib/DB.php(966): PEAR_Error->PEAR_Error('DB Error: no da...', -14, 16, 'PEAR_ErrorToPEA...', 'SELECT * ? FROM...')
#3 /srv/http/mvdan/statuscat/extlib/PEAR.php(531): DB_Error->DB_Error(-14, 16, 'PEAR_ErrorToPEA...', 'SELECT * ? FROM...')
#4 /srv/http/mvdan/statuscat/extlib/DB/common.php(1908): PEAR->raiseError(NULL, -14, NULL, NULL, 'SELECT * ? FROM...', 'DB_Error', true)
#5 /srv/http/mvdan/statuscat/extlib/DB/mysqli.php(928): DB_common->raiseError(-14, NULL, NULL, NULL, '2006 ** MySQL s...')
#6 /srv/http/mvdan/statuscat/extlib/DB/mysqli.php(387): DB_mysqli->mysqliRaiseError(-14)
#7 /srv/http/mvdan/statuscat/extlib/DB/common.php(1216): DB_mysqli->simpleQuer in /srv/http/mvdan/statuscat/lib/framework.php on line 163
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 /srv/http/mvdan/statuscat/extlib/PEAR.php(890): call_user_func('PEAR_ErrorToPEA...', Object(DB_Error))
#2 /srv/http/mvdan/statuscat/extlib/DB.php(966): PEAR_Error->PEAR_Error('DB Error: no da...', -14, 16, 'PEAR_ErrorToPEA...', 'SELECT * ? FROM...')
#3 /srv/http/mvdan/statuscat/extlib/PEAR.php(531): DB_Error->DB_Error(-14, 16, 'PEAR_ErrorToPEA...', 'SELECT * ? FROM...')
#4 /srv/http/mvdan/statuscat/extlib/DB/common.php(1908): PEAR->raiseError(NULL, -14, NULL, NULL, 'SELECT * ? FROM...', 'DB_Error', true)
#5 /srv/http/mvdan/statuscat/extlib/DB/mysqli.php(928): DB_common->raiseError(-14, NULL, NULL, NULL, '2006 ** MySQL s...')
#6 /srv/http/mvdan/statuscat/extlib/DB/mysqli.php(387): DB_mysqli->mysqliRaiseError(-14)
#7 /srv/http/mvdan/statuscat/extlib/DB/common.php(1216): DB_mysqli->simpleQuer in /srv/http/mvdan/statuscat/lib/framework.php on line 163
They don't seem to have found a solution for it. @lnxwalt, is that problem happening with 5.3? But the twitterbridge daemons do appear in scripts/getvaliddaemons.php, right?
@jpope it might be helpful to roll back to 5.3 for a moment and see if it behaves the same way. Any idea as to how to do that?
Cheers!
If you previously had 5.3 installed, you'll most likely have the old packages in /var/cache/pacman/pkg/. If so, you can downgrade by issuing a for each package you need to downgrade. I think you can list all the packages in one command if you want, it'll probably complain about dependencies if you don't... If you don't have the old packages in your cache, you should be able to find the old packages via the ARM (Arch Rollback Machine). Just wget the files you need and pacman -U to install. Also, if you have 'php-memcache', the most current version has issues as well with 5.3, I have 3.0.6-2 installed and working properly.
Also, after you have finished, you may want to add each of these package names to the 'IgnorePkg' line in /etc/pacman.conf so that on your next pacman -Syu, it doesn't try to update these. Otherwise, if you use yaourt as opposed to pacman directly, you can manually edit your update list after running 'yaourt -Syu' before actually updating.
Also, check the Arch wiki for more on downgrading, link
# php --version
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/xsl.so' - /usr/lib/php/modules/xsl.so: undefined symbol: zend_new_interned_string in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/apc.so' - /usr/lib/php/modules/apc.so: undefined symbol: zend_new_interned_string in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/memcached.so' - libmemcached.so.9: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.3.12 with Suhosin-Patch (cli) (built: May 3 2012 18:18:26)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
I panicked, and so rolled back to 5.4. Cloud you please paste "pacman -Ss php | grep installed" so I know which versions of which packages do I need? It seems like I'm missing something.
As you've noted, I get similar PearDB errors, and my twitterfetcher randomly dies and has to be restarted.
I added the two twitter scripts to the stopdaemon.sh, and now have cron run that and the startdaemons.sh early in the morning, just before I get up, so I can get the news from the twitter when I first get up...Not really a valid solution, of course. I wish more news outlets used SN!
Elsewhere it was suggested to put mysqli.reconnect = On in php.ini (in either/both /etc/php5/cli or /etc/php5/apache2), but I already have that on, and it hasn't solved the problem.
I might just be overworking mysql, since I have a few other apps using it (friendica being the most demanding other than SN), and only a 1gb of ram.
And sorry, but where do you see any other php.ini? I only have one in /etc/php, there's no such /etc/php5 (I use nginx, no apache).
Oh, and as far as the El Periodico thing, I intend status.cat to be a social network for catalan people, thus sourcing some of the most popular catalan newspapers. El periodico has an rss feed in spanish, if you're interested.
[EDIT] Cool, I'm not the only one who is having problems with scripts/getvaliddaemons.php. Which PHP version are you running? If you're using 5.3, we can definitely say PHP 5.4 *is not* the cause of our issues. Then what might be? A bug in 1.1.0-alpha1? The absence of /dev/urandom? Some problem with mysql/memcached?
As far as I know the only php.ini resides at /etc/php/php.ini.
My linode (debian stable) has kernel 3.0
uname -a gives
Linux vulcan 3.0.18-linode43
one in /etc/php5/apache2/php.ini and the other in /etc/php5/cli/php.ini
this is debian stable.
Linux linode 3.2.1-x86_64-linode23 #1 SMP Mon Jan 23 13:37:32 EST 2012 x86_64 GNU/Linux
Now that's strange. Urandom *is* there. Hmm. Either I messed up earlier, or they updated the 3.2.1 kernel. Anyhoo, solved. I'll try and use openid again with /dev/urandom and see if it works.
[EDIT] It doesn't work. OpenID deactivated again.
@tonybaldwin I used to have /etc/php5 in debian as well. In arch, you get /etc/php/php.ini, no cli/ folder. And since Apache is not installed, no apache2 either. Though it's the same.
This is the setting I was missing:
$config['db']['schemacheck'] = 'script';
With that added to your config.php, all PEAR errors are instantly gone.
@jpope, I know you gave me your config.php which had this weeks ago. Sorry for my stupidity. I had the answer right there, but for some reason didn't come up with it.
@lnxwalt, @tonybaldwin &co: I can now confirm statusnet 1.1.x pulled today from git (branch 1.1.x, not master!) works like a charm with the latest PHP5.4 from the Arch repos. If any of you was hesitating to switch to 5.4, please do make the upgrade.
Thanks and sorry for the noise!