solved, sorry (was Re: missing /virtualhost directive)
sorry for the derangement, i solved it today thanks anyway! Thomas Bach think karo... bkaro.net At 23:59 13/11/01 +0100, Thomas Bach wrote: Hello We're running a cobalt raq4 and have some problems with the apache configuration. the configuration over the web-interface works all fine, but when i add some lines in the httpd.conf for the mod_perl-things (p.ex. PerlInitHandler Apache::Reload PerlModule Apache::Registry) and some handlers of myself, a restart succeeds, but with the message: mod_perl: /VirtualHost mod_perl: Missing /VirtualHost directive at end-of-file chiliasp: module started, version 3.5.2.31 /usr/sbin/httpd and the cobalt-web-interface for server administration isn't available over the ../admin/ adress, which should be rewritten by a rule written in some $PerlConfig-Variable which is filled in a Perl /Perl - part of the httpd.conf do you have any hints? i don't know this server really good, but it seems to me that it should be obvious for people working with it ... thanks alot in advance! Thomas Bach think karo... bkaro.net
missing /virtualhost directive
Hello We're running a cobalt raq4 and have some problems with the apache configuration. the configuration over the web-interface works all fine, but when i add some lines in the httpd.conf for the mod_perl-things (p.ex. PerlInitHandler Apache::Reload PerlModule Apache::Registry) and some handlers of myself, a restart succeeds, but with the message: mod_perl: /VirtualHost mod_perl: Missing /VirtualHost directive at end-of-file chiliasp: module started, version 3.5.2.31 /usr/sbin/httpd and the cobalt-web-interface for server administration isn't available over the ../admin/ adress, which should be rewritten by a rule written in some $PerlConfig-Variable which is filled in a Perl /Perl - part of the httpd.conf do you have any hints? i don't know this server really good, but it seems to me that it should be obvious for people working with it ... thanks alot in advance! Thomas Bach think karo... bkaro.net
internal redirect with byterange (was: open downloaded file)
Hello again I'm still having troubles delivering my pdf-files ... I'm using the code-snippets Geoffrey Young gave me, but i need to use an internal redirect, because i provide the files with better (longer) filenames. I can't find any tutorials or example-code for it, so I hope you guys can help me ... so what I'm actually doing is: initial request: - check permissions - search the filename of the filesystem - if it is not a static file: generate deliever file - otherwise: make an internal redirect to the specific file handle the internal redirect: - generating header - deliver file (if necessary with byterange ...) this looks approx. like this: if ($r-is_initial_req) { if (static ()) { $r-internal_redirect (newfilename); } else { $r-send_header (); $r-send_fd($fh); }; } else { $s-headers_out-set('Accept-Ranges' = 'bytes'); $r-headers_out-set(Content-Disposition = inline; filename=$name); my $size = stat($file)-size; $r-set_content_length($size); $r-content_type($contenttypes{$type}); # determine if the request is a range request my $range_request = $r-set_byterange; # yea or nea if ((my $status = $r-meets_conditions) == OK) { $r-send_http_header; } else { return $status; } my $fh = IO::File-new($file); # handle a range request properly if (($type eq 'pdf') $range_request) { while( my($offset, $length) = $r-each_byterange) { seek $fh, $offset, 0; $r-send_fd($fh, $length); } } else { $r-send_fd($fh); }; $fh-close(); return DONE; } My problem is now, that i know not exactly what i should return if i make an internal_redirect and what i have to return handling this internal_redirect accessing a file like this results in the access-log in: [30/Aug/2001:17:13:13 +0200] GET /files/sid00017/AR_1000A-TSS_report-TSS.PDF HTTP/1.1 200 32768 https://ida.festbrueder.ch/site/files.pl?siteid=17; Mozilla/4.0 (compatible; MSIE 5.01; Windows [30/Aug/2001:17:13:14 +0200] GET /files/sid00017/AR_1000A-TSS_report-TSS.PDF HTTP/1.1 200 40960 - Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)195.141.44.1 - - [30/Aug/2001:17:13:14 +0200] GET /files/sid00017/AR_1000A-TSS_report-TSS.PDF HTTP/1.1 206 397776 - Mozilla/4.0 (compatible; MSIE 5.01; Windows NT) All three entries comes out of an access to one file ... *?* am i doing this right? Il'd be very thankfull if you could help me inhere ... I'm really in trouble with this, and i won't loose my pleasure using mod_perl ;-) Thank you very much in advance!! Thomas Bach think karo.. www.bkaro.net
Re: mod_auth_digest
At 12:44 16/08/01 -0600, Bruce W. Hoylman wrote: Lincoln Stein developed a very useful module for doing both Basic and Digest user/password management. Titled HTTPD-User-Manage-1.58 I believe it is still available as: http://www.genome.wi.mit.edu/~lstein/user_manage/user_manage.tar.gz that's exactly what i was looking for, thanks alot!! the link above is broken, but it is available on CPAN: http://search.cpan.org/search?dist=HTTPD-User-Manage Thanks alot! Thomas Bach think karo... bkaro.net
mod_auth_digest
Hello list it's now the fifth time i went looking to find sth on the web, but i didn't find anything. So perhaps it could be a little bit ot, sorry for that. I'm running a project using apache (mod_perl/mod_ssl/mySQL) on Linux for which i would change the authetication mechanism to mod_auth_digest, and i've the following questions: is the digest-authentication really necessary, when using mod_ssl, or would a basic-authetication be enough? For the moment i'm using a authentication over a form with session-cookies. Perhaps it is secure enough if i expand it (make it unpossible, to make a bot trying every cookie-value, and so on ...)? i have created a browser-front-end for the user-management. How is it possible to add/delete over Perl a new user/passwort to the digest-pw-file? I tryed it with open(), system(), ... but without any success. Thank you for every hint or URL ;oP Thomas Bach think karo... bkaro.net
Filter access to Files on Apache
Hello list perhaps it is off-topic (sorry for that, but i hope that somebody of you can help me), but somehow i wish to have a solution with precompiled perl such as mod_perl or ... everything else which fits to my needs. I want to filter every access of for example all .jpg-files on my apache for autentication purposes. I use my own cookie-based authentication mechanisms. So one solution i had was to add a handler Action auth authent.pl AddHanlder auth jpg and in the authent.pl use something like a internal redirection. But the only way i know to get this internal redirection is the following: open(DATEI, ...) print while (DATEI) close(DATEI) So, I'd be glad if you can give me some hints to solve this. Especially in order to efficiency (for that it don't have to be compiled everytime) I'm running apache 1.3.17 with mod_perl on a Linux machine. Thanks in advance! Thomas Bach think karo.. bkaro.net
strange caching
Hello list at first, sorry for my english, my motherlanguage is (swiss)-german i'm not (yet) that used with this stuff, but i've a really strange problem i'm using apache (1.3.12), mod-perl (1.21), Perl (5.005_03 built for i586-linux),DBI (1_14), mySQL (3.22.32) this is only my test- and evolution-environment, i'll put my project later to a provider, but if this is a bug somewhere i'll go around i've a perl-script which reads data from my database and puts it into a web browser, but if i change/add the data in my database this script won't show me the changings if i run the query in the normal mysql-frontend, i find the new datas i found out that the server runs the script (i read other data from text-files = changings inthere are puted out in the webbrowser) and mySQL processes the queries (i locked in the log-files) sometimes i can reload the page and then it shows me once the old datas anothertime the new datas (internet explorer alternately and netscape navigator 'randomly') if a modifiy/save the script = all goes fine but i don't want to save it everytime I (or the rest of the world) change my database ;( i've heard of another (in a german mySQL-mailinglist) who had also this problem, but he didn't really solved it (he goes around) does anyone of you know this problem (and perhaps a fix)? sorry if it's offtopic Thanks alot! Thomas Bach [EMAIL PROTECTED]
RE: strange caching
!thanks alot! i don't yet look really through, but once i'll ;) fact is: IT WORKS! [..] sometimes i can reload the page and then it shows me once the old datas anothertime the new datas (internet explorer alternately and netscape navigator 'randomly') if a modifiy/save the script = all goes fine . [..] See an explanation of this behaviour: http://perl.apache.org/guide/porting.html#Sometimes_it_Works_Sometimes_it