Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

cgi https and perl

by datannen (Novice)
on Sep 05, 2003 at 08:49 UTC ( #289138=perlquestion: print w/replies, xml ) Need Help??
datannen has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I'm trying to access my perl script to check a PHP session via https and get a Forbidden error. Do I need to change something in my code to allow the script to be accessed via https://site/cgi-bin/script.pl??
#!/usr/bin/perl use CGI qw(:standard); use CGI::Cookie; use PHP::Session; %cookies = fetch CGI::Cookie; print (header()); print (start_html({title => "Admin Cookie CGI"})); print "Actual Cookies present:\n"; foreach $key (sort keys %cookies) { print "Cookie: $key Value: $cookies{$key}\n"; } print "Getting PHP Session variables..."; my $session = PHP::Session->new($cookies{PHPSESSID}->value); $id = $session->id; if ($session->is_registered('Is_An_Admin')) { $userid = $session->get('UserID'); } else { $userid = "Not a valid admin"; } print <<ENDH; <br><br> Admin UserID: $userid <h1>End Cookie test</h1> ENDH print (end_html());

Replies are listed 'Best First'.
Re: cgi https and perl
by datannen (Novice) on Sep 05, 2003 at 09:16 UTC
    sorry about this question...was an apache server config issue. I was just tired...time to go to sleep.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://289138]
Approved by Corion
help
Chatterbox?
[Sinistral]: I think that just the sight of his username now causes a downvote storm. I agree, and the gratuitous use of formatting does make reading hard. I've given him +1 on things where there seemed to be actual good advice, but I think the big
[Sinistral]: nail in coffin was the rant against a Schwarzian Transform
[stonecolddevin]: at best, from what i've seen, his knowledge is accurate up to maybe 2002. the sheer volume of words is mostly worthy of a downvote in most cases though i think
[erix]: ITYM Schwartzian Transform :P
[erix]: hey planetscape :)
[planetscape]: howdy stonecolddevin, erix
[Sinistral]: eric Aye. I thought I typed that wrong. All hail Randall! I listen to him on FLOSS Weekly
[Discipulus]: i think his vacuus, trombon like, absence of meaning, joined with a ostentatious style, after many years irritates the most
[erix]: easy to get wrong -- I guess that was sund's point, too :P
[Discipulus]: planetscape welcome back! (or is well comeback?)

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2017-06-22 20:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (530 votes). Check out past polls.