her ever deleting any of them?
- Perrin
-specific stuff in their APIs.
- Perrin
ir own locking, 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
QL has more work 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
c.com/pauljlucas/software/html_tree/) 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
ows 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
clarification.
- Perrin
l all heck breaks loose.
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
.x does not support multiple 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
worked for Stas. Maybe there is
something about the specific versions of Perl/mod_perl that affects this.
- Perrin
PerlRun resets %INC after each run, meaning that it should be compiling
the used module again. That doesn't explain why he's having trouble though.
- Perrin
load-balancer, take a look 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 coul
is yourself is probably not worth it, with
so many open source solutions already available.
- Perrin
ping on each other's toes and have to worry 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
ou would just be rewriting Apache::DBI.
- Perrin
At a guess, I 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
l slow
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
'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
in place to prevent people from simply entering
another user ID in their cookie 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
just use -no_xhtml all the time?)
> Is there any trick 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
n, you can use Apache::Request or CGI_Lite.
- Perrin
Sync, Cache::FileCache, IPC::MM, or Cache::Mmap.
- Perrin
C (as Nigel 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
les based IPC::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
owser will
have a separate 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 Apa
oading them all into memory at once.
The only time this becomes difficult is when you need to load a large
BLOB fram the database.
- Perrin
to a scalar. (Not a good idea if you load large chunks of data
into that scalar on most requests.)
- Perrin
ands of unique 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
CGI, but all the principles are the same.
- Perrin
r only hope is FastCGI, 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
&g
27;s nothing you've mentioned so far that requires Java. It would be
much faster to port it to FastCGI or the like.
- Perrin
a from the engine available
> from the request object, and I'm 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
ask the author.
- Perrin
> FastCGI (as I understand it, e.g., from
> http://www.fastcgi.com/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
type: $holdtype in process $$\n";
}
This will always print whatever the value was the first time, no matter
what you change it to later. (The first time for that process, that
is.) Watch out for things like that. You should always pass params
explicitly.
>4. I know the way I have done these db connects is sloppy. But I can't seem
>to find a better way. Could I make one db_connect sub,and inherite it all
>though my modules?
>
Make one sub that returns 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
n some warn statements. Run it in the debugger if you
need to.
- Perrin
http://perldoc.com/perl5.8.0/pod/perlobj.html#Indirect-Object-Syntax
- Perrin
leaks" they go running
for stuff like Apache::Leak, thinking they can find some problem and fix
it, which is usually not the case.
- Perrin
er, you can run your CGI scripts under
Apache::PerlRun and then use Apache::Filter on them to do things like
SSI. This will also make them much faster.
- Perrin
ache::DBIPool doesn't actually exist yet. 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
. And you are creating a closure here with
your $DBH which might come back to bite you later if your module gets
automatically reloaded when you change it.
- Perrin
ivity?
TT is not related to this. It works great with mod_perl.
- Perrin
hreads and your
> driver may 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
e the mailing list archives
for more on this.
- Perrin
e you think 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
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
be opening multiple database
connections per child.
- Perrin
"text/html");
$r->send_http_header;
Try $r->content_type("text/html") instead of header_out.
- Perrin
pure 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
x27;t need it, and
using it seems to cause problems..
- Perrin
.
That's a good one, and so is CGI::Simple::Cookie.
- Perrin
wrong with your mod_unique_id setup. The mod_unique_id
variable should in %ENV from the beginning.
- Perrin
a.
Even if you 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
age names.
- Perrin
pretty sure that there are modules on CPAN that do just what you
need. If you 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
you want to accept.
- Perrin
they use it now: off-line processing, filling in the includes and dbm
files that the server-side script assembles. Perl is not being removed.
- Perrin
to Python.
- Perrin
od_perl that had 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
g to the same hash. I can't
explain 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
with. If there is a DBD::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? M
story for AOLServer.
- Perrin
g DBI for the interface, and the actual 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
use it has a
tendency to take your code from nice, readable perl to evil h@x0r PERL
in 3 characters. This is the kind of thing that Yahoo was probably
worried about when the decided not to use Perl.
- Perrin
people overuse it (especially after a
first-reading of "Effective Perl"), 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
erl style is probably 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
ength of the request
inside of $r->pnotes if I want to avoid multiple calls to Apache::DBI.
- Perrin
t;;
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
o their browser, which others
may or may not add to their browsers. It's not part of any HTTP spec
and isn't guaranteed to work, even on totally correct web browsers.
- Perrin
ecause
they don't realize they can just send a real header instead..
- Perrin
ke redirection work. It's also
still not clear to me what isn't working for you. When I get redirected
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
t, but I didn't think that's what he
was trying to do. He had a wait time of 0 in his example.
- Perrin
o it parses your output. This is the same as using 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
.html#install_driver_Oracle__failed__Can_t_load__DBD_Oracle_Oracle_so__for_module_DBD__Oracle
- Perrin
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
at you 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
efore in that same process. Slow.
You might want to look at how Apache::SSI does it. You can copy the
include handling code from there. Otherwise, I would suggest copying
some code from Apache::RegistryNG to compile it into a subroutine.
- Perrin
ml', text => 'Home'});
$th->process->('separator.tmpl');
$th->process->('link.tmpl', {url => '/acme/index.html', text => 'Acme'});
$th->process->('separator.tmpl');
... And so on.
Text::Template allows Perl code to be put in the template, and
HTML::Template/TT allow loops and conditionals, but no one is going to
force you to use them. They are flexible modules. I think you should
look at them more closely before you go off on your own.
- Perrin
e they
are defined. This means you can actually have different values for
different locations, different virtual hosts, etc.
- Perrin
ing to favourites" considering 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
rom the HTML page
and the CGI script? How are you running the CGI? Apache::Registry?
- Perrin
metadata parsed/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
d a module, 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
o unsafe system 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
ing a site and do
searches in them. If you store search-related data in the session, the
multiple windows will interfere with each other. These should be stored
in the HTML instead.
- Perrin
and talk, or at lunch just before, I can't
> remember.
It was during the talk. The tool is called Daquiri, and he said it was
available in the mod_backhand CVS tree.
I have also found httperf and http_load pretty useful for this stuff,
although they don't support logfile playback.
- Perrin
801 - 900 of 1431 matches
Mail list logo