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 7404127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:12:38+00:00 2026-05-29T05:12:38+00:00

Zend’s JSON-RPC server doesn’t seem to like sessions, and I can’t seem to attach

  • 0

Zend’s JSON-RPC server doesn’t seem to like sessions, and I can’t seem to attach a session even by passing Zend_Session::getId() in to my RPC method and revive it with Zend_Session::setId($session_id) as I might expect.

To illustrate what does NOT work:

<?php

$server = new Zend_Json_Server();
$server->setClass('MyRPC');
?>
<script>
$(document).ready(function() {
    myrpc = jQuery.Zend.jsonrpc({
        url : <?=json_encode($this->baseUrl('/ajax'))?>
        , smd : <?=$server->getServiceMap()?>
        , async : true
    });
    myrpc.getIdentity(<?=json_encode(Zend_Session::getId())?>, {
        success : function(data) {
            alert(data.user_id);
        }
    });
});
// see: http://www.tanabi.com/projects/jsonrpc

</script>

and in my RPC class:

<?php

class MyRPC {

    /**
     * @param string
     * @return array
     */
    public function getIdentity($session_id) {
        \Zend_Session::setId($session_id);
        \Zend_Session::start();
        // returns NULL
        return \Zend_Auth::getInstance()->getIdentity();
    }

}
  • 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-29T05:12:39+00:00Added an answer on May 29, 2026 at 5:12 am

    It looks like this is unimplemented.

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

Sidebar

Related Questions

The Zend project creates URLs like: http://localhost/zftest/public/index/add How can I have a URL like
Zend framework on mac OSX: can I change the root Directory ? how ?
Zend Gurus: I have a problem that my session expires if I refresh a
In Zend Framework we can change the file extension of view files from phtml
Using Zend, I want to create a navigation like: <ul class=navigation> <li> <a href=/coupon/index/all></a>
Zend framework is well known for loosely coupled components. I would like to use
In zend framework I register my namespace like this (in application.php): 'autoloaderNamespaces' => array(
Zend adds an enctype to all forms. What's that good for? and how can
Zend debugger uses cookie as debugging flag,how can I make it the same for
Zend Framework FrontController implements Singleton and plus it has some kind a plugin paradigm

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.