Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 307919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:36:10+00:00 2026-05-12T07:36:10+00:00

I have looked up this error, and it seems the common issue is caused

  • 0

I have looked up this error, and it seems the common issue is caused by not putting include()’s or require()’s BEFORE session_start().

However, this is not the case for me.

I am getting the following error:

Fatal error: Zend_Http_Client::request() [zend-http-client.request]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Zend_Http_Client_Adapter_Socket" of the object you are trying to operate on was loaded before unserialize() gets called or provide a __autoload() function to load the class definition in /home/content///*/*****/html/ZendGdata-1.8.4PL1/library/Zend/Http/Client.php on line 865

Any idea why?

Here are the three relevant files: login.php, members.php, and functions.php…

login.php:

 $newIncludePath = array();
 $newIncludePath[] = '../ZendGdata-1.8.4PL1/library';
 $newIncludePath = implode($newIncludePath);
 set_include_path($newIncludePath);

 // load classes
 require_once 'Zend/Loader.php';
 Zend_Loader::loadClass('Zend_Gdata');
 Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
 Zend_Loader::loadClass('Zend_Gdata_Calendar');
 Zend_Loader::loadClass('Zend_Http_Client');
 Zend_Loader::loadClass('Zend_Gdata_AuthSub');

 session_start();


 $serviceName = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; // predefined service name ('cl') for calendar
 $applicationName = 'yourCompany-yourAppName-v1';

 // Create an authenticated HTTP client
 $httpClient = Zend_Gdata_ClientLogin::getHttpClient('*****@gmail.com', '*****', $serviceName, null, $applicationName);
 $client = new Zend_Gdata_Calendar($httpClient, $applicationName); // Create an instance of the Calendar service

 $_SESSION['gdataCal'] = $client;

members.php:

 $newIncludePath = array();
 $newIncludePath[] = '../ZendGdata-1.8.4PL1/library';
 $newIncludePath = implode($newIncludePath);
 set_include_path($newIncludePath);

 // load classes
 require_once 'Zend/Loader.php';
 Zend_Loader::loadClass('Zend_Gdata');
 Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
 Zend_Loader::loadClass('Zend_Gdata_Calendar');
 Zend_Loader::loadClass('Zend_Http_Client');
 Zend_Loader::loadClass('Zend_Gdata_AuthSub');

 session_start();

 $g_url = add_gcal($_SESSION['gdataCal'], $_SESSION['title'].....etc.);

functions.php:

 <?php

 $newIncludePath = array();
 $newIncludePath[] = '../ZendGdata-1.8.4PL1/library';
 $newIncludePath = implode($newIncludePath);
 set_include_path($newIncludePath);

 // load classes
 require_once 'Zend/Loader.php';
 Zend_Loader::loadClass('Zend_Gdata');
 Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
 Zend_Loader::loadClass('Zend_Gdata_Calendar');
 Zend_Loader::loadClass('Zend_Http_Client');

session_start();

function add_gcal($gdataCal, $title....etc.){

try {

    $newEvent = $gdataCal->newEventEntry();

    $newEvent->title = $gdataCal->newTitle($title);
    $newEvent->where = array($gdataCal->newWhere($where));
    $newEvent->content = $gdataCal->newContent("$desc");

    $when = $gdataCal->newWhen();
    $when->startTime = $date;
    $when->endTime = $date; 
    $newEvent->when = array($when);

    $createdEvent = $gdataCal->insertEvent($newEvent);
    return $createdEvent->id->text;

  } catch (Zend_Gdata_App_Exception $e) {
        return NULL;
  }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:36:10+00:00Added an answer on May 12, 2026 at 7:36 am

    You get this message :

    Please ensure that the class
    definition
    “Zend_Http_Client_Adapter_Socket” of
    the object you are trying to operate
    on was loaded before unserialize()
    gets called

    So, I suppose you have something in session (which means store in a serialized form) that is an instance of Zend_Http_Client_Adapter_Socket

    So, before the session_start, you should load that class, using, for instance, something like this :

    Zend_Loader::loadClass('Zend_Http_Client_Adapter_Socket');
    

    This should solve this problem… But, as Zend Framework has lots of classes that rely on each others, you might run into another one…

    A way to get rid of those errors for ever would be to use Zend Framework’s autoloader : instead of locading classes yourself with Zend_Loader::loadClass, you could just register/activate the autoloader, and it will automatically load classes for you, whenever they are needed.

    Of couse, that too would have to be done before the call to session_start 🙂

    For more informations about ZF’s autoloader, you can take a look at this page of the manual.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have looked around on the Internet trying to answer this question. It seems
I have looked all of the place for this and I can't seem to
I've looked at this and it wasn't much help. I have a Ruby program
I have some accesses from 192.168.0.71 on my apache logs. I looked up this
I've looked through many of the existing threads about this error, but still no
I have looked over the Repository pattern and I recognized some ideas that I
I have looked at the SQL Server 2008 feature comparison matrix and it lists
I have looked at NHibernate and EntitySpaces and they both seem to work differently.
I have looked on FaceBook Developer page and found that it's possible to create
I have looked at the Suggested related questions but none of them are what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.