Jump to content

LJDP

Members
  • Posts

    23
  • Joined

  • Last visited

Posts posted by LJDP

  1. Sometimes yes and sometimes not. But the error always occurs at startup.

    It has happened: localhost be working normally. On a client has error on startup and this client can not work until you restart the isapi. I'm still working normally on localhost and only I have problems if I close the application and try open it again.

    It's very strange... It takes 4 days trying to fix it but ...

  2. It is possible that if the user re-enters the page before of time out produce the error I'm trying to solve?

    I do not mean to use the Back button, but by directly entering the url or clicking on a link from another page.

    This is the log:

    [Wed Jan 25 10:05:34 2012] [error] [client 192.168.4.4] Premature end of script headers: Programa.dll
    [Wed Jan 25 10:05:34 2012] [warn] [client 192.168.4.4] ISAPI: HSE_STATUS_ERROR result from HttpExtensionProc(): C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/Programa.dll
    [Wed Jan 25 10:06:03 2012] [error] [client 80.24.113.46] Premature end of script headers: Programa.dll
    [Wed Jan 25 10:06:03 2012] [warn] [client 80.24.113.46] ISAPI: HSE_STATUS_ERROR result from HttpExtensionProc(): C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/Programa.dll
    [Wed Jan 25 10:07:13 2012] [error] [client 127.0.0.1] Premature end of script headers: programa.dll, referer: http://localhost/cgi-bin/programa.dll
    [Wed Jan 25 10:07:13 2012] [warn] [client 127.0.0.1] ISAPI: HSE_STATUS_ERROR result from HttpExtensionProc(): C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/programa.dll, referer: http://localhost/cgi-bin/programa.dll
    
    

  3. My scenario is:

    1. User close sesión and redirect to an other url.

    With this method close sessión an redirect or session stop when timeout?

    procedure TMainForm.UniButton2Click(Sender: TObject);
    begin
     UniSession.AddJS('location.href="http://www.google.com"');
    end;
    

    2. User want return to de unigui page. It´s needed manual start new session or it´s automatic?

    In case of manual start: where and how I can start a new sessión.

    In this second point I get the random error of first post. Not always, only sometimes.

  4. Continuous random problem when close session and reopen it.

    Try close sesión with:

    UniSession.AddJS('location.href=''http://google.com''');
    

    because need redirect navigation to an other page

    and with

    UniApplication.Terminate('Closed application');
    

    I try windo3s2088 server with IIS7 and Apache 2.2.

    An random problem persist with this log:

    From Unigui:

    ProgramWeb: 000003B0: 14:33:48HttpExtensionProc:EAccessViolation : Access violation at address 01B6E044 in module 'ProgramWeb.dll'. Read of address 0000005C
    

    From Apache 2.2 server

    [Mon Jan 23 14:26:31 2012] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Jan 23 14:26:31 2012] [notice] Child 2852: Exit event signaled. Child process is ending.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.3.2 for ServerName
    [Mon Jan 23 14:26:31 2012] [notice] Apache/2.2.21 (Win32) configured -- resuming normal operations
    [Mon Jan 23 14:26:31 2012] [notice] Server built: Sep  9 2011 10:26:10
    [Mon Jan 23 14:26:31 2012] [notice] Parent: Created child process 228
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.3.2 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.3.2 for ServerName
    [Mon Jan 23 14:26:32 2012] [notice] Child 228: Child process is running
    [Mon Jan 23 14:26:32 2012] [notice] Child 228: Acquired the start mutex.
    [Mon Jan 23 14:26:32 2012] [notice] Child 228: Starting 64 worker threads.
    [Mon Jan 23 14:26:32 2012] [notice] Child 2852: Released the start mutex
    [Mon Jan 23 14:26:33 2012] [notice] Child 2852: All worker threads have exited.
    [Mon Jan 23 14:26:33 2012] [notice] Child 2852: Child process is exiting
    [Mon Jan 23 14:26:33 2012] [notice] Child 228: Starting thread to listen on port 80.
    [Mon Jan 23 14:27:36 2012] [error] [client 192.168.4.4] C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico is not executable; ensure interpreted scripts have "#!" or "'!" first line, referer: http://192.168.3.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:27:36 2012] [error] [client 192.168.4.4] (9)Bad file descriptor: don't know how to spawn child process: C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico, referer: http://192.168.3.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:27:38 2012] [error] [client 192.168.4.4] C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico is not executable; ensure interpreted scripts have "#!" or "'!" first line, referer: http://192.168.3.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:27:38 2012] [error] [client 192.168.4.4] (9)Bad file descriptor: don't know how to spawn child process: C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico, referer: http://192.168.3.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:27:38 2012] [error] [client 192.168.4.4] C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico is not executable; ensure interpreted scripts have "#!" or "'!" first line, referer: http://192.168.3.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:27:38 2012] [error] [client 192.168.4.4] (9)Bad file descriptor: don't know how to spawn child process: C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico, referer: http://192.168.3.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:27:42 2012] [error] [client 192.168.4.4] C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico is not executable; ensure interpreted scripts have "#!" or "'!" first line, referer: http://192.168.3.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:27:42 2012] [error] [client 192.168.4.4] (9)Bad file descriptor: don't know how to spawn child process: C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico, referer: http://192.168.3.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:27:43 2012] [error] [client 192.168.4.4] C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico is not executable; ensure interpreted scripts have "#!" or "'!" first line, referer: http://192.168.3.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:27:43 2012] [error] [client 192.168.4.4] (9)Bad file descriptor: don't know how to spawn child process: C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico, referer: http://192.168.3.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:28:00 2012] [error] [client 127.0.0.1] C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico is not executable; ensure interpreted scripts have "#!" or "'!" first line, referer: http://localhost/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:28:00 2012] [error] [client 127.0.0.1] (9)Bad file descriptor: don't know how to spawn child process: C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico, referer: http://localhost/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:28:02 2012] [error] [client 192.168.4.4] C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico is not executable; ensure interpreted scripts have "#!" or "'!" first line, referer: http://192.168.3.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:28:02 2012] [error] [client 192.168.4.4] (9)Bad file descriptor: don't know how to spawn child process: C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico, referer: http://192.168.3.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:30:12 2012] [error] [client 127.0.0.1] C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico is not executable; ensure interpreted scripts have "#!" or "'!" first line, referer: http://localhost/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:30:12 2012] [error] [client 127.0.0.1] (9)Bad file descriptor: don't know how to spawn child process: C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/img/80.ico, referer: http://localhost/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:30:19 2012] [error] [client 192.168.4.4] Premature end of script headers: ProgramWeb.dll
    [Mon Jan 23 14:30:19 2012] [warn] [client 192.168.4.4] ISAPI: HSE_STATUS_ERROR result from HttpExtensionProc(): C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:30:23 2012] [error] [client 192.168.4.4] Premature end of script headers: ProgramWeb.dll
    [Mon Jan 23 14:30:23 2012] [warn] [client 192.168.4.4] ISAPI: HSE_STATUS_ERROR result from HttpExtensionProc(): C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:31:08 2012] [error] [client 192.168.4.4] Premature end of script headers: ProgramWeb.dll
    [Mon Jan 23 14:31:08 2012] [warn] [client 192.168.4.4] ISAPI: HSE_STATUS_ERROR result from HttpExtensionProc(): C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:31:18 2012] [error] [client 192.168.3.2] Premature end of script headers: ProgramWeb.dll
    [Mon Jan 23 14:31:18 2012] [warn] [client 192.168.3.2] ISAPI: HSE_STATUS_ERROR result from HttpExtensionProc(): C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin/ProgramWeb.dll
    [Mon Jan 23 14:31:18 2012] [error] [client 192.168.3.2] File does not exist: C:/Archivos de programa/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
    [Mon Jan 23 14:31:21 2012] [error] [client 192.168.3.2] File does not exist: C:/Archivos de programa/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
    

    I see this thred about ISAPI / Multi processor problem and I do not know if this may be the cause:

    http://www.delphigroups.info/2/5/337564.html
    

    I use IbObjects. See http://www.ibobjects.../ibowhatis.html

     

    Multi-tier Development

    IB Objects caters admirably for middle-tier application server, CGI, WIN-CGI and ISAPI styles of application development, where a tight, stable connectivity core and high performance are demanded. These components are well-proven in multi-threading applications. Under most circumstances IBO handles sessions in multi-threaded apps automatically via thread local storage mechanisms. In applications where explicit session control is required, such as an ISAPI module, IBO's TIB_Session provides the necessary isolation.

    IBO 4 introduces explicit support for connection pooling, very suitable for ISAPI applications, because each web hit can close its own connection if it used one; and connection handles need not be wasted on hits that turn out not to need a connection.

    What's your opinion.

    Thanks.

  5. Excuse my ignorance but I dont understand this:

    Does above code wait until email is sent?

    The mail has been sent when it reaches the end of the procedure:

    how do you understand that email is sent?

    This is the real code:

    procedure TUsuCorreo.BCorreoClick(Sender: TObject);
    var SMTP: TIdSMTP;
      Mensaje: TIdMessage;
      Adjunto: TIdAttachmentFile;
    begin
     try
        SMTP.Connect;
     except
       MessageDlg('Erro ó conectar co servidor', mtWarning, []);
       Exit;
     end;
     if SMTP.Connected then begin
        try
          SMTP.Send( Mensaje );
        except
          MessageDlg('Erro ó enviar a mensaxe', mtWarning, []);
          Exit;
        end;
        try
           SMTP.Disconnect;
        except
          MessageDlg('Erro ó desconectar do servidor', mtWarning, []);
          Exit;
        end;
     end;
     if Adjunto <> nil then
    FreeAndNil( Adjunto );
     FreeAndNil( Mensaje );
     FreeAndNil( SMTP );
     MessageDlg('Enviuse o contrasinal ó Email que tes no teu perfil de usuario.', mtWarning, []);
    end;
    

  6. thanks for the response.

    I tried several ways to use UniScreenMask and have not found any satisfactory.

    This is my last code to send an email. I need to lock the window while sent email and at the end show a menssage with the action result.

    this is my code:

    procedure TUsuCorreo.BCorreoClick(Sender: TObject);
    var SMTP: TIdSMTP;
      Mensaje: TIdMessage;
      Adjunto: TIdAttachmentFile;
    begin
     BCorreo.Visible := false;
     LErro.Caption := 'ENVIANDO MAIL';
     Lerro.Refresh;
     Resultado := '';
     with TIniFile.Create(FicIni) do begin
       try
         sHost := ReadString('RH','MAIL_HOST','');
         sPort := ReadString('RH','MAIL_PORT','');
         sUsuario := ReadString('RH','MAIL_USUARIO','');
         sClave := ReadString('RH','MAIL_CLAVE','');
         sFromNome := ReadString('RH','MAIL_FROMNOME','');
         sFromEmail := ReadString('RH','MAIL_FROMEMAIL','');
         sReplyTo := ReadString('RH','MAIL_REPLYTO','');
         sAdjunto  := '';
         sCopia := ReadString('RH','MAIL_COPIA','');
         sAsunto := 'Web, reenvio de clave de acceso de usuario';
         sMensaje  :=
           '<html><body>'+
           '<p>Solicitou Vde. o reenvio do constrasinal para acceder á web'+
           '<p>Os seus datos de acceso son:'+
           '<p>Usuario: <b>'+UniMainModule.QueryUsu.FieldByName('TER_DNI').AsString+'</b>'+
           '<p>Contrasinal: <b>'+UniMainModule.QueryUsu.FieldByName('EXPDIA_CLAVE').AsString+'</b>'+
           '<br><p>Trate estos datos con prudencia xa que dan acceso a información confidencial'+
           '</body></html>';
       except
         Resultado := 'Erro ó cargar parámetros';
       end;
     end;
     Resultado := '';
     SMTP := TIdSMTP.Create( nil );
     SMTP.Username := sUsuario;
     SMTP.Password := sClave;
     SMTP.Host := sHost;
     try
       SMTP.Port := strtoint(sPort);
     except
       SMTP.Port := 25;
     end;
     SMTP.AuthType := satDEFAULT;       
     Mensaje := TIdMessage.Create( nil );
     Mensaje.Clear;
     Mensaje.ReplyTo.EMailAddresses := sReplyTo;
     with TIdText.Create(Mensaje.MessageParts, nil) do begin
       Body.Text := sMensaje;
       ContentType := 'text/html';
     end;
     Mensaje.ContentType := 'multipart/alternative';
     Mensaje.From.Name := sFromNome;
     Mensaje.From.Address := sFromEmail;
     Mensaje.Subject := sAsunto;
     if trim(sCopia)<>'' then begin
       Mensaje.BccList.Add;
       Mensaje.BccList.Items[0].Address := sCopia;
     end;
     Mensaje.Recipients.Add;
     Mensaje.Recipients.Items[0].Address := sDestino;
     if sAdjunto <> '' then begin
        if FileExists( sAdjunto ) then
          Adjunto := TIdAttachmentFile.Create(Mensaje.MessageParts, sAdjunto);
     end else
        Adjunto := nil;
     try
        SMTP.Connect;
     except
       Resultado := 'Erro ó conectar co servidor';
     end;
     if SMTP.Connected then
     begin
        try
          SMTP.Send( Mensaje );
        except
          Resultado := 'Erro ó enviar a mensaxe';
        end;
        try
           SMTP.Disconnect;
        except
          Resultado := 'Erro ó desconectar do servidor';
        end;
     end;
     if Adjunto <> nil then
        FreeAndNil( Adjunto );
     FreeAndNil( Mensaje );
     FreeAndNil( SMTP );
     Resultado := 'Enviuse o contrasinal ó Email que tes no teu perfil de usuario.';
     LErro.Caption := Resultado;
     LErro.Refresh;
     Lerro.Repaint;
    end;
    

    And UniScreenMask:

     object Espera: TUniScreenMask
       AttachedControl = BCorreo
       Enabled = True
       DisplayMessage = 'Enviando eMail'
       Left = 218
       Top = 72
     end
    

    How I do for Uniscreenmask display throughout the event?.

    Thanks.

  7. I solved this by creating a datamodule for each form and placing ther the Datasets, datasources and transaction.

    Now work fine.

    What is method for close sessión and redirect to an other page?

    This is well?:

      UniMainModule.QueryUsu.Close;
     UniMainModule.Conexion.Connected:=false;
     UniSession.AddJS('location.href="http://www.paxina.es"');

    tnkx.

  8. My scenario is: UniGUI Beta v0.87.0.907, Ibojects Datasets, Window Xp or Server2008, Delphi XE, Apache 2.2. Run in Isapi Mode.

    In Main Module I have: Only one IbConnection for all forms and 1 IbTransaction+IbQuery+Datasource for login chack.

    In each form I have one IBtransaction and some IbQuery+DataSource.

    I get random and unexpected results:

    Some times work fine.

    Other times, when I open the same form I get an error: "Access violation at addreess...". . And if I try to reload the original page I get an erro: "Internal Server Error - The server encountered an internal error or misconfiguration and was unable to complete your request". Then I need to restart the apache.

    If close aplication with:

      UniMainModule.QueryUsu.Close;
     UniMainModule.Conexion.Connected:=false;
     UniSession.AddJS('location.href="http://www.paxina.es"');

    When reopen obtain this message: Error 500 - Premature end of script headers: program.dll.

    I know I'm doing something wrong but do not know which.

    Can anyone help me or show me some manual.

×
×
  • Create New...