Viking wrote:
The server that the script will run on has the following settings:
PHP Ver: 4.1.2
Server API: CGI
Register Globals: ON
Session Support: ON
I want to use sessions to store the information necessary to check to
see if the user is authenticated prior to each request the user makes.
I do not have access to modify any of the settings in the php.ini file
due to fact that this is a shared web hosting server.
Is there anything I need to be aware of that is different due to the
fact that PHP is running as a CGI ? I am familiar with the process
when PHP is running as a server module, but not familiar with PHP
running as a CGI.
Basically looking for guidance on the logic, I can write the code.
Thanks in advance
Viking
Hi Viking,
I am not sure I understand your problem.
If you want to use session to check if the user is authenticted to see
certain pages, why not include some script above these pages that does
excactly that??
something like this.
checkUserIsAuthenticated.inc
<?
if ($_SESSION["isAdmin"] == "Y") {
// okay, continue.
} else {
echo "You are not authenticated!! Go away!";
exit 0;
}
?>
just start every page for 'admin' with that include.
This approach has nothing to do with CGI or ISAPI or whatever install you
did. It is just plain PHP and Sessions.
But maybe I am missing your point completely. :-/
Regards,
Erwin Moller