WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT ID, COUNT( comment_ID ) AS ccount FROM wp_str8_posts LEFT JOIN wp_str8_comments ON ( comment_post_ID = ID AND comment_approved = '1') WHERE post_status = 'publish' AND ID IN (5436,5431,5430,5428,5426,5425,5424,5422,5420,5419) GROUP BY ID

STR8BLOGGIN » Things that beep and buzz

Archive for the 'Things that beep and buzz' Category

Problems with MySQL data-dir on Ubuntu 10.04?

Tuesday, March 13th, 2012

If you are having trouble modifying your MySQL configuration under Ubuntu (primarily, MySQL hangs/doesn’t start), the problem is apparmor. Do “service apparmor stop” and then “chmod -x /etc/init.d/apparmor”; restart MySQL and it should work.
The problem is that AppArmor tries to limit the folders that MySQL can access, and therefore when you change the data-dir in mysql.conf, mysqld_safe cannot properly start.

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5436 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5436' AND comment_approved = '1'

No Comments »

Beautified, unminified version of the FBJS source

Wednesday, October 20th, 2010

Useful for Facebook app hackers: the FBJS code, unminified.

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5431 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5431' AND comment_approved = '1'

No Comments »

How to request additional permissions during an FBJS Ajax call

Wednesday, October 20th, 2010

Here’s something we learned with FANBLDR, our Facebook Page Maker. If you do an Ajax call in FBML+FBJS, you can use the requireLogin=1 attribute to request permissions. These will then be sent to the
receiving script via POST. However, what if you need extra permissions? Try this:

Facebook.showPermissionDialog(’publish_stream’, function() {
var ajax = new Ajax();
ajax.requireLogin = 1;
ajax.responseType = Ajax.RAW;
ajax.onerror = function(data) {
permissionDialog = new Dialog().showMessage(’Error posting’, ‘Unknown error. Try again later.’, ‘OK’);
}
ajax.ondone = function(data) {

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5430 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5430' AND comment_approved = '1'

No Comments »

How a Facebook app can change its own tab name

Saturday, August 28th, 2010

The mysterious admin.setAppProperties holds all the secrets.

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5428 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5428' AND comment_approved = '1'

No Comments »

How to determine who installed your Facebook app in a tab

Friday, August 27th, 2010

As any Facebook developer knows, Facebook has some restrictive ideas about permissions and what apps should be allowed to do on your behalf or even know about you. One consequence of this is that Facebook avoids giving you any information about the user who is interacting with your app in a tab. The session data you are given will contain the page’s id (known as profile_id in the decoded signed_request value) but not the user’s id. The user’s id is available when people interact with your app outside of a page tab, but that doesn’t help when it’s in a tab.
Aside: New developers, always remember that Facebook gives you more or less access to the platform depending on how the …

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5426 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5426' AND comment_approved = '1'

No Comments »

The evils of fb:tabs

Wednesday, August 25th, 2010

The <fb:tabs> and <fb:tab-item> FBML tags are very handy to use in your Facebook apps if you want to maintain the Facebook appearance. Unfortunately, they also have weird target behavior that causes the user to leave your application’s frame - if it’s an FBML canvas tab app, and you want to keep your app inside the tab for layout reasons, this is bad news.
To fix it, consider emulating the appearance of Facebook’s <fb:tabs> using CSS.. read on for our solution.

.fb-tabs { border-bottom: 1px solid #898989; padding: 3px 0; }
.fb-tabs .left_tabs { float: left; padding-left: 10px; }
.fb-tabs .right_tabs { float: right; padding-right: 10px; }
.fb-tabitems {
display: inline;
list-style: none;
margin: 0;
padding: 0;
text-align: center;
}
.fb-tabitems li {
display:inline;
padding: 2px 0px 3px;
background: #f1f1f1 url(http://www.facebook.com/images/components/toggle_
tab_gloss.gif) top left repeat-x;
}
.fb-tabitems li …

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5425 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5425' AND comment_approved = '1'

No Comments »

Incoming: Facebook App Developer tips

Wednesday, August 25th, 2010

I’m doing a lot of Facebook App development lately, and I’m finding the internet to be sorely lacking in good resources for a lot of this stuff. So on this blog in the coming weeks I’m going to feature a few tips for the greater good of the web.

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5424 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5424' AND comment_approved = '1'

No Comments »

Secure browser sessions by proxying through SSH

Tuesday, May 8th, 2007

Download Putty and Puttygen
Run Puttygen
Create a private key; save it somewhere on your harddrive. Don’t bother with encrypting/passwording it.
Copy the public key (shown in the box) with Ctrl-C
Login to the server you want to proxy through, as normal, with Putty
Edit .ssh/authorized_keys - you may have to create the .ssh folder
Paste your public key on one long line into the file and then log out of the server
Load your Putty settings for the site
On the left, go to Connection -> Data and enter your username where it says “Autologin Username”
On the left, go to Connection -> SSH -> Auth, and select your private key
On the left, go to Connection -> SSH -> Tunnels, type source port 1080 (or whatever you want), …

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5422 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5422' AND comment_approved = '1'

No Comments »

Goodbye, Digg

Tuesday, May 1st, 2007

I don’t need you selling your users to your sponsors over a few hex digits. Reddit has a better algorithm anyway.

Oh, and 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0.

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5420 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5420' AND comment_approved = '1'

No Comments »

FreeBSD users having trouble with pecl?

Monday, January 29th, 2007

For a while I’ve had sporadic problems with pecl (PHP’s binary module building tool, part of PEAR) not working properly. Usually the error was:
[root@host ~]# pecl install memcache

Fatal error: Call to undefined function preg_match() in /usr/local/share/pear/PEAR/Frontend/CLI.php on line 70
Yet, preg_match() would work from other scripts - it is part of pcre, which was installed.
The problem is this. pcre is included via extensions.ini. That’s why it usually works. However, pecl for some reason deliberately turns off .ini file inclusion (that includes extensions.ini) when it runs the php interpreter. I’m not sure what the objective was here but it’s a problem on FreeBSD’s shared library pcre.so.
The fix: edit the pecl script (usually /usr/local/bin/pecl) and remove the ‘-n’ from the command line arguments.

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5419 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5419' AND comment_approved = '1'

No Comments »