473,785 Members | 2,841 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sharing sessions between php and asp

I'm working on a site which contains a lot of legacy ASP VBScript code.

My intention is to recreate and expand the site's functionality in PHP5. I'm
doing this in phases, so in the meantime there will be ASP's running
alongside PHP scripts - this is not a problem since the host is an IIS with
PHP support.

For some parts session variables need to be stored and retrieved, and I was
wondering if there's some way of accessing a session started in ASP from a
PHP script, and the other way round?

Thank you.
..soma
Jul 17 '05 #1
2 5690
*** somaboy mx wrote/escribió (Mon, 4 Jul 2005 12:22:42 +0200):
I'm working on a site which contains a lot of legacy ASP VBScript code.

My intention is to recreate and expand the site's functionality in PHP5. I'm
doing this in phases, so in the meantime there will be ASP's running
alongside PHP scripts - this is not a problem since the host is an IIS with
PHP support.

For some parts session variables need to be stored and retrieved, and I was
wondering if there's some way of accessing a session started in ASP from a
PHP script, and the other way round?


You can write your own session handler in PHP but I believe you need some C
lang coding. Alternatively, this function may help:

session_set_sav e_handler()

However, I don't have the faintest idea of how IIS stores session data.
--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Jul 17 '05 #2


Alvaro G Vicario wrote:
*** somaboy mx wrote/escribió (Mon, 4 Jul 2005 12:22:42 +0200):
I'm working on a site which contains a lot of legacy ASP VBScript code.

My intention is to recreate and expand the site's functionality in PHP5.. I'm
doing this in phases, so in the meantime there will be ASP's running
alongside PHP scripts - this is not a problem since the host is an IISwith
PHP support.

For some parts session variables need to be stored and retrieved, and Iwas
wondering if there's some way of accessing a session started in ASP from a
PHP script, and the other way round?


You can write your own session handler in PHP but I believe you need someC
lang coding. Alternatively, this function may help:

session_set_sav e_handler()

However, I don't have the faintest idea of how IIS stores session data.
--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--


1st step:
i don't know anything about the asp side of the thing, but i figure asp
uses some kind of session id, same as php.
the 1st difficult thing will be finding the matching pair of session
id's. i can't really think of a way to reliably do this. cookies and ip
come to mind, but they're not reliable enough.

2nd step: accessing the vars - having them serialized (you'd need some
algorithm that's understood by both languages) in a db identified by
the session handler could be a way.

micha

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1610
by: Vic | last post by:
Hi, Is there a mechanism within PHP for sharing data over multiple requests that are not tied to a specific session. I need to write a memory senstive cache in pure PHP. I have an application which needs to store documents from an application server elsewhere, due to the data within the documents I can't write them to disk and I have to minimise the amount of accesses to the server.
4
2611
by: Daniel | last post by:
Hi I am having a problem sharing session between SSL and non-SSL asp.net pages I have F5 BigIP with sticky sessions working fine, but the problem is tha sticky session applies at the port level (80 vs. 443) so when a user goes t a SSL page I lose session vars because it's on another server on the farm When the user stays on the same server for both non-SSL and SSL the sessio is shared OK Has anyone come across this problem and are...
1
1481
by: Beno?t Rigaut | last post by:
I have 2 domains X.AAAA.BB and Y.AAAA.BB and I would like to share sessions values between them. According to the cookie specification it is possible to create a cookie with a common domain setting: .AAAA.BB. Thus the browser will send back the cookie to both of the web sites X.AAAA.BB and Y.AAAA.BB. (cf. http://www.cookiecentral.com/faq/#3.3) Is it possible to ask the .Net framework to set the session cookie to ..AAAA.BB instead of...
3
1689
by: Selden McCabe | last post by:
I have an old ASP project, and I'm adding some functionality in ASP.Net. I stuff some information into Session variables in the ASP page, then redirect to the ASP.Net page. But when I pull up the session variables, they are empty! Is it possible to share session variables this way? Thanks,
10
2217
by: Suresh | last post by:
how to share Session Sharing Across the domain
4
2341
by: qube3 | last post by:
We have applications written by JSP/Servlet and ASP.NET. All our future development would be based on ASP.NET. We wants to develop a single user interface so that users would not be aware that some of the modules they are using are implement by JSP or ASP.NET (e.g. no need to login both JSP and ASP.NET applications)? Are there any suggestions to share the session in formation among JSP and ASP.NET, or some single-sign on solution.
1
1983
by: bruce.1 | last post by:
I'm trying to figure a way for a remote user -- using ASP.NET -- to share files on a local office LAN. The remote user would go to an ASP.NET website (on the LAN), mark the files they want, and ASP.NET would facilitate a download, and keep a record in a small database of who downloaded and uploaded whatever. These are big files, say 4 MB, so it's best if the remote user downloads the file, edits it, then uploads it back to some folder...
1
2283
by: AnthonyC | last post by:
I am having a problem tracking down what I believe to be a problem with the way cookies are being used on our website application. When user log onto the application, an in-memory (per-session) cookie is created to hold the session key for the user. This unique key is assigned as part of the business layer logon process, and never changes while the user is logged on. The call to the business component returns this unique key if the logon...
3
3993
by: Ben Holness | last post by:
Hi all, I have a php/mysql website where people can upload their own graphics for the buttons and background of pages on the website. This used to run on one server, but I have now been asked to set it up on multiple servers. The problem is that when someone uploads a file, how do I distribute it to all of the servers? Should I use php to send it to all of the servers once
9
7383
by: Gilles Ganault | last post by:
Hello Some data are common to all user sessions, and to improve performance/save resources, I'd like to share those data between all sessions, so that each user doesn't have to hit MySQL for the same data. I'd rather avoid writing those in a flat file, and keep stuff in RAM instead. Someone told me about cache servers like MemCacheD. I was also given the hints of writing in OO (public class variables) or using
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10330
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9952
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.