Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Windows 2000 Server and Installing Perl

by Zo (Scribe)
on Oct 05, 2001 at 21:44 UTC ( #117055=perlquestion: print w/replies, xml ) Need Help??

Zo has asked for the wisdom of the Perl Monks concerning the following question:

Hello all...
I installed and have successfully used Perl on my desktop. No problem, figured out how to instal modules, etc.. all in one day's sitting.
Now I have to install Perl onto a server, windows 2000. I downloaded the ActivePerl onto my system, followed the intal wizard that comes with it... and blam... installed, yes?
Not so simple.
I want to now load DBI onto it. I got to cpan and get the DBI file. No problem, download,etc... I try to "makefile.pl" and I get an error that the version of perl is too old, (i think it said the 5.003 version) when I need atleast the 5.004. Now I downloaded Perl the same way and i got 5.06... on my windows 2000 professional. It seems that although there are many README files to read through, sometimes it seems like it's a bit 'obfuscated' and my brain capacity can't always comprehend. (too much drugs and booze when a child?)
Can someone guide me into what I'm doing wrong? Should I be downloading something else? Has anyone come across this...?
I'm going to be humble and admit that although I'm an "applications developer", when it comes to server admin stuff I'm not the brightest bulb in the lamp.
Thanks again in advance for all your help.
brother Zo.
  • Comment on Windows 2000 Server and Installing Perl

Replies are listed 'Best First'.
Re: Windows 2000 Server and Installing Perl (boo)
by boo_radley (Parson) on Oct 05, 2001 at 21:56 UTC
    1. what does perl -v report? It should be something around v5.6.1, not 5.00(34).
    2. If possible, use PPM instead of CPAN; activestate's put quite a bit of effort into making sure non-pure perl modules work well on windows and sometimes the versions on cpan won't compile correctly (at least, using gcc & nmake, ime). Most of the time, this clears up module install problems on windows.
      thanks, i will try again using the PPM. For some reason if i could remember correctly that the PPM had an older version of the DBI which was the reason why I went to cpan for it, when I originally downloaded onto my pc here. Said i needed a minimum version, but I guess it should work with the 5.004 version now.. so I will retry and use that. As far as the 'perl -v', yes i did do that and I thought i would get the v5.6...also. But I'll give it one more try.. play around a bit more..see what happens.
      Thank you.
      Zo
Re: Windows 2000 Server and Installing Perl
by CubicSpline (Friar) on Oct 05, 2001 at 22:43 UTC
    I absolutely agree that you should use PPM to install new packages. It's just so much nicer. You can install from a package repository on the net, or you can easily install downloaded modules.

    Here's what I do (using ActiveState on 98/NT,2000):

    1. Get the module in Zip format from ActiveState at their Zip Repository and save the zip to your machine.
    2. Unzip the archive: you'll see a .ppd file and at least one folder
    3. Open a command prompt and cd to whereever you unzipped the package and type: ppm install <packagename>.ppd.
    4. Voila!
      Here we go again...
      I re-installed Perl onto the machine. It works. that's good.
      I use the PPM and install DBD-Oracle8 (1.06). It installs. Good.
      Run a lil' test script to connect to database and extract, (which works on my pc).. and i get an error that it doesn't recognize the 'DBI' (from my USE DBI on line 3). ok...
      I go back to PPM annd upgrade to DBI (1.14).. try again, same error. so now i go and see about downloading from cpan again and i get this error:
      Perl 5.004 required--this is only version 5.00307, stopped at makefile.pl line 10. BEGIN failed--compilation aborted at makefile.pl line 12.
      I think cause it's a friday here and the day's ending.. and I'm kinda burnt out from the week that i could be missing a small thing and an extra pair of eyes would help me out.. being that I'm the only 'perl' coder here at work.. this is my only resource of help.
      thanks in advance again for any help.
      brother Zo
        here is the code and the following is the error... this works fine on other computer and server but having one issue with this specific server (win.2000, perl v5.6..)
        #!perl use DBI; my $dbh = DBI-connect "dbi:Oracle:Db01", "developer", "dev12" ); my $statement = $dbh->prepare( "SELECT * from developer.stats" ); $statement->execute(); my @row = $statement->fetchrow_array(); print @row;


        error message:
        C:\>connect.pl DBD::Oracle::db prepare failed: ORA-00942: table or view does not exis +t (DBD ERR OR: OCIStmtExecute/Describe) at C:\connect.pl line 9. Can't call method "execute" on an undefined value at C:\connect.pl lin +e 11.

        table does exist and connects and executes everywhere else..
        baffled brother Zo.
        Hello again...
        I've been working on this for quite some time now and I still end up in the same spot, like I'm chasing my own tail.. doing a lot of work, but going in circles and accomplishing nothing.
        What it comes down to is that I get the older version of Perl when I try to download/install (5.003...) see prior posting the lastest stable version (5.6....)
        I've used PPM, ActivePerl, etc.. and I can't seem to figure out why when I try to load Perl on my Windows 2000 server it's not getting the latest version? I need the lastest version so that I could use certain DBI modules that are not supported in the latter versions.
        Please any suggestions?
        Thank you very much in advance for any help.
        brother Zo.
Re: Windows 2000 Server and Installing Perl
by rrwo (Friar) on Oct 06, 2001 at 08:34 UTC

    If you're using ActiveState's Perl, try using PPM (Perl Package Manager).

    It's not as good as using CPAN, but admittedly it's a pain to get CPAN to work properly on Windows (though I think it may work better with SiePerl).


      Case I: windows 2000 professional, perl 5.6..., I was able to put it on my desktop and it works with the DBI 1.20 module from cpan. no problems.
      Case II: windows 2000 server, perl 5.6..., I was able to load on this simple server and script runs with DBI 1.2 module from cpan. no problems.
      Case III: Windows 2000 server, v5.6.1 built for MSWin32-x86-multi-thread ,I have a simple "hello world" type of file (test.pl) and it shows my hello message. I get the same download DBI 1.2 and then try to run my script (code will soon follow) and I get this error here and not on the first two cases.:
      DBD::Oracle::db prepare failed: ORA-00942: table or view does not exist (DBD ERR OR: OCIStmtExecute/Describe) at C:\Perl\connect_2.pl line 28. Can't call method "execute" on an undefined value at C:\Perl\connect_2.pl line 2 9.
      here is the code:
      #!perl ######################################################### # This perl script will go to the oracle database, run a query, extrac +t data and # create a text (.txt) file with data information for a batch # process to use. # # # October 4, 2001 ######################################################### use DBI; # output file $newfile = "./batch_test.txt"; # open the new .txt file open(BATCH, ">$newfile") || die "Can't open $newfile : the batch_test +file. $!"; # variable with query to go against cscadmin.crs_batch_lines table $asql = "SELECT batch_line FROM admin.batch_lines WHERE exe_c = 'N' +"; $bsql = "UPDATE admin.batch_lines SET exe_c = 'Y' WHERE exe_c = 'N' "; # connect to oracle and extract data my $dbh = DBI->connect("dbi:Oracle:Db001", "develop", "developer"); my $statement = $dbh->prepare($asql); $statement ->execute(); while ($newfile= $statement->fetchrow_array) { $newfile=~s/D:/\nD:/g; # write to the file print BATCH $newfile; print $newfile; } $statement->finish(); # Mark batch lines in table as read my $statement2 = $dbh->prepare($bsql); $statement2 ->execute(); $statement2->finish(); # close oracle connection $dbh->disconnect(); $dbh2->disconnect(); # close new .txt file close (BATCH);


      The following is what I see when i do a perl -V:
      C:\Perl\bin>perl -V Summary of my perl5 (revision 5 version 6 subversion 1) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=undef use5005threads=undef useithreads=define usemultip +licity=def ine useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DN +O_STRICT - DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_M +SVCRT_READ FIX', optimize='-O1 -MD -DNDEBUG', cppflags='-DWIN32' ccversion='', 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='off_t', + lseeksize =4 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -release -libpath:"C:\ +Perl\lib\C ORE" -machine:x86' libpth="C:\Perl\lib\CORE" libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib + comdlg32 .lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uui +d.lib wsoc k32.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 wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msv +crt.lib libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -l +ibpath:"C: \Perl\lib\CORE" -machine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEX +T PERL_IMP LICIT_SYS Locally applied patches: ActivePerl Build 629 Built under MSWin32 Compiled at Aug 20 2001 12:27:04 @INC: C:/Perl/lib C:/Perl/site/lib .
      any suggestions????
      and I'm sorry to keep nagging with this issue, trust me I too want it to work!!!
      thank you all...
      desperate brother Zo.

        Whoa a minute! You wrote:

        Case III: Windows 2000 server, v5.6.1 built for MSWin32-x86-multi-thread ,I have a simple "hello world" type of file (test.pl) and it shows my hello message. I get the same download DBI 1.2 and then try to run my script (code will soon follow) and I get this error here and not on the first two cases.: DBD::Oracle::db prepare failed: ORA-00942: table or view does not exist (DBD ERR OR: OCIStmtExecute/Describe) at C:\Perl\connect_2.pl line 28. Can't call method "execute" on an undefined value at C:\Perl\connect_2.pl line 2 9.

        Sounds like you're not connecting to the correct database, hence the invalid tables or views. So you can't create a statement handle.

        Do you have an updated tnsnames.ora file installed on that machine? Otherwise it won't know where the database is on the network.

Re: Windows 2000 Server and Installing Perl
by Zo (Scribe) on Oct 11, 2001 at 21:56 UTC
    hey guys..
    problem solved!
    thanks.
    brother Zo.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://117055]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2019-05-23 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (140 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!