Windows Perl Scripting Forums » General

Win32::Daemon?

(8 posts)

  1. vyoufinder
    Member

    I admit I am new to all this but I am willing to learn patiently. I need the daemon for installing Webmin on my Windows 2000 based server and the link at http://www.roth.net/perl/Daemon/ is listed as being:

    ftp://ftp.roth.net/pub/ntperl/Daemon/20020606 but it is not working - is there a new link or place I can download it?

    Second question is that I don't know how to install it. Am I supposed to place it in a specific folder and then tell Windows to run it as a service? Little help please?
    Posted 10 years ago #
  2. Dave
    Perl guy

    The easiest way to install it is to use Perl's Package Manager (PPM). Chane into the Perl bin directory (usually c:\perl\bin) and run:

    ppm install http://www.roth.net/perl/packages/win32-daemon.ppd



    That should auto-install the win32::daemon extension and you are ready to go!

    Alternatively you can do the manual work and download it from the URL you cited. However you may need to tell your FTP client to use passive mode. If you are still blocked from getting that use your web browser:
    http://www.roth.net/ftp/pub/ntperl/Daemon/20020606/

    dave
    Posted 10 years ago #
  3. vyoufinder
    Member

    I think those directions are the same as on your site?! I went to the directory where I have perl installed. Where would I type that line of code?

    I have also downloaded the files and unzipped but there doesn't appear to be an install program. The files I get when I unzip are:

    daemon.pm
    Win32-daemon.ppm
    bin\daemon.pl
    test\autostart.pl
    test\daemon.pl
    test\Create.pl
    test\Daemon_Template.pl

    What do I do with those files to have it installed?

    Thanks for the prompt reply and help thus far!
    Posted 10 years ago #
  4. vyoufinder
    Member

    I don't know where to type in that line of code - am I supposed to open a program or something like that? It's really not any clearer than before. Can you offer any help anyone?
    Posted 10 years ago #
  5. Dave
    Perl guy

    You want to run the PPM command (see above) from a command line prompt. With your mouse press the "Start" button (lower left of your screen) then select the "Run" option. In the resulting dialog window type in

    cmd.exe

    then hit enter.
    This will open a "command box" where you can type in commands (this is sometimes called a DOS box). Once you have done that type in:

    c:

    then hit the enter key
    Next type in

    cd \perl\bin

    then hit the enter key
    Finally type in

    ppm install http://www.roth.net/perl/packages/win32-daemon.ppd

    and it should auto-download and auto-install the Win32::Daemon extension.
    Posted 10 years ago #
  6. vyoufinder
    Member

    That worked! Wow! Thank you very much for your patience with me! I really appreciate it and thank you thank you thank you! Chuc Mung Nam moi!
    Posted 10 years ago #
  7. Anonymous

    Assuming that Perl.exe is in c:\perl\bin and the service script is c:\perl\scripts\service.pl then this script will install the script as a service. Since no user is specified it defaults to the LocalSystem.

    use Win32::Daemon;
    %Hash = (
    name => 'PerlTest',
    display => 'Oh my GOD, Perl is a service!',
    path => 'c:\perl\bin\perl.exe',
    user => '',
    pwd => '',
    parameters =>'c:\perl\scripts\service.pl',
    );
    if( Win32::Daemon::CreateService( \%Hash ) )
    {
    print "Successfully added.\n";
    }
    else
    {
    print "Failed to add service: " . Win32::FormatMessage( Win32::Daemon::GetLastError() ) . "\n";
    }

    Posted 7 years ago #
  8. Anonymous

    Sorry folks,

    but the installation of Win32::Daemon does't work at my machine.

    I have installed ActivePerl 5.10
    Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
    Platform:
    osname=MSWin32, osvers=5.00, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    Compiler:
    cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -
    DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IM
    PLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
    optimize='-MD -Zi -DNDEBUG -O1',
    cppflags='-DWIN32'
    ccversion='12.00.8804', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksi
    ze=8
    alignbytes=8, prototype=define
    Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:
    \Perl\lib\CORE" -machine:x86'
    libpth=\lib
    libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32
    .lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_
    32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib
    perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comd
    lg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib
    ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl510.lib
    gnulibc_version=''
    Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -
    libpath:"C:\Perl\lib\CORE" -machine:x86'

    Characteristics of this binary (from libperl):
    Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
    PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
    PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS
    USE_LARGE_FILES USE_PERLIO USE_SITECUSTOMIZE
    Locally applied patches:
    ActivePerl Build 1004 [287188]
    33741 avoids segfaults invoking S_raise_signal() (on Linux)
    33763 Win32 process ids can have more than 16 bits
    32809 Load 'loadable object' with non-default file extension
    32728 64-bit fix for Time::Local
    Built under MSWin32
    Compiled at Sep 3 2008 13:16:37
    @INC:
    C:/Perl/site/lib
    C:/Perl/lib
    .

    In ppm is just the modules of ActiveState listed, while the repo of roth.net also is entered.

    Where can I get a working installation for Daemon?

    Need a little help, christian

    Posted 7 years ago #

RSS feed for this topic

Reply

You must log in to post.