Solved

sessions problem

Posted on 2002-05-21
3
298 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

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.  …
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

786 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