Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using cookie lib.pl

Status
Not open for further replies.

bretttt

Programmer
Jul 23, 2002
74
0
0
US
Hello, i have this,

use ../cookie-lib.pl;
$cookie{iboostuser}=$tell[2];
$cookie{iboostpassword}=$tell[0];
&set_cookie(time+86400,'
It works fine in my HTML directory fine.
I am trying the same exact code in directory
HTML/Cart, And i get internal server error...
Can anyone explain or help me on this?
Thank you.
 
Sorry this might help, I know this is the full directory name on my server for my HTML directory
/usr/local/
Could an include or something help? I have read about includes but do not know how to put them in. Thank you.
 
If you're using the same exact code and the cookie-lib.pl is in the same place, I think you'll need to instead have:
Code:
use ../../cookie-lib.pl

You should consider using CGI.pm instead of cookie-lib.pl. It handles cookies better plus gives you many shortcuts for generating html and handling forms.

 
How exactly would i go about doing that.
I use this to read cookies.

use CGI::Cookie;
$in = new CGI;
$coname = $in->cookie ( -name => 'iboostuser' );
$copass = $in->cookie ( -name => 'iboostpassword' );
open (CHE, "../cgi-bin/users/$uname/INFO$uname");
 
That's how you should be reading cookies, how are you setting them and/or where/what are you trying to use cookie_lib.pl?

When you say "use" to include another file, you're probably really after "require" instead. See faq219-1972.

________________________________________
Andrew - Perl Monkey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top