writing to files on an IIS server
I have some CGI scripts on a Chinese Windows 2000 server running IIS, with ActivePerl installed. I am able to read from files but not write. So the following code, using CGI::Application: sub register { my $self = shift; # Get CGI query object my $q = $self-query(); my $output = $q-header; $output .= $q-start_html; $output .= $q-h1(HI ok there?); open (DB, db) or die No read from db: $!\n; while (DB) { $output .= $q-h2($_); } close DB; $output .= $q-h2(umask); $output .= $q-end_html(); return $output; returns the contents of db: Content-Type: text/html; charset=ISO-8859-1 HI ok there? ok not ok test 1 test 2 test 3 test 4 But when I change open (DB, db) or die No read from db: $!\n; to open (DB, db) or die No write to db: $!\n; I get this returned: Error in CGI Application CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: [Thu Jan 10 16:44:02 2002] D:\penpals CGI\Ppsite.pl: Error executing run mode 'mode2'. Eval of code '$self-register' resulted in error: No write to db: Permission denied I tried the umask function, but although it seemed to be setting something it is not allowing me to write to the file. What is the problem here? It looks to me like something which should have been handled installing ActivePerl, but it is difficult for me to do anything with the Windows machine or communicate with the people responsible for it. -- Greg MathesonTo do is to be-- Descartes Chinmin College To be is to do-- Voltaire Do be do be do-- Frank Sinatra (Anonymous - Men's Restrooms, Greasewood Flats, Scottsdale) Taiwan Penpals Archive URL: http://netcity.hinet.net/kurage -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Something weird...
Well.. Reason why I send this source here is that I can't see neither passwordfield nor submit button. There might be some problems further, but I haven't got as far. Source ain't long so I hope you find my mistakes fast. hlservu is executable on server which runs CS-server with paladin. #!/usr/bin/perl #cs.cgi use CGI qw(:standard); $passu='password'; $exe='hlservu'; if (!param) { print header('text/html'), start_html( -title='Serverin hallintaa', -author='Mikael Haapakoski'), start_form(-method='GET'), h1('Datakommuunin CS-serverin paalle kytkenta'), h5('Salasana'), print password_field( -name='salasana', -size = 20), submit('ON'), end_form(), end_html(), } else { $salasana = param('salasana'); if ($passu eq $salasana) { exec $exe; print header('text/html'), start_html( -title='Serverin hallintaa', -author='Mikael Haapakoski'), h1('toimaa'), end_html(), } else { print header('text/html'); start_html( -title='Serverin hallintaa', -author='Mikael Haapakoski'); h1('Ei toimi'); end_html; } } __ Tämän ilmaisen suomalaisen sähköpostin tarjosi http://www.jippii.fi/ Käy tutustumassa netin parhaaseen pelipaikkaan Pasimaailmaan. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help editing config.pm
Can someone give me advice on how to properly edit config.pm to set up my URL lists so CPAN can download the modules I need. I am on a G4 Mac running OS 10.1.2 latest updates. I have just reinstalled and allowed CPAN to autoconfig. Here is a copy of my o conf results: cpan o conf CPAN::Config options and /Users/admin/.cpan/CPAN/MyConfig.pm: commit Commit changes to disk defaults Reload defaults from disk init Interactive setting of all options build_cache10 build_dir /Users/admin/.cpan/build cpan_home /Users/admin/.cpan ftp/usr/bin/ftp ftp_proxy getcwd cwd gzip /usr/bin/gzip http_proxy inactivity_timeout 0 index_expire 1 inhibit_startup_message 0 keep_source_where /Users/admin/.cpan/sources lynx make /usr/bin/make make_arg make_install_arg makepl_arg ncftp /usr/bin/ncftp ncftpget no_proxy pager /usr/bin/less prerequisites_policy follow scan_cache atstart shell /bin/tcsh tar/usr/bin/tar unzip /usr/bin/unzip urllist wait_list wait://ls6.informatik.uni-dortmund.de:1404 TIA --- Jeremy SchwartzStarmark Interactive Designer [EMAIL PROTECTED]954-761-1600 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2 Q's, Google and Me - can you spell it out?
Dear all, I tried to make some adjustments to the script for Google. I made a form like this: html head meta name=GENERATOR content=Microsoft FrontPage 5.0 meta name=ProgId content=FrontPage.Editor.Document meta http-equiv=Content-Type content=text/html; charset=windows-1252 titleNew Page 2/title /head body blockquote form action=http://www.voelspriet.nl/cgi-bin/voelspriet1.cgi; method=get target=_blank input type=text maxlength=30 name=q size=20 / input type=submit value=1 / Doorzoek alleen de titels van websites /form /blockquote blockquote form action=http://www.voelspriet.nl/cgi-bin/voelspriet2.cgi; method=get target=_blank input type=text maxlength=30 name=q size=20 value=www. / input type=submit value=2 / Tik een naam van een site, bv. a href=http://www.voelspriet.nl;www.voelspriet.nl/a en kijk hoe vaak de site aangehaald wordt door anderen/form /blockquote blockquote form action=http://www.voelspriet.nl/cgi-bin/voelspriet3.cgi; method=get target=_blank input type=text maxlength=30 name=q size=20 / input type=submit value=2 / Bekijk alleen de sites die Google de afgelopen drie maanden heeft opgenomen/form /blockquote blockquote form action=http://www.voelspriet.nl/cgi-bin/voelspriet4.cgi; method=get target=_blank input type=text maxlength=30 name=q size=20 / input type=submit value=2 / Bekijk alleen de sites die Google de afgelopen zes maanden heeft opgenomen/form /blockquote blockquote form action=http://www.voelspriet.nl/cgi-bin/voelspriet5.cgi; method=get target=_blank input type=text maxlength=30 name=q size=20 / input type=submit value=2 / Bekijk alleen de sites die Google de afgelopen 12 maanden heeft opgenomen/form /blockquote blockquote form action=http://www.voelspriet.nl/cgi-bin/voelspriet5.cgi; method=get target=_blank input type=text maxlength=30 name=q size=20 / input type=submit value=2 / Voor webmasters: vul uw website in /form /blockquote /body /html And the cgi's look like this: voelspriet1.cgi $| = 1; $q = $ENV{QUERY_STRING}; $q = join('', grep(/^q=/, split(//, $q))); $q =~ s/^q=//; print Location: http://www.google.com/search?q=allintitle:+$qhl=nllr=lang_nl\n\n;; voelspriet5.cgi $| = 1; $q = $ENV{QUERY_STRING}; $q = join('', grep(/^q=/, split(//, $q))); $q =~ s/^q=//; print Location: http://www.google.com/search?q=$q+as_qdr=y1hl=nllr=lang_nl\n\n;; Can you tell me if this is ok, since you guys gave me some longer code. Henk van Ess www.voelspriet.nl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]