Get Java session/data in PHP

59 views
Skip to first unread message

ccou...@gmail.com

unread,
Feb 27, 2015, 3:52:00 AM2/27/15
to caucho-...@googlegroups.com
I'm trying to retrieve Java session/data from PHP, however it doesn't seem to work.

I've used this (as described here: http://quercus.caucho.com/quercus-3.1/doc/quercus.xtp#HttpServletRequestandHttpSession):

$session = $request->getSession(true);

However I get "Fatal Error: Method call 'getSession' is not allowed for a null"

The PHP is called from a servlet as follows:


session.setAttribute(...);

String url = request.getContextPath() + "/php/admin/status.php";
String redirectUrl = response.encodeRedirectURL(url);
response.sendRedirect(redirectUrl);


How can I make this work?

Thanks.

Nam Nguyen

unread,
Feb 27, 2015, 6:54:50 PM2/27/15
to caucho-...@googlegroups.com
Hi,

We removed the $request magic variable. You can use the function
quercus_servlet_request() instead.

-- Nam

ccou...@gmail.com

unread,
Mar 18, 2015, 3:17:52 AM3/18/15
to caucho-...@googlegroups.com, n...@caucho.com
Thanks, works like a charm.
Reply all
Reply to author
Forward
0 new messages