473,725 Members | 2,243 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help: 2 different web apps, by 2 different users, want to use thesame session filename for data.

I have a server where two different users are each running a different
web application. I installed SugarCRM for one, and Info@Hand (built
from SugarCRM) for the other. Both are trying to save and access the
same file in the PHP session_save_pa th (/tmp/
sess_c2b09aac9b 607b1df05d73c7f 1c4cbb1).

If I delete that file, the whichever app runs first, saves data under
that filename and the other will fail. They both keep regenerating
the same filename. I thought that data stored in the
session_save_pa th had random filenames?

How can I fix/get around this?
--
Russ Schneider (a.k.a. Sugapablo)
http://www.sugapablo.com
Jun 2 '08 #1
2 1421
On Mon, 21 Apr 2008 20:39:00 +0200, sugapablo <su*******@hotm ail.com>
wrote:
I have a server where two different users are each running a different
web application. I installed SugarCRM for one, and Info@Hand (built
from SugarCRM) for the other. Both are trying to save and access the
same file in the PHP session_save_pa th (/tmp/
sess_c2b09aac9b 607b1df05d73c7f 1c4cbb1).

If I delete that file, the whichever app runs first, saves data under
that filename and the other will fail. They both keep regenerating
the same filename. I thought that data stored in the
session_save_pa th had random filenames?
Unless a filename is allready 'given' by a session-id in a cookie or
GET/POST params.
How can I fix/get around this?
They shouldn't fail with a session holding the data of both, save for name
clashes in the variables / arrays. However, it is possible they have
they're own session_handler (try to search in the code for a
session_set_sav e_handler(). If so, more info about these handlers is
needed.

If not, and they are in different paths, make the session-id dependable on
the path by setting is explicitly with session_set_coo kie_params().
--
Your sig seperator is broken.. It's missing a space after it.
--
Rik Wasmus
Jun 2 '08 #2
*** sugapablo escribió/wrote (Mon, 21 Apr 2008 11:39:00 -0700 (PDT)):
I have a server where two different users are each running a different
web application. I installed SugarCRM for one, and Info@Hand (built
from SugarCRM) for the other. Both are trying to save and access the
same file in the PHP session_save_pa th (/tmp/
sess_c2b09aac9b 607b1df05d73c7f 1c4cbb1).

If I delete that file, the whichever app runs first, saves data under
that filename and the other will fail. They both keep regenerating
the same filename. I thought that data stored in the
session_save_pa th had random filenames?
They generate a random session ID... unless the browser sends a previous
ID. I'd say you have both apps in different directories of the same site.
If there's a conflict with session data you can restrict the scope of the
session ID cookie with this directive:

session.cookie_ path

If PHP runs as Apache module you can set it in two .htaccess files, one for
each app:

In /home/site/www/app1/.htaccess:

session.cookie_ path=/app1/

In /home/site/www/app2/.htaccess:

session.cookie_ path=/app2/

More info:
http://es2.php.net/manual/en/session...on.cookie-path
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor en cubitos: http://www.demogracia.com
--
Jun 2 '08 #3

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

Similar topics

8
5478
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
1
3715
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am attach this script files and inq files. I cant understand this error. Please suggest me. You can talk with my yahoo id b_sahoo1@yahoo.com. Now i am online. Plz....Plz..Plz...
0
5571
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted ******************************************************** For this teeny job, please refer to: http://feeds.reddit.com/feed/8fu/?o=25
4
4530
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst child apps of an IIS application and can be used by multiple users during the application life cycle and for multiple page loads for the same or different page under a root application. What I don't understand and need to know is whether that...
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
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...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9179
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
9116
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...
0
8099
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.