Fixing ‘SAFE MODE Restriction in effect. The script whose uid is is not allowed to access /tmp’ error in WordPress

Long short story. If you wanna update, say, a plugin, or a theme.. using wordpress, and you get the following error:

SAFE MODE Restriction in effect. The script whose uid is  is not allowed to access /tmp

I’ve got news for you!. It’s caused by the php_safe_mode flag. If you’re on a shared hosting, and you cannot change that flag (or maybe you just don’t want to)… here’s what you need to do:

  1. Create a temporary folder, somewhere in your hosting, and set the permissions to 777.
  2. Open your wp-config.php file.
  3. Add this line: define(‘WP_TEMP_DIR’,’/absolute/path/to-a-tmp-folder/’);

That should do the trick.

Fixing WebKitLocalStorageDatabasePathPreferenceKey crash

I’ve been getting a lot of crashes with the following signature:

[cc lang=”objc”]Exception Type: SIGABRT
Exception Codes: #0 at 0x351be32c
Crashed Thread: 0

Application Specific Information:
*** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: WebKitLocalStorageDatabasePathPreferenceKey)’
[/cc]

What is this?. It’s pretty well explained here.
My workaround?. Quite simple. Call this method as soon as your app launches:

[cc lang=”objc”]
-(void)fixWebkitCrash
{
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
NSString* webkitPath = [defaults objectForKey:@”WebKitLocalStorageDatabasePathPreferenceKey”];
NSString* bundlePath = [[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent];

if([webkitPath containsString:bundlePath] == NO)
{
[defaults removeObjectForKey:@”WebKitLocalStorageDatabasePathPreferenceKey”];
[defaults synchronize];
}
}
[/cc]

Hopefully, this will save you a couple hours!.

Fixing ‘Show in Finder’

I’ve been dealing with an annoying glitch in OSX 10.8.2. For some reason, ‘show in finder’ breaks down… on its own.

The workaround is…

[cc lang=”bash”]sudo killall -KILL appleeventsd[/cc]

Let’s just hope a real fix shows up, sooner rather than later.

Fixing “iTunes was unable to load dataclass” Error

I’ve been dealing with the “iTunes was unable to load dataclass” for several hours.
I’ve uninstalled iTunes, Xcode, deleted the Mobile Device Support… reinstalled everything, booted the system, and nothing seemed to work.

After searching for quite some time, i’ve found this post. Long short story, if you delete this framework:

[cc lang=”bash”]/System/Library/PrivateFrameworks/MobileDevice.framework[/cc]

…and right afterwards you relaunch Xcode (which will, as a result, reinstall such framework)… you should be able to get rid of this… annoooooooooying problem.

 

%d