[mp2]: Is there a package for Debian/testing?
Hi. I would like to start testing mp2, but I remember that compiling apache/mp1 was no fun at all. So I would like to have a debian package. I found one in debian unstable, but this requires perl 5.8. Thanx, Joachim
Re: mysql password encryption
On Wed, 2003-01-22 at 16:29, Martin Moss wrote: I wish to let a user use the same password for them to authenticate to a multitude of mysql Databases AND to authenticate themselves on my modperl site. the problem I have is that I store the password in the database as a Password field. However when I wish to use DBI to connect to another mysql database I cannot use the Password stored in the database as it comes out encrypted. I really don't want to store the unencrypted password anywhere on the system. Is there a way to let DBI/mysql know that the password I am giving them is ALREADY encrypted? Has anybody else solved a problem like this? You could use the encrypted password as the password to the remote database. This however also defeats the purpose of encryption with respect to the remote mysql. How do you keep the local mysql password between requests? This is IMHO essentially the same problem. Is there a way to replicate the user/passwoerd table? Hth, Joachim
Re: No error log, no database
At 09:03 02.08.2002 +0800, you wrote: Joachim Zobel wrote: Hi. Yesterday it happened that our error log reached 2Gb. Since ours is a linux box writing to it stopped. At the same time all database driven functionality stopped working (Plain DBI on Mysql, no Apache::DBI). The database was still usable through the PHP admin interface. The filesystem was not full. When the log was rotated, everything returned to normal. This was on a virtual Apache 1.3.26, mod_perl 1.25. Does anybody have an idea what happened? You've hit the 2GB limit. Yes, I know. I should have stated my question more clearly. But normally it should not be a critical error if the error log can no longer be written. In our case the database was not accessible (except for one handler that does a very simple SELECT). My question is: How did reaching the error logs 2Gb limit affect the database driver? [adding large file support] Thanks. This is not an option. We will simply increase the rotation frequency. Sincerely, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
No error log, no database
Hi. Yesterday it happened that our error log reached 2Gb. Since ours is a linux box writing to it stopped. At the same time all database driven functionality stopped working (Plain DBI on Mysql, no Apache::DBI). The database was still usable through the PHP admin interface. The filesystem was not full. When the log was rotated, everything returned to normal. This was on a virtual Apache 1.3.26, mod_perl 1.25. Does anybody have an idea what happened? Thanx, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Cleanup handlers and internal redirects
Hi. If I do an internal redirect, will there be a call to the initial requests cleanup handler? Of course I could test this but I would prefer documented behaviour. Is this written anywhere? Thanx, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: mod_perl module documentation
At 13:30 18.06.2002 -0400, you wrote: http://www.apacheadmin.com/mod_perl.html Great. I explicitely missed this before. Especially the context information is useful if you have to do things via .htaccess as much as possible. Thanx, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: Using a 404 ErrorDocument to serve content
At 10:59 06.05.2002 -0700, you wrote: On Mon, 6 May 2002, Perrin Harkins wrote: Incidentally, that's how Vignette StoryServer works. You could also do this kind of thing with a transhandler (or mod_rewrite) that checks for the existence of a static file and rewrites the URL if it can't find one. That might be more correct, but trapping 404 is the best possible performance, since there is no additional code in the response chain if the static file is there. fyi, i believe that Vignette is attempting to patent that. Phew, and I just thought that I did not like the design. It might have good performance now, but the idea sounds valid that in an error handler performance does not matter. So if someone changes apache in that direction ... How can they patent it if there already is an article about this? Sincerely, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: Off topic question a little worried
At 14:15 21.03.2002 -0600, you wrote: Any idea as to how it got on my server. It is owned by apache and in the apache group. That tells me that it was put on there by apache. It is in a directory that has the permissions 777 because the script that is normally in there keeps and writes traffic information, so I guess someone found a way to have apache write the file into that directory. But how did they get it to chmod 755? That is a DON'T. Apache should not have write access to anything under DocumentRoot. Sorry, I know this does not help now. Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: How to do connection pooling
At 02:11 280202 +0530, you wrote: Hi all, How can I maintain the connections in perl? For this I want to use connection pooling to contol the traffic of my site How can I do this in perl? Can anybody help me in this regard? If possible please give the steps included in this Is Apache::DBI what you need? If not, why? It is in fact not about controlling traffic, its about reusing database connections to sve the time needed for a connect Sincerely, Joachim -- ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen- Bertolt Brecht - Leben des Galilei
Re: how to pass data in internal redirects?
At 16:06 26.02.02 +0100, you wrote: So, a controller could in principle perform a call to a template engine as yours does, conceptually there is no need to do that internal redirect. In fact, there is no need to have two different files if I take the pattern a bit further. For instance, I believe a page written in Embperl or PHP could begin with the controller code and once finished the view code could follow, that would be MVC too in my opinion. Ahem. No. If you do not separate, you do not separate. If you do not have separate files, you can not use the same view with different controllers. I am even using external redirects. This gives more stability against users pressing reload - they are only reloading views. See http://www.catstep.de/zobel/post2redirect.html for details. Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
WYSIWYG Template Editor
Happy New Year. Does anybody know a template engine, whose templates can be edited with a WYSIWYG editor (favourably dreamweaver) as they will look when filled with example data? Thanx, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: Tips tricks needed :)
At 10:50 19.12.01 +0200, you wrote: 4. [...] Ok, let's say we even somehow make these formulas general enough to use, but where shall the calculation take place? Postgres stored procs or in perl code/module (i think this) or even in TT? Constans will be in db. I tend to do calculations involving money in the database to avoid floating point rounding headaches. By the way, is there a perl module to do calculations with money? Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: [Maybe OT] Modular design - calling pages like a subroutine with a twist.
At 08:42 15.11.01 -0800, you wrote: Say I have a page that encapsulates some functionality, such as sending a form then validating the contents that are returned. I'd call that PageB. PageB could be more than one page or a page calling itself, etc. When PageA calls PageB, as soon as PageB finishes presenting the form it doesn't stop but drops out the bottom and returns immediately to PageA. There are commands in some of the tools (Mason and soon Embperl - maybe others) to force it to stop there but this doesn't make for the modularity I have in mind. PageB then gets submitted by the user and it either calls itself (using conditionals to then do the data validation) or another page. After things are validated Ok, I'd like to have it return right back to PageA, just where it left off using a Return statement. Thus, PageA could call a PageB and have it do all it's processing then return, just like calling a regular subroutine. I'm using what I call the post2redirect pattern (http://www.catstep.de/zobel/post2redirect.html): Every POST request (normally a request that changes server state) must end up doing a redirect. This way I get two kinds of scripts: pages (GETs) and actions (POST). The point is that the action scripts decide which page is to be displayed next (eg. same form with error messages or data written page) Well, the aproach has some problems (302 is not allowed by RFC 2616 to change from POST to GET but works, 303 is not implemented by browsers yet) but it gives a good design with a very simple principle. Hth, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: [OT] Data store options
At 08:59 08.11.01 -0800, you wrote: My specifics are that I have a need to permanently store tens of thousands of smallish (5K) items. I'm currently using a simple file system store, one file per record, all in the same directory. Clearly, I need to move into a directory tree for better performance as the number of files increases. A modern FS like XFS or ReiserFS will do that without a directory tree. Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Using CGI.pm in handlers 2
(offline mode: enter name=value pairs on standard input) I have understood that I get theses messages because it is a Fixup Handler and the enviroment is not yet initialized. But I still don't know what to do about them. Thanx, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
How do I really get the URI requested by the browser?
Hi. I want to get the URI requested by the browser just as $REQUST_URI gives it to me inside a content handler. This is needed in other handlers, so I can not use %ENV. I am also not shure, when subprocess_env is initialized. Unfortunaltely $r-uri() does not return the URI requested by the browser if I do a sequence of rewrites and subrequests as I do, so I can not use it. So how do I get it? Thanx, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Using CGI.pm in handlers
Hi. I have a handler that needs to use CGI.pm to set a cookie. It seems to work correctly, but it fills my error log with (offline mode: enter name=value pairs on standard input) messages. I am doing use Apache; require Apache::Constants; use CGI; ... package SetCookie; (with $CGI::VERSION='2.46'; mod_perl/1.21) so I wonder why CGI.pm does not know it is run under mod_perl. Any Hints appreciated. Thanx, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: Just while we are so nicely [OT]: SQL Search Results in pages
At 13:42 02.08.01 -0400, you wrote: At 1:07 PM +0200 8/2/01, Joachim Zobel wrote: Hi. One of the really nice features of MySQL (OK, its not a real RDBMS, but who cares:) is LIMIT. Using Oracle I have found it a real pain to display search results in pages (of eg 20) while using connection pooling. The problem is that you can not be shure to repeat the same resultset on every page. This gets a real problem if the queries get expensive and I can't afford sorting because it destroys first row performance. You can with a result index. When your user first gets to the page, dump the rowids and rownums to a result_index table. create table result_index ( session_idnumber(10), myrowid varchar(30), myrownum number(10), mydatedate ); insert into result_index select 123456,rowid,rownum,sysdate from your_table; The problem with this is that it also destroys first row behaviour. When the insert has started running i would like to display the first rows. I am thinking about a solution that only inserts the rows the user has seen and repeats the select (excluding these rows) if he wants to see others. I just havent found an elegant PL/SQL way to implement this. Thanx, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: Santitizing errors with mod_perl
At 03:37 27.07.01 -0500, you wrote: I sanitize all my input in my scripts to only allow chars i want allowed. My working lines before using modperl and for some reason kick out error with mod perl are as follows: $user =~ s/[^$OK_CHARS]//go; $pass =~ s/[^$OK_CHARS]//go; When an account is created i only allow chars from the list $OK_CHARS this works with non modperl apache but not with modperl enabled apache? The error in the log states: [error] Unmatched [ before HERE mark in regex m/[ HERE ^]/ at libwelcome.pl line 169. There is nothing changed with regexes. Either $OK_CHARS is a global that has been changed from another script or some Apache module has redefined it or ...? What does a warn $OK_CHARS; write to your error log. Hth, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: Ultimate Bulletin Board? Jezuz.
At 18:16 27.07.01 -0400, you wrote: 1 the quality of [perl] code in UBB is so phenomenally bad i can't believe people pay money for it. i can't believe it works (but it does). has anyone else ever experienced it? i guess i need a support group... it makes me cry and cuts me to the bone when i (free scripts) out there which is read by newbies to leslike this is good. oh my god. it should be drop-kicked off the planet. There is a lot of such dirt here. Lots of free perl scripts are like this. And they are read by newbies to learn. UBB won't scale well. They are doing linear searches on textfiles to find users, where they load the whole file into memory. We decided to go with yabb, after I had a look at these sources. We needed to integrate it with our users database, and yabb has readable, structured sources. If you need info on getting yabb to run with PerlRun, send me a mail. I did this and I might be able to find out what I did. Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: Apache::SimpleTemplate (don't do it!)
At 20:19 09.07.01 +0200, you wrote: It's your decision, but I think you waste your time while you make all the experiences the other had made during the last 3-5 years. I think it would more helpfull if you help to improve the other modules (for example makeing them easier to install etc.) ...but I know that's useless to say, mostly everybody has to write his own templating solution... Gerald P.S. I guess we would have much better ones, if we don't have hundreds of them all doing nearly the same ! The reason is IMHO that it is easy to write a simple template engine. It is nearly as easy as understanding one by reading docs and sources. And it is easier than understandig 3 or 4 of them to find one that matches several needs. And contributing to an existing one is the hardest. Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Just a few good men? Was: ignored (again)
Hi. The question is: Are a few good developers all we need? If this is the case we can safely ignore to be ignored (we have them). It is OK to be one of the few people to know the leading Apache development system. But it has serious drawbacks. Where I work people are migrating from server side javascript to java. With better Perl marketing they might migrate from Perl/CGI to mod_perl and my work would be more fun (I do consider changing my job an option, but I like the people I work with). It is however frustrating to leave work, get on the tram, take out my laptop and do it better than I did the 8h before. So do we want to be Enterprise and Industry Standard and such crap? . Opinions appreciated, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: Persistant data accross processes
At 14:54 25.06.2001 -0700, you wrote: Hi all, I'd like a way to store complex data structures across Apache processes. I've looked at Apache::DBI for an example: my tests say that he has to create a new dbh for every process. I've looked at IPC::Shareable, but it has to copy data. Meaning that I can only have a certain amount of complexity to my data structures. We are using Data::Dumper to put the data structures as TEXT into a MySQL table, where they can retrieved via an id. This is pretty fast for low to medium traffic and has the advantage that the data is persistent (restarting apache won't zap the carts) and human readable (debugging is easy). Hth, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: mod_perl 1.25, CGI.pm and POST
At 15:50 25.06.2001 -0700, you wrote: [...] However, if I change the submission type from POST to GET, the script starts functioning perfectly. Does anyone know what would cause this type of behavior? I am at a loss as to how to proceed ... I am including below an example script which exhibits this behavior consistently on my server. There has been a change in 1.25 concerning reading of STDIN (this is what POST does). Dough MacEachern mentioned this some days ago. IIRC $r-read() now returns nothing instaed of hanging if STDIN has already been read. I would conjecture that somehow your CGI.pm reads STDIN twice, overwriting the first read with said nothing. [...] # This file is intended to be INCLUDED from an SHTML file, # NOT directly executed! Did this ever work with POST? You can not POST to an SSI. Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Can I use mod_perl to monitor mod_ssl
Hi. We are having infrequent non reproducable problems with SSL. Can I use mod_perl for debugging and monitoring the SSL activity beyond HTTP? Thanx, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: SSI advocacy Was:: Multiple AddHandler statements
At 12:35 22.06.2001 -0400, you wrote: 1. SSI with XBitHack full plays the 304 game for me. Every time the catalog database is updated, its SSI frame gets a touch. Thats it. Simple. Efficient. Most of the perl templating systems would be just as good on these points, Including If-Modified-Since - 304 responding? In fact my main objection to the majority of templating systems is that they are frameworks. I am using a homegrown template engine at the moment and probably would be using template toolkit if I started now, but I definitely hate to be framed at work:) Another point for SSI is that lots of people understand them. Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: Multiple AddHandler statements
At 15:33 18.06.2001 -0700, you wrote: We have a CGI script which dynamically generates a certain page on our site. We want to include an SSI on that dynamically created page. Is that possible? We have two AddHandler statements for files that end in .cgi... IfModule mod_mime.c ... AddHandler server-parsed .cgi ... /IfModule VirtualHost 192.168.1.1 ServerName www.xyz.com ... AddHandler cgi-script .cgi /VirtualHost Unfortunately, the dynamically generated page is not being server-parsed because the Include virtual statement is showing up in the HTML source (the same statment on a .shtml file, however, is replaced with the result of the SSI). This is because you can not chain content handlers. One Option would be to use Apache::SSI. You can chain PerlHandlers. But isn't it possible to have one *.shtml, that includes both. This would IMHO be the much cleaner solution. The other way you probably end up using two different SSI implementations. Hth, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
SSI advocacy Was:: Multiple AddHandler statements
At 14:33 19.06.2001 +0530, you wrote: Is there something in SSI which cant be done in a better way using Perl ?? Yes. 1. SSI with XBitHack full plays the 304 game for me. Every time the catalog database is updated, its SSI frame gets a touch. Thats it. Simple. Efficient. 2. SSI provides a way to modularize static HTML. I have lots of small HTML snippets. Many of them are generated by a content manager. These snippets are put together using SSI. 3. Performance. The main drawback of using SSI is that you mess up error handling. If an included script generates an error, the 200 has already been sent. This is the price I have to pay for the fact, that normally while the script is still running, the browser is already displaying the pages header table. Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: can not redirect on POST w/ CGI.pm
At 17:46 13.06.2001 +0100, you wrote: Actually, it's apache not letting it redirect on a POST form. I don't know why commenting out CGI makes any difference, but the HTTP RFC does say that the behaviour is undefined, for 301/2 on anything other than GET, if you think about it, this makes sense: POST url : 302 Location Moved Location: newurl : now, what method do I use for newurl, GET/POST? if POST, what is in the content section ? The spec says that you shouldn't do it. The fact that browsers tend to respond to anything with a location header (even 200 OK) as being a redirect seems broken, and they'll always use GET. This is why you've probably noticed it working, in reality it's bogus. Apache enforces it for you. I doubt this. This is rather a problem with CGI.pm reading STDIN or something. My advice is to find some other way of doing it. A Refresh: 0; URL=newurl header might do the trick, although you'll need to make sure you have it in headers_err, because otherwise it won't get sent as a header. There is 303 See Other now to do this. The problem is that older browsers (pre HTTP/1.1) don't understand it. So I am still using CGI::redirect which AFAIK means 302 to achieve it. Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
How to change an SSIs Last-Modified
Hi. I am using SSI a lot for 3 reasons: 1. Easy way to modularize static and generated HTML 2. XBitHack full + touch provides an easy way to have pages play the If-Modified-Since game. (If our catalog database is updated, the fame SSIs get a touch) 3. Performance Now I am implementing a way for users to give votes and add comments to our product details pages. This makes it necessary to modify the frame SSIs Last-Modified header. Unfortunately I can not do this after the or from within or after the include because at this time the header is already on its way. So I call update_mtime from within the SSI frames PerlFixupHandler and now my SSI frame has a Last-Modified that comes from the database and uses this to play the whole If-Modified-Since game including 304. Cool. Congratulations to the guy that invented the update_mtime interface. Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: Appending Sessionid to all the urls
At 08:39 25.05.2001 +1200, you wrote: And there lies the rub. The user is using the system to process client A. The cookie contains stateful information including the client ID. They then open an new browser window, and lookup client B, recieving a new session ID with new state information, including the client ID. Why are you doing this. client B probably sends a valid session ID, so why does he get a new one? (Oh and telling the users 'Don't Do That' does not work either :^) Never does. Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Re: Appending Sessionid to all the urls
At 18:06 22.05.2001 +0800, you wrote: For instance when i access url http://www.nus.edu.sg?sessionid=dfd3453http://www.nus.edu.sg?sessionid=dfd3453 i want all the urls to be appended in all the urls of that website.. My qns is everytime i found that the session id is lost... through the many requests and responses. And the new url does not reflect on the client browser.. Any one got any idea.. what wrong with my program?? Wrong concept. Use a sid in the URL path like http://www.nus.edu.sg/sessionid-dfd3453/this/is/it.pl Use mod_rewrite to remove /sessionid-\w+ Use only relative links. Thats it. You can get the sessionid by parsing $ENV{REQUEST_URI} Hth, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Have SSIs return the error status if include dies
Hi. I would like my SSIs to return the error status if an included request dies. A better error message would be nice, too. Is there a trick to do this? Thanx, Joachim -- ... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen.- Bertolt Brecht - Leben des Galilei
Can AxKit be used as a Template Engine?
Hi. I try to understand why and if this XML/XSL stuff is useful. Is it that transformations (XSL) of XML to HTML can be used instead of the usual HTML templates (eg. Template-Toolkit)? Can this do what a template engine can do? Where are the limitations? Is there something it can't do? Thanx, Joachim -- "... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen."- Bertolt Brecht - Leben des Galilei
Re: modperl/ASP and MVC design pattern
At 15:44 20.04.2001 +0200, you wrote: an interesting feature of JSP is the possibility to use the MVC design pattern (INPUT/OUTPUT/LOGIC separation) This is obtained with the "forward" instruction. How the MVC design pattern can be implemented in the mod_perl (and specifically Apache::ASP) architecture ? http://www.catstep.de/zobel/post2redirect.html The essence is if you respect GET/POST semantics: All scripts that process POST requests must always end up doing redirects. Joachim -- "... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen."- Bertolt Brecht - Leben des Galilei
Re: [OT]: POST/GET semantics
At 10:45 11.04.2001 -0700, Andrew Ho [EMAIL PROTECTED] wrote: JZI have found that having a session object is a rather bad idea. What JZhappens if there is such a beast is essentially communication of JZfunctions through global variables. So I thought about the cure and JZfound that having server side "objects" that can be retrieved through an JZid enables "passing of parameters by reference". The client does a JZrequest and gets an id with the response, which he will return to the JZserver with further requests to refer to an object created with the JZfirst request. What you describe is exactly, I think, what most people think of when they talk about a session object. The client must always somehow indicate who they are, so you know what session to associate them with. No. I have found that having a session object creates maintenance problems. People start to pass things on the server side. Pages depend on a certain order of calling to work properly. Pretty soon the session object holds 30 properties (or however you call them). Noboby knows what they do, nobody knows why they are there. The (anti-)pattern for this is "communication of functions through global variables". So what I want is replace the session object by multiple objects that are refered to by ids that are _explicitely_ passed as parameters. This looks exactly like "passing parameters by reference". In general I think that people are pretty much obscured by objects. Things get pretty straight forward if I think of HTTP requests as function calls. Joachim -- "... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen."- Bertolt Brecht - Leben des Galilei
[OT]: POST/GET semantics
Hi. I have found that having a session object is a rather bad idea. What happens if there is such a beast is essentially communication of functions through global variables. So I thought about the cure and found that having server side "objects" that can be retrieved through an id enables "passing of parameters by reference". The client does a request and gets an id with the response, which he will return to the server with further requests to refer to an object created with the first request. The question however is: If I create an object on the server that is only accessible to the requesting client (the id can be thaught of as a password) - may this be done with a GET request? RFC 2616 says that the idea of GET is that the client can not be held accountable for the side effects of GET. If I however return an id to the client so that only this client has access to the effects of the request this client is in full control. An application for this would be to have a request that creates a result set for an expensive search and returns an id to this. Any comments appreciated, Joachim Is there a better place to discuss such a question? -- "... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen."- Bertolt Brecht - Leben des Galilei
Passing data to subrequests
Hi. I still think about a way to use content negotiated templates. My favourite solution is now to make my template filler a content handler for the template direktory. The problem is to pass the data the handler should fill in. How do I pass larger data structures to a subrequest? Is there a way to do a POST subrequest? How long can a notes entry be? Any hints? Thanx, Joachim Is content negotiation somehow uncool? I could not find an Apache::Negotiate to interface with mod_negotiate and its remarkably little discussed. -- "... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen."- Bertolt Brecht - Leben des Galilei
Postprocess subrequest content
Hi. If I want to postprocess content from a subrequest before sending it to the client, I can't my $subr = $r-lookup_uri($uri); $subr-header_in("Content-length" = "0"); $subr-run; because this will send the content to the client. What can I do to get the content myself? Thanx, Joachim -- "... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen."- Bertolt Brecht - Leben des Galilei
read vs. Include-virtual
Hi. I am thinking about using Apache::Include-virtual instead of plain open, read, close for reading in my templates. What is the overhead of doing an internal subrequest compared to plain read? What do I get in return? I know I get content negotiated templates - thats why I am thinking about doing it. Thanx, Joachim -- "... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen."- Bertolt Brecht - Leben des Galilei
Re: Renegotiate Language
At 20:49 21.03.2001 +, you wrote: I've done this and actually got resistance from Brazilians who preferred the Engligh content. You might be better off with a user preference. Sorry, I did not express myself properly. That is what I want. I want to trigger a renegotiation with different server preferences as a means for the user to select a language. I want to use Content-Language headers because I have lots of text images such as buttons and I don`t want to put a wrapper around each link. Thanx, Joachim -- "... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen."- Bertolt Brecht - Leben des Galilei
Renegotiate Language
Hi. I want to use content negotiation to choose a starting language and return appropriate content. I know how to do that with mod_negotiate. What I would like to add is the possibility for the user to add a language. Therefore I want the server to renegotiate the language with different preferences. How can I do this. Thanx, Joachim -- "... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen."- Bertolt Brecht - Leben des Galilei
GET correctness
Hi. A thing I would like to have is a module that ensures GET correctness. It should at least prevent file and database writes when handling a GET request. Does such a beast exist? Thanx, Joachim -- "... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen."- Bertolt Brecht - Leben des Galilei
Site running on mod_perl
Hi. We are running the a href="http:/www.music-head.de"Music Head Record Store/a (vinyl for DJs) on mod_perl/MySQL. Because our pages are rather large we give them a Last-Modified to take advantage of browser caching. This is determined by the last catalog database update. We display the cart information using small script generated images. This image script is called 10 times for every catalog page, which would not be possible without mod_perl. Details about the making can be found on http:/www.catstep.de/zobel/. Don't know if this site is important enough to be listed, but it is beautiful (if you are using one of the major browsers). Sincerely, Joachim -- "... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden koennen."- Bertolt Brecht - Leben des Galilei