of user object which has a property of
default_page_id. The first time the user logs in I would fetch that
from the database, and then I would cache it so that I wouldn't need to
go back to the database for it on future requests.
- Perrin
the db if your cache went down).
- Perrin
pages can have any number of user selected features
per page and features themselves can have archive
depths of anywhere from 3 to 20 years, there's a lot
of info.
No problem, disks are cheap. 400MB of disk space will cost you about as
much as a movie in New York these days.
- Perrin
options like Cache::Mmap and Cache::FileCache are much faster than
anything based on IPC::Sharelite and the like.
I have charts and numbers in my TPC presentation, which I will be
putting up soon.
- Perrin
, beat all
available flat-file modules. It may be possible to improve the
flat-file ones, but it even beat Tie::TextDir which is about as simple
(and therefore fast) as they come. The only thing that did better was
IPC::MM.
- Perrin
to
do (parse SQL statement, make query plan, etc.) than a simple hash-based
system like BerkeleyDB does. Best thing would be to benchmark it though.
- Perrin
/) works this way
and is mentioned in my templating guide
(http://perl.apache.org/docs/tutorials/tmpl/comparison/comparison.html).
There is a more recent module based on the same idea, HTML::Seamstress,
available on CPAN.
- Perrin
in this case. I don't know about XP,
but Windows 95/98/ME did not have a working flock. If XP is based on
the NT code, it may not have that problem. Even so, I would try testing
that first, or maybe asking about it on Win32 perl mailing list.
- Perrin
.
- Perrin
.
Hmmm, which version of mod_perl are you using? If you're using 2.x, I
can't help you there since I've never tried it on Win32. Maybe Randy
will have some ideas. If you have 1.x, there is no concurreny under
mod_perl -- requests are serialized.
- Perrin
concurrent users on
Windows. It will serialize those requests.
- Perrin
Chris wrote:
I think he said mod_perl 2 in his inital post.
Oops, you're right, I totally missed that. Sorry Justin.
- Perrin
there is
something about the specific versions of Perl/mod_perl that affects this.
- Perrin
run, meaning that it should be compiling
the used module again. That doesn't explain why he's having trouble though.
- Perrin
at one of the many
open source projects out there like http://linux-ha.org/.
- Perrin
Ask Bjoern Hansen wrote:
On Fri, 6 Sep 2002, Perrin Harkins wrote:
Calbazana, Al wrote:
I'd like to know if it is possible to use mod_proxy as a sticky session
manager.
It's possible in the sense that you could write a sticky session manager
and glom it onto mod_proxy. It's certainly
not worth it, with
so many open source solutions already available.
- Perrin
about restarting httpd.
Isn't PHP just as dangerous as mod_perl when run in the server process
(as opposed to CGI mode) on a multi-user virtual host server?
- Perrin
.
- Perrin
would say that mod_perl is
probably doing more work in order to give you access to apache
internals. You also may not have configured mod_perl for best
performance. For example, if you have it configured to emulate CGI by
setting up environment variables that will take more time.
- Perrin
things down a little. Also, if you are not handling any phases of the
request other than the content handler, you can improve the speed of
mod_perl by compiling it without the hooks for the other phases.
- Perrin
that Carp::longmess_heavy is catching my die()
calls despite the fact that I have set `local $SIG{__DIE__} = \mydie;`.
As you discovered, this seems to be interference from the debugger. I'm
not sure how to turn that off, although you could probably look at
perl5db.pl and edit it.
- Perrin
Josh Chamas wrote:
I just did a benchmarks to compare mod_perl + apache versions 1 2.
Cool.
Any idea why bytes/hit is lower on apache 2? Are some headers being
omitted?
- Perrin
Nigel Hamilton wrote:
It would be great to have a similar tool for mod_perl/apache.
The closest thing available is a combination of mod_status and
Apache::Status. If you haven't tried these yet, give them a shot. They
provide a good deal of information.
- Perrin
and gaining access to another person's
information.
By the way Tie::DBI is slow. Writing some kind of module for accessing
your specific user table would be faster.
- Perrin
around this problem or do I need to copy the module
and alter its name ?
That won't help. It's about the module namespace, not the file name.
- Perrin
or CGI_Lite.
- Perrin
::FileCache, IPC::MM, or Cache::Mmap.
- Perrin
pointed out).
(if so, it should be documented in the mod_perl_traps man page).
It's all documented here:
http://perl.apache.org/docs/1.0/guide/
- Perrin
::ShareLite or
IPC::Shareable are slow. If IPC::MM won't work for you, I'd suggest
MLDBM::Sync, Cache::FileCache, or Cache::Mmap.
- Perrin
identifying ID. I can't tell what the problem is from
your description. Maybe you're looking for something like
Apache::AuthTicket?
- Perrin
Also, try to find an alternative to loading all that data into memory.
You could put it in a dbm file or use Cache::FileCache. If you really
have to have it in memory, load it during startup.pl so that it will be
shared between processes.
- Perrin
Anthony E. wrote:
look into Apache
all into memory at once.
The only time this becomes difficult is when you need to load a large
BLOB fram the database.
- Perrin
into that scalar on most requests.)
- Perrin
static files. A system like
Mason or Template Toolkit that caches the files in memory would quickly
blow up in that situation, and you would end up needing to work around
it by keeping most of the pages on disk and loading them at request
time, just like SSI.
- Perrin
.
- Perrin
, or PerlEx if you're running it on
Windows.
- Perrin
Perrin Harkins wrote:
Paul wrote:
I know there are servlets, but I was led to believe that I would almost
be able to drop my mod_perl modules into the iPlanet server, as if it
has some equivelent functionality. If so, I can't find any evidence of
it, and I'm rather skeptical.
I think
far that requires Java. It would be
much faster to port it to FastCGI or the like.
- Perrin
gonna miss that.
Again, I don't understand what you think you're going to lose. All the
basic data available under mod_perl is available under everything else
as well, albeit with a slightly different API.
- Perrin
.
- Perrin
/devkit/doc/fastcgi-whitepaper/fastcgi.htm )
doesn't offer any API
Everything offers an API. CGI is an API.
If I understand correctly, you just want to write a custom access
control thingy. FastCGI calls that an authorizer and it is documented
in that whitepaper.
- Perrin
a database handle and use it from everywhere.
Doesn't need to be inherited, you can just stick it in a module that
all the other modules call.
Hope some of that was helpful,
Perrin
if you
need to.
- Perrin
/pod/perlobj.html#Indirect-Object-Syntax
- Perrin
they can find some problem and fix
it, which is usually not the case.
- Perrin
scripts under
Apache::PerlRun and then use Apache::Filter on them to do things like
SSI. This will also make them much faster.
- Perrin
. Apache::DBI will work
correctly in a threaded environment if your DBD is thread-safe.
Remember, no variables are shared between Perl threads unless you
explicitly share them.
- Perrin
back to bite you later if your module gets
automatically reloaded when you change it.
- Perrin
with mod_perl.
- Perrin
need a CLONE method added) at C:/Perl/site/lib/Apache/DBI.pm
line 64.
What's going on?
You'd be better off asking on the DBI list, but it looks to me like your
DBD is not thread-safe, or else you opened a connection before the fork
(in startup.pl).
- Perrin
Chris Pizzo wrote:
The documentation tells me how to create a new response object but how do I
reply to a request using my custom response?
HTTP::Response? That's an LWP thing, not a mod_perl thing. Maybe
you're a little confused here? Tell us what you're trying to do.
- Perrin
the mailing list archives
for more on this.
- Perrin
you've hit on a new
feature, stop now and download one of those. If you're doing it because
hacking perl is fun and you're in no rush, then go ahead and have a good
time.
- Perrin
in that
process. When you use connect_on_init, it is made when the child
process spawns.
You would still be advised to move the static files to another server.
- Perrin
multiple database
connections per child.
- Perrin
:
$r-header_out(content_type= text/html);
$r-send_http_header;
Try $r-content_type(text/html) instead of header_out.
- Perrin
Perl modules that handle cookies well, and it's
not an expensive operation. Apache::Cookie is probably overkill in most
situations.
- Perrin
Ed wrote:
Could be bad hardware. Search google for Signal 11.
That's actually pretty rare. Segfaults are usually just a result of
memory-handling bugs in C programs.
- Perrin
to cause problems..
- Perrin
.
That's a good one, and so is CGI::Simple::Cookie.
- Perrin
with your mod_unique_id setup. The mod_unique_id
variable should in %ENV from the beginning.
- Perrin
use a crypto signature they can still sniff someone else's
legit cookie off the wire, but at least you can prevent them from
tampering with the contents of the cookie.
Never trust the client.
- Perrin
.
- Perrin
already have a working system, then go with it. If you
find yourself having to revisit the code because you need to add things
or are finding bugs or performance problems, consider benefitting from
someone else's hard work.
- Perrin
.
- Perrin
, filling in the includes and dbm
files that the server-side script assembles. Perl is not being removed.
- Perrin
.
- Perrin
the best
performance. The cache they use works just the same as Perl's normal
operation, i.e. once some code is compiled it stays in memory and
doesn't need to be compiled again. You don't have to do anything to get
that in Perl.
- Perrin
how that would happen though, based on the code shown here.
- Perrin
Mrs. Brisby wrote:
$ perl -e '$foo = {}; fork; print $$:$foo\n;'
18161:HASH(0x80fd254)
18162:HASH(0x80fd254)
$ perl -e 'fork; $foo = {}; print $$:$foo\n;'
18163:HASH(0x80fd254)
18164:HASH(0x80fd254)
I expected the first. I didn't expect the second. Thanks for the
explanation.
- Perrin
::Oracle with Randy's distro, use it.
Otherwise, you need to build DBD::Oracle with the same perl he used, or
build mod_perl with ActiveState 633.
- Perrin
Cristóvão Dalla Costa wrote:
Perrin Harkins wrote:
They also have more of a
need than most people to integrate with C/C++, and I've been told that
it's easier to hack those into PHP.
What a joke.
Have you written C extensions for both Perl and PHP and think Perl is
easier? Most people
.
- Perrin
fetch_row is performing
exactly the way it should... but when it tries to do anything with my
scalar once it has a null in it, it just chokes sits there until it
times out.
Are you using the pre-fork MPM? If not, do you know if your DBD driver
is threadsafe?
- Perrin
to take your code from nice, readable perl to evil hx0r PERL
in 3 characters. This is the kind of thing that Yahoo was probably
worried about when the decided not to use Perl.
- Perrin
), and write confusing code with it by
jamming too much into the map { some stuff } list form.
- Perrin
Ged Haywood wrote:
On Fri, 1 Nov 2002, Frank Naude (FJ) wrote:
but, is there any mod_cgi to mod_perl converter available?
Have a look at Apache::Registry.
And to address the specific problem you mentioned about initializaing
variables, look at Apache::PerlRun.
- Perrin
not something that any two people will
ever agree on. This used to bother me more before I realized that all
languages have this problem, even though they try to deny it. I've seen
some hideous Java code at this place that really takes the wind out of
the Java is more maintainable argument.
- Perrin
multiple calls to Apache::DBI.
- Perrin
=\0;URL=$url\ //head/html;
Uh, that's not a redirect; that's an ugly proprietary hack. You should
be using standard HTTP redirects. See
http://search.cpan.org/author/JHI/perl-5.8.0/lib/CGI.pm#GENERATING_A_REDIRECTION_HEADER
for more.
- Perrin
to their browsers. It's not part of any HTTP spec
and isn't guaranteed to work, even on totally correct web browsers.
- Perrin
just send a real header instead..
- Perrin
in IE and then reload the page, it reloads the page I was redirected to.
Since this is all getting pretty far off topic for the mod_perl list,
you might want to try asking on a CGI-specific list or on
http://perlmonks.org/.
- Perrin
think that's what he
was trying to do. He had a wait time of 0 in his example.
- Perrin
mod_perl
with the PerlSendHeader option on. NPH script behave like mod_perl with
PerlSendHeader off.
- Perrin
Tony Simbine wrote:
wenn i reload it, then sometimes i get the document or an error.
Well, what's the error? Look at your log file. Then look at
http://perl.apache.org/docs/1.0/guide/troubleshooting.html and see if
the error is listed there.
- Perrin
#install_driver_Oracle__failed__Can_t_load__DBD_Oracle_Oracle_so__for_module_DBD__Oracle
- Perrin
in the
log file. It is almost as if the END{ } is overwriting the
ModPerlRegistry error system.
Does it make any difference if you change what's in the END block?
- Perrin
are using. There is actually no module called
Apache::Registry in mod_perl 2, so I assumed you meant the 1.x series.
- Perrin
web browser.
You're going to have to do some debugging to find out why your script
isn't working. You use of Apache::Session::File looks okay, except that
you don't handle possible errors. Check if the cookie is being set, if
the files are being created in /tmp, etc.
- Perrin
://search.cpan.org/author/TBONE/HTML-Seamstress-1.17/Seamstress.pm
There is also an implementation that copies the Zope style pretty
closely called Petal:
http://search.cpan.org/author/JHIVER/Petal-0.77/lib/Petal.pm
- Perrin
.
- Perrin
off on your own.
- Perrin
they
are defined. This means you can actually have different values for
different locations, different virtual hosts, etc.
- Perrin
we're
talking about IE) and then returning to it via the bookmark?
It may also no longer send POST data or give the option of no longer
sending it if you go back to a page resulting from a POST after a
certain amount of time.
- Perrin
script? How are you running the CGI? Apache::Registry?
- Perrin
/indexed from it
into the RDBMS.
You can easilly add this to DBIx::FullTextSearch. All you need to do is
write a simple frontend that uses a PDF reading module to extract the
text. However, it uses MySQL rather than PostgreSQL.
- Perrin
, you can do this:
delete $INC{'Your/Module.pm'};
require Your::Module;
But that glosses over a lot of details about imports and such, so you're
better off using Apache::Reload if you can.
- Perrin
calls are run.
I'm curious as to what characters to limit for
usernames in particular.
If you're using bind variables with DBI, there is no technical reason to
restrict the characters at all. Just make sure you HTML-escape them
whenever you display them on a page.
- Perrin
901 - 1000 of 1298 matches
Mail list logo