Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 310 of 808  Not logged in ELOG logo
New entries since:Thu Jan 1 01:00:00 1970
ID Date Icon Authordown Author Email Category OS ELOG Version Subject
  66957   Fri Nov 26 09:44:22 2010 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2.8.0-2313Re: Don't see login page - Self register = 1

Christoph Kukulies wrote:
I only need to know how I get an admin passwd and user into the passwd file.
elogd -a password -l logbook does not have the desired effect. It spoils the cfg-file
again with Admin Password commands.


I told you twice (once in this thread) that you should not mix "password file" with "admin password". These are two different authentication schemes and may not be combined. What you need is only "admin user = <name>" in your config file as written in the documentation.
  66960   Fri Nov 26 12:36:53 2010 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2.8.0-2344Re: New User in Config Menu ?

Christoph Kukulies wrote:

I see only Save Back Change Password Remove User in Config Menu.

How can I create a New User?

[global]
Port=8880
SSL=1
;Self register = 1
Password file = passwd
admin user = kuku
SMTP host = smtp.mydomain

[Demo]

Attributes = Author, Status

 

The documentation is mentioning a Config Menu and a New User item there. 

You have to be admin user to see that Config Menu.

Admin user = kukulies             (or whatever your login name is)

  66966   Fri Dec 3 16:48:26 2010 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2.8.0Re: Adding attachment to an existing entry

Mariusz Stakowski wrote:

Hello,

I have a problem when I try to edit an existing entry. I want to add an attachment. I can upload an attachment to the existing entry, but submitting it does not seem to work. The  added attachment is not visible. But it exists in logbook directory. The only way I found to add it, is to use "Resubmit as new entry" which is not quite what I want. Is it a design feature or perhaps I'm doing something wrong ?

I need to reproduce this problem in order to fix it. Do you see the same problem on the "Demo" forum?

https://midas.psi.ch/elogs/Linux+Demo/

  66968   Mon Dec 6 12:40:31 2010 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2.8.0Re: Adding attachment to an existing entry

Mariusz Stakowski wrote:

Stefan Ritt wrote:

Mariusz Stakowski wrote:

Hello,

I have a problem when I try to edit an existing entry. I want to add an attachment. I can upload an attachment to the existing entry, but submitting it does not seem to work. The  added attachment is not visible. But it exists in logbook directory. The only way I found to add it, is to use "Resubmit as new entry" which is not quite what I want. Is it a design feature or perhaps I'm doing something wrong ?

I need to reproduce this problem in order to fix it. Do you see the same problem on the "Demo" forum?

https://midas.psi.ch/elogs/Linux+Demo/

I'm sorry for the false alert :(. I was trying to submit edited entry using "upper submit" (just under the logbook name strip). I have tried "lower submit" (under Attachment 2) and it works with no problem. 

Well, also the "upper submit" button should work. I just tried at the demo logbook, and it worked fine (there is however now the problem that one has to click Submit twice to make it work). Can you check yourself? 

  66970   Tue Dec 7 09:38:56 2010 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows280-5Re: How can Elog start automatically on Windows Server 2008 on startup ?

Philipp W. wrote:

 Hi all,

i have a question... How can i manage it that elog starts automatically on windows startup ? I  always need to type "elogd -p 85" in the console that it starts ...

Can anyone help me ? =)

 

Thanks

 

SenoX

If you install elog with the installer from the distribution, it installs elog as a windows service, which is started automatically when windows starts. 

  66971   Tue Dec 7 09:40:19 2010 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2.8.0Re: Adding attachment to an existing entry

Stefan Ritt wrote:

 

there is however now the problem that one has to click Submit twice to make it work

I fixed this problem in the current SVN revision, so now a single click to the Submit button is enough again. 

  66976   Wed Dec 15 08:49:30 2010 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2.8Re: how to retrieve attachment on execute new

Zbigniew Reszela wrote:

Zbigniew Reszela wrote:

Hello all,

I have a problem with retrieving attachments of an entry on "Execute new" command. In the syntax of elodg.cfg it is: In addition the list of all attachments can be referred to via $<attachment>. Could anyone explain it a little bit more explicit, or attach an example?

Thank you in advance.

 

Hello again,

I have managed with problem by using $attachments. This provides me a list o paths to attachments. If it's the correct way to use it please change elogd.cfg syntax page.

Thanks a lot.

Yes, indeed there was a typo in the documentation, $attachments is the correct one. I changed that in the syntax page.

  66977   Wed Dec 15 16:42:32 2010 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows2.8Re: elog as a service in windows not detect Imagemagick

Diego Obradors Campos wrote:

I have installed elog 2.8 in a windows pc with the installer from the distribution, it installs elog as a windows service, which is started automatically when windows starts.

It is done as:

"C:\Archivos de programa\ELOG\elogd.exe" -D -c "C:\Archivos de programa\ELOG\elogd.cfg"

Moreover Imagemagick and GhostScript are in the path:

Version: ImageMagick 6.6.4-6 2010-09-21 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP 

However the indexing loogbooks are only working  fine when elog is started interactively.  Is there any posiblity to start elog as a service and use thumbnails for quick preview?

Thank you in advance!

 

This is a know problem. I did not achieve to create the imagemagic subprocess and read its output when elogd is started as a service. Attached is the code doing that, I found it as an example from Microsoft. But even after hours of work, I could not get it running inside the service. If anybody has any idea, please let me know. 

Attachment 1: my_shell.c
int my_shell(char *cmd, char *result, int size)
{
   HANDLE hChildStdinRd, hChildStdinWr, hChildStdinWrDup,
       hChildStdoutRd, hChildStdoutWr, hChildStderrRd, hChildStderrWr, hSaveStdin, hSaveStdout, hSaveStderr;

   SECURITY_ATTRIBUTES saAttr;
   PROCESS_INFORMATION piProcInfo;
   STARTUPINFO siStartInfo;
   char buffer[10000];
   DWORD dwRead, dwAvail, i;

   /* Set the bInheritHandle flag so pipe handles are inherited. */
   saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
   saAttr.bInheritHandle = TRUE;
   saAttr.lpSecurityDescriptor = NULL;

   /* Save the handle to the current STDOUT. */
   hSaveStdout = GetStdHandle(STD_OUTPUT_HANDLE);

   /* Create a pipe for the child's STDOUT. */
   if (!CreatePipe(&hChildStdoutRd, &hChildStdoutWr, &saAttr, 0))
      return 0;

   /* Set a write handle to the pipe to be STDOUT. */
   if (!SetStdHandle(STD_OUTPUT_HANDLE, hChildStdoutWr))
      return 0;

   /* Save the handle to the current STDERR. */
   hSaveStderr = GetStdHandle(STD_ERROR_HANDLE);

   /* Create a pipe for the child's STDERR. */
   if (!CreatePipe(&hChildStderrRd, &hChildStderrWr, &saAttr, 0))
      return 0;

   /* Set a read handle to the pipe to be STDERR. */
   if (!SetStdHandle(STD_ERROR_HANDLE, hChildStderrWr))
      return 0;

   /* Save the handle to the current STDIN. */
   hSaveStdin = GetStdHandle(STD_INPUT_HANDLE);

   /* Create a pipe for the child's STDIN. */
   if (!CreatePipe(&hChildStdinRd, &hChildStdinWr, &saAttr, 0))
      return 0;

   /* Set a read handle to the pipe to be STDIN. */
   if (!SetStdHandle(STD_INPUT_HANDLE, hChildStdinRd))
      return 0;

   /* Duplicate the write handle to the pipe so it is not inherited. */
   if (!DuplicateHandle(GetCurrentProcess(), hChildStdinWr, GetCurrentProcess(), &hChildStdinWrDup, 0, FALSE,   /* not inherited */
                        DUPLICATE_SAME_ACCESS))
      return 0;

   CloseHandle(hChildStdinWr);

   /* Now create the child process. */
   memset(&siStartInfo, 0, sizeof(siStartInfo));
   siStartInfo.cb = sizeof(STARTUPINFO);
   siStartInfo.lpReserved = NULL;
   siStartInfo.lpReserved2 = NULL;
   siStartInfo.cbReserved2 = 0;
   siStartInfo.lpDesktop = NULL;
   siStartInfo.dwFlags = 0;

   /* command to execute */
   sprintf(buffer, "cmd /q /c %s", cmd);

   if (!CreateProcess(NULL, buffer,     /* command line */
                      NULL,     /* process security attributes */
                      NULL,     /* primary thread security attributes */
                      TRUE,     /* handles are inherited */
                      0,        /* creation flags */
                      NULL,     /* use parent's environment */
                      NULL,     /* use parent's current directory */
                      &siStartInfo,     /* STARTUPINFO pointer */
                      &piProcInfo))     /* receives PROCESS_INFORMATION */
      return 0;

   /* After process creation, restore the saved STDIN and STDOUT. */
   SetStdHandle(STD_INPUT_HANDLE, hSaveStdin);
   SetStdHandle(STD_OUTPUT_HANDLE, hSaveStdout);
   SetStdHandle(STD_ERROR_HANDLE, hSaveStderr);

   memset(result, 0, size);

   do {
      /* query stdout */
      do {
         if (!PeekNamedPipe(hChildStdoutRd, buffer, 256, &dwRead, &dwAvail, NULL))
            break;
         if (dwRead > 0) {
            ReadFile(hChildStdoutRd, buffer, 256, &dwRead, NULL);
            buffer[dwRead] = 0;
            strlcat(result, buffer, size);
         }
      } while (dwAvail > 0);

      /* query stderr */
      do {
         if (!PeekNamedPipe(hChildStderrRd, buffer, 256, &dwRead, &dwAvail, NULL))
            break;
         if (dwRead > 0) {
            ReadFile(hChildStderrRd, buffer, 256, &dwRead, NULL);
            buffer[dwRead] = 0;
            strlcat(result, buffer, size);
         }
      } while (dwAvail > 0);

      /* check if subprocess still alive */
      if (!GetExitCodeProcess(piProcInfo.hProcess, &i))
         break;
      if (i != STILL_ACTIVE)
         break;

      /* give some CPU to subprocess */
      Sleep(10);

   } while (TRUE);

   CloseHandle(hChildStdinWrDup);
   CloseHandle(hChildStdinRd);
   CloseHandle(hChildStderrRd);
   CloseHandle(hChildStdoutRd);

   /* strip trailing CR/LF */
   while (strlen(result) > 0 && (result[strlen(result) - 1] == '\r' || result[strlen(result) - 1] == '\n'))
      result[strlen(result) - 1] = 0;

   return 1;
}
ELOG V3.1.5-3fb85fa6