Solved

sessions problem

Posted on 2002-05-21
3
292 Views
Last Modified: 2011-09-20
hello

I'm running 2 php applications on the same server.
In the php.ini file,
the first one need "session.save_handler = user"
and the second one need "session.save_handler = file"
to work properly.

How can I solve this problem ?
Is there a way to have a php.ini file per application ?
Or is it a way to change the save_handler at runtime ?

Thx
0
Comment
Question by:Chroma
3 Comments
 
LVL 2

Accepted Solution

by:
mirtol earned 200 total points
ID: 7025040
If one or both of them is/are an Apache webserver then you can use the php_value directive in the apache config file.

As far as I know, it only looks for php.ini in the normal dile search method so you just need to make sure the different instances find different php.ini files (for example, you could have two identical php directories with the php program but differing php.ini files)
0
 
LVL 6

Expert Comment

by:andreif
ID: 7026317
Agree with Mirtol, you can overwrite php.ini settings using apache conf or .htaccess

Examples:

# on/off values

php_flag register_globals off
php_flag track_vars on
php_flag magic_quotes_gpc off

# string values

php_value include_path ".:/home/myincdir/"
0
 
LVL 1

Author Comment

by:Chroma
ID: 7027887
php_value is just what I was looking for.

Thanks a lot
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now