on 5/18/06 3:44 PM, Brad Perkins at [EMAIL PROTECTED] wrote:

> The first thing I would try is to rename your default.a4d to
> default.a4d.bak, then create a simple default.a4d file and see if
> Active4D will serve it.
> 
> It could simply contain:
> 
> <p>Some static Output</p>
> <%
>     write("<p>Some interpreted Output</p>");
> %>
> 
> If you get a 404 error (file not found) then I'd suspect your folder set
> up on Windows isn't right. If this file serves both lines, then
> something else isn't right.

Brad:

Since I'm working at a bit of a handicap (a remote server on Windows,
up/downloading files via FTP/BBEdit and/or TB2), I took a bit of liberty,
and just inserted your code above at the top of our method. However, we
still got the 404 error. We've looked (two of us) long and hard at the
structure, but we cannot see any difference from the structure on the Mac
server. Maybe we're blind, but it won't be the first time.
 
> You might want to put a TRACE in the 4D web server handler. You didn't
> say if you were using 4D's web server or ITK, but I'd determine if the
> web server is invoked before going deeper.

We are using 4D's web server, and it _IS_ working -- the log-in page is
being presented and looks the way we expect. It's after we enter the user
name and password that we get the 404.
 
> It might also be helpful to put some debug output at the top of your
> regular default.a4d and dump the form variables collection. This will
> let you see what the form variables are. Refer to the docs on how to do
> this.

We have added "dump form variables" at the top of the .a4p method. We even
added something to cause a syntax error, hoping that we would see that.
 
> Also, if possible, it might help if you can post some code.

Below is our default .a4p method, complete with the debugging items
mentioned above (but without your code above). Dunno if it will help, as
this executes just fine on our Mac -- but never seems to get here on
Windows.

-----------
<%
    dddddd
    dump form variables
    $group:=A4Ds_Login_Validate($f_user;$f_password)
    
    case of
    :($f_user="Foo") & ($f_password="Bar")
        delete session item("loginError")
        set session("group";"Designers")
        set session("user"; $f_user)
         redirect("portal.a4d")
         `
    :($group="Web Customers")
        delete session item("loginError")
        CUS_WebUser_y:=True
        set session("group";"WebCustomers")
        set session("user"; $f_user)
        query([CUS_Customers];[CUS_Customers]Web_Username=$f_user)
         set session("custnum_s"; string([CUS_Customers]Customer_ID))
        redirect("cust_portal.a4d")
         `
    :($group="") ` it's an error!
        $error := "Invalid user name and/or password."
         set session("loginError"; $error)
         set session("user"; "")
        redirect("default.a4d")
        `
    else `  it's a salesman
        delete session item("loginError")
        set session("group";$group)
        set session("user"; $f_user)
        set session("salesmanFK";[EMP_Salespeople]Salespeople_PK)
        set session("salesmanName";[EMP_Salespeople]Name_FullName)
         redirect("portal.a4d")
    end case
%>
--------

Thanks for your ideas. We appreciate the help -- especially since we have no
place else to turn!  8-)

Tom Lundeen
TLC - Tom Lundeen Consulting
Prairie Solutions, Inc.



_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to