08-11-2004
I am fiddling around with variations of this now.... However, I have a set of columns in the users table that govern various permissions over the DB, (e.g. can create categories, can edit items, can delete items, etc, etc). So I can't really break it down into either admin or users, as I want to assign each user fine grained permissions - this is what makes setting the cookie (and then getting the page to render accordingly) quite difficult. As you say, if you login as somebody else the cookie gets clobbered and the "old" session assumes the values stored in the "new" sessions cookie.
It also becomes complicated when reading in cookie values. Say i'm logged in as both a user and an admin, and I try to remove an entry as the user, if the admin cookie exists as well, isn't it going to be a pain to decipher what's going on? (Because the script will be saying "if admin cookie exists - allow, else disallow), but both cookies will exist?
I think as a workaround for now, I will have to stick to limiting the thing to a single session per IP address. It's kludgy but will work. I think that it's just as easy to log out, and then log back in as a user with appropriate priveledges to do whatever needs doing. I've also set up a series of cookies that are set to various crypt()ed values to stop a user trying to forge a cookie with elevated priveledges and everything seems pretty secure at the moment.
Let me know if you come up with anything more (or if I've got the wrong end of the stick) - I'm still open to ideas and am still hacking around.
Thanks again,
Cheers
ZB
10 More Discussions You Might Find Interesting
1. Solaris
Any idea as to how multiple loggin sessions by the same user (using Hyper terminal/Telnet) be restricted in Sun Solaris 8.
Rgds
Naushi (10 Replies)
Discussion started by: Naushi
10 Replies
2. Shell Programming and Scripting
I have a program which gets an input file (which contain a list of objects) and processes the objects one by one sequentially. However when there are many objects it is faster to split the input into smaller lists and run the program in multiple terminal sessions simultaneously. I want to know if... (2 Replies)
Discussion started by: stevefox
2 Replies
3. UNIX for Advanced & Expert Users
Just a quick question,
Can I establish Multiple Sessions between two machines using FTAM?
Regards,
Gaurav Goel (0 Replies)
Discussion started by: gauravgoel
0 Replies
4. UNIX for Dummies Questions & Answers
;)Hi Everyone,
I am using solaris 5.10.
I have a java process running in server mode in unix.
The problem is that it automatically forks i.e creates a child process.
I mean suddenly two instances of that process start running , in which the process-id of first instance is the parent... (0 Replies)
Discussion started by: glamo_2312
0 Replies
5. UNIX for Advanced & Expert Users
Hi Everyone,
I am using solaris 5.10.
I have a java process running in server mode in unix.
The problem is that it automatically forks i.e creates a child process.
I mean suddenly two instances of that process start running , in which the process-id of first instance is the parent... (5 Replies)
Discussion started by: glamo_2312
5 Replies
6. Shell Programming and Scripting
I need to install a tomcat6 with multiple instances like instance1,instance2 and instance3 in a server.
I came to know that for that we need to install tomcat6,apache2.0,mod_jk1.2 and jre with tools.jar installed.And we need to create multiple instances with same web.xml and difference... (0 Replies)
Discussion started by: tuxslonik
0 Replies
7. AIX
Hi.
I installed xming to access to my servers but I have a problem : i can only have one session at a time ... i don't find any parameter to change this.
Tks (3 Replies)
Discussion started by: stephnane
3 Replies
8. Red Hat
Hi,
I use OpenSSH to log on to a RH server but when I enter the password 2 session windows appear.
I only need one so can anyone advise where I can rectify this?
R,
D. (2 Replies)
Discussion started by: Duffs22
2 Replies
9. Shell Programming and Scripting
I wish to be able to pass PHP values between multiple scripts. In each script, I have the following before any HTML code:
<?php
session_start();
session_name("STORE");
session_set_cookie_params( 'lifetime', '/var/www' );
session_id('Gingy');
... (1 Reply)
Discussion started by: Meow613
1 Replies
10. UNIX and Linux Applications
Hello.
I plan to use mysql with only instance database so I can stop one database for maintenance without stopping every thing.
When one reads through the my.cnf config file, it is not clear if we must use at the same time a single database mysql plus any instances mysqld2 (for app1), mysqld3... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT LINUX
php-config5
php-config(1) Scripting Language php-config(1)
NAME
php-config - get information about PHP configuration and compile options
SYNOPSIS
php-config [options]
DESCRIPTION
php-config is a simple shell script for obtaining information about installed PHP configuration.
OPTIONS
--prefix Directory prefix where PHP is installed, e.g. /usr/local
--includes List of -I options with all include files
--ldflags LD Flags which PHP was compiled with
--libs Extra libraries which PHP was compiled with
--extension-dir
Directory where extensions are searched by default
--include-dir Directory prefix where header files are installed by default
--php-binary Full path to php CLI or CGI binary
--php-sapis Show all SAPI modules available
--configure-options
Configure options to recreate configuration of current PHP installation
--version PHP version
--vernum PHP version as integer
SEE ALSO
php(1)
VERSION INFORMATION
This manpage describes php, version 5.3.6-13ubuntu3.10.
COPYRIGHT
Copyright (C) 1997-2010 The PHP Group
This source file is subject to version 3.01 of the PHP license, that is bundled with this package in the file LICENSE, and is available
through the world-wide-web at the following url:
http://www.php.net/license/3_01.txt
If you did not receive a copy of the PHP license and are unable to obtain it through the world-wide-web, please send a note to
license@php.net so we can mail you a copy immediately.
The PHP Group 2010 php-config(1)