Tag Archives: Fixes

How to Fix the iPhone “Apple Mobile Device has not been started” Error

You plug in your iPhone to transfer some sick beats, a few videos, maybe a picture or two of someone that loves you and Windows brings down the pain with a retarded error message. Don’t get all pissed off. Get all fixed…off?

Daddy can fix this!

cannot-be-started

Apple Mobile Device has not been started error

So here’s the deal, instead of Windows just starting the service on the event that an iPhone/iPod is plugged in via USB to your PC they want to make you loathe the machine and manually enable it yourself. I can’t remember the last PC I didn’t have to enable this stupid service on. This isn’t a tutorial about Windows services so don’t ask. It was painful enough to bring myself to write this article

Open up the Control panel
Start > Control panel

control-panel-open

Open up the control panel

After you opened the control panel you want to open the Administrative Tools
(WTF Note: If you don’t see Administrative Tools in the list of icons under your Control panel click “Switch to Classic view” on the top left)

administrative-tools

Open up administrative tools

After you open Administrative Tools double click the Services icon to bring up the services manager

services

Open up services

V’oila, the services manager appears — now, find the service in the list entitled “Apple Mobile Device

mobile-select

Open up the apple mobile device service

Double click that and you will see this screen:

dropdown

Change from "Disabled" to "Automatic"

It should automatically open up as “disabled” if it isn’t disabled, then I don’t know wtf you’re doing here. Anyways, as you can see we want to change it from “Disabled” to “Automatic” or “Manual” — I’m going with automatic. After you do that, click “Apply” on the bottom right and you should see some voodoo like this happening:

start-device

Start the Apple Mobile Device service

After that, you’re essentially done and you have “fixed” the problem.

Finally, your Apple Mobile Device HAS been started.

You can close all the Windows.

started

Finished!

Be sure to unplug and re-plug in your iPhone/iPod!

Quick capsule summary

  • Start menu  > Control Panel
  • Drink.
  • Administrative Tools > Services
  • Find “Apple Mobile Device” and Double-click
  • Change “Startup type” from Disabled to “Automatic”
  • Click apply on the bottom right
  • Drink heavily.
  • Start the service
  • drnk hvly…

There. Now your shits not weak.

MMmmMm foot,
Bryan

How to fix the __PHP_Incomplete_Class Object error in PHP $_SESSION’s

I ran into a problem recently where I was instantiating an object and passing it login credentials in order to authenticate a user. If the users email address and password were correct my method will return me an object containing all of an individual users information that’s important to their $_SESSION so it can persist across pages, as you normally want in an authenticated system.

Note: I have not tested this with normal arrays. I have only tested this with the $_SESSION superglobal array.

The __PHP_Incomplete_Class Error

If you initialize a session (session_start) before you have instantiated the object and then you assign the object to a $_SESSION variable then you print_r($_SESSION) you will receive this error.

__PHP_Incomplete_Class Object (
[__PHP_Incomplete_Class_Name] => user
[user] => __PHP_Incomplete_Class Object (

No bueno

)

Here’s a code example

session_start();
$user = user::authenticate($email, $password);

if ($user !== false) {
$_SESSION['user'] = $user;
}

// __PHP_Incomplete_Class
print_r($_SESSION['user']);

This will give you a similar error to the example provided above. Don’t ask me why.  I haven’t gone balls deep (forgive the crude analogy) in the parser code to analyze the origination of this issue, I just know how to fix it.

Fix the __PHP_Incomplete_Class Error

If you instantiate the object before you initialize the session then you’re golden.  Take this code in its for instance:

$user = user::authenticate($email, $password);

if ($user !== false) {
session_start();

$_SESSION['user'] = serialize($user);
}

// Fixed!
print_r($_SESSION);

P.S. You  want to turn  session.auto_start OFF in the php.ini
If you don’t know how to do this make sure in your php.ini that session.auto_start = Off.

That’s basically it. If you have any questions, feel free to post in the comments section.

Your welcome,
bryan