Hi,
Just a hunch, but it kinda smells like your web server isn't executing the CGI
script. I'd suggest checking into what is necessary to get your server to
execute CGI, vs serving it up as text.
On Oct 15, 2012, at 5:40 AM, Pervez Mulla wrote:
> Instead of CGI server path , I places perl script in static folder and given
> path for that .
>
> On Mon, Oct 15, 2012 at 4:09 PM, Pervez Mulla wrote:
> responseText: #!/usr/bin/perl -T use CGI; use DBI; use strict; use warnings;
> use netsharkusr; my $cgi = CGI->new; my $username = $cgi->param("username");
> my $password = $cgi->param("password"); my $tempuser = new netsharkusr();
> if($tempuser->readbyusername($username) eq 1) { if($tempuser->{username} eq
> $username) { print "success \n"; #exit; } } #$password = "123go"; my $userid;
> my $tempuser2 = new netsharkusr(); if($tempuser2->readbypassword($password))
> { if($tempuser2->{password} eq $password) { print "sccess \n"; $userid =
> $tempuser2->{userID}; } } # check the username and password in the database #
> create a JSON string according to the database result my $json = ($userid) ?
> qq{{"success" : "login is successful", "userid" : $userid}} : qq{{"error" :
> "username or password is wrong"}}; # return JSON string print
> $cgi->header(-type => "application/json", -charset => "utf-8"); print $json;,
> textStatus: parsererror, errorThrown: undefined
>
>
> On Mon, Oct 15, 2012 at 4:07 PM, Sergiy Khohlov wrote:
> please provide error
>
> 2012/10/15 Pervez Mulla :
> > On error note its printing all pelr script itself.
> >
> >
> > On Mon, Oct 15, 2012 at 3:31 PM, Sergiy Khohlov wrote:
> >>
> >> please provide error message
> >>
> >> 2012/10/15 Pervez Mulla :
> >> > Thank You for your response Sergiy ,
> >> >
> >> > I already try'd to run this script as shown in Django DOC as u given
> >> > .but
> >> > still it didnt work:(
> >> >
> >> > Thank You
> >> > Pervez
> >> >
> >> > On Mon, Oct 15, 2012 at 1:28 PM, Sergiy Khohlov
> >> > wrote:
> >> >>
> >> >>
> >> >> https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-LOGIN_URL
> >> >>
> >> >> set this one in setting.py
> >> >>
> >> >> 2012/10/15 Pervez Mulla :
> >> >> > Hi,
> >> >> >
> >> >> > I have login.html , login,js ang login.pl.
> >> >> >
> >> >> > I want to integrate basic login page in Django with perl back-end
> >> >> > from
> >> >> > where
> >> >> > Am reading my DB.
> >> >> > I was trying to integrate it from last day but come out with empty
> >> >> > .There
> >> >> > might be some settings in setting.py.
> >> >> > Below is my code
> >> >> >
> >> >> > --
> >> >> > login.html
> >> >> > --
> >> >> > http://www.w3.org/1999/xhtml;>
> >> >> >
> >> >> > >> >> > />
> >> >> > >> >> > src="jquery-1.7.2.min.js">
> >> >> >
> >> >> >
> >> >> > #loginContent { width: 350px; margin: 100px auto; }
> >> >> > button[type] { margin: 0.5em 0; }
> >> >> > label {font-weight:bold;}
> >> >> > fieldset {padding:0 1.4em 1.4em 1.4em;margin:0 0 1.5em 0;border:1px
> >> >> > solid
> >> >> > #ccc;}
> >> >> > legend
> >> >> >
> >> >> > {font-weight:bold;font-size:1.2em;margin-top:-0.2em;margin-bottom:1em;}
> >> >> > fieldset, #IE8#HACK {padding-top:1.4em;}
> >> >> > legend, #IE8#HACK {margin-top:0;margin-bottom:0;}
> >> >> > input[type=text], input[type=password], input.text, input.title,
> >> >> > textarea
> >> >> > {background-color:#fff;border:1px solid #bbb;}
> >> >> > input[type=text]:focus, input[type=password]:focus, input.text:focus,
> >> >> > input.title:focus, textarea:focus {border-color:#666;}
> >> >> > select {background-color:#fff;border-width:1px;border-style:solid;}
> >> >> > input[type=text], input[type=password], input.text, input.title,
> >> >> > textarea,
> >> >> > select {margin:0.5em 0;}
> >> >> > input.text, input.title {width:300px;padding:5px;}
> >> >> > input.title {font-size:1.5em;}
> >> >> > textarea {width:390px;height:250px;padding:5px;}
> >> >> > form.inline {line-height:3;}
> >> >> > form.inline p {margin-bottom:0;}
> >> >> > .error, .alert, .notice, .success, .info
> >> >> > {padding:0.8em;margin-bottom:1em;border:2px solid #ddd;}
> >> >> > .error, .alert
> >> >> > {background:#fbe3e4;color:#8a1f11;border-color:#fbc2c4;}
> >> >> > .notice {background:#fff6bf;color:#514721;border-color:#ffd324;}
> >> >> > .success {background:#e6efc2;color:#264409;border-color:#c6d880;}
> >> >> > .info {background:#d5edf8;color:#205791;border-color:#92cae4;}
> >> >> > .error a, .alert a {color:#8a1f11;}
> >> >> > .notice a {color:#514721;}
> >> >> > .success a {color:#264409;}
> >> >> > .info a {color:#205791;}
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > Enter information
> >> >> >
> >> >> >