The '+' character in cookies

2004-02-20 Thread Philip Mak
Is it legal for cookies to contain the '+' character? It looks like $Request-Cookie will strip '+' characters out of cookies and replace them with spaces. This has caused problems in my Apache::ASP application that reads cookies containing '+' signs set by another application.

Re: A weird puzzle

2004-02-03 Thread Philip Mak
Gah, I just got the daily LogWatch e-mail for that server, and it's apparent why. I wonder if the disk is bad. I just had it replaced last month! - Kernel Begin WARNING: Kernel Errors Present end_request: I/O error, dev 03:02 (hda)...:

A weird puzzle

2004-02-02 Thread Philip Mak
About 10 hours ago, my website started getting really slow. My MRTG graph shows the server's bandwidth usage dropping to 1/4 of its previous amount: http://lina.aaanime.net/~pmak/dropoff.png When I got on the server, the load average was above 7. The shell prompt response time was very slow, the

Re: %config in Apache::ASP-Loader

2004-01-24 Thread Philip Mak
On Sat, Jan 24, 2004 at 11:07:30AM -0800, Josh Chamas wrote: If I leave the %config hash empty, will Apache::ASP-Loader use the values of Global and GlobalPackage from httpd.conf? Or do I have to set those manually to the same values that I have in httpd.conf? You have to set them manually

Re: %config in Apache::ASP-Loader

2004-01-24 Thread Philip Mak
On Sat, Jan 24, 2004 at 02:28:04PM -0800, Josh Chamas wrote: Hrm, I guess with the way configuration files are parsed, at the time startup.pl is being executed it does not have access to the PerlSetVar configurations? Even if it did ( of which I am not so sure ), it would not necessarily

Re: Virtual Server with Apache ASP

2004-01-23 Thread Philip Mak
On Fri, Jan 23, 2004 at 01:10:26PM -0600, Steve Brown wrote: Can anyone recommend a virtual server web hosting company with Apache ASP already installed for $15-$20 per month? I'm about to give up on globalservers.com. I would note that good mod_perl host that gives you your own httpd would

%config in Apache::ASP-Loader

2004-01-23 Thread Philip Mak
From tuning.html: The %config args, are the config options that you want set that affect compilation. These options include Debug, Global, GlobalPackage, DynamicIncludes, StatINC, StatINCMatch, XMLSubsMatch, and XMLSubsStrict. If I leave the %config hash empty, will Apache::ASP-Loader use

Re: Session cookies not being set

2004-01-20 Thread Philip Mak
On Tue, Jan 20, 2004 at 10:41:04AM -0800, Josh Chamas wrote: I am not sure why sessions were not working. Could you provided a header request trace for such a request with sessions enabled like: lwp-request -ed http://someurl/somescript.asp There should be a session-id in there. Also

Re: ASP on Virtual Server

2004-01-20 Thread Philip Mak
On Tue, Jan 20, 2004 at 09:55:48PM -0600, Steve Brown wrote: I tried to restart Apache and it failed to restart. I commented out the above lines and Apache restarted successfully. What does the error_log say? - To

Re: Session cookies not being set

2004-01-19 Thread Philip Mak
On Mon, Jan 19, 2004 at 11:33:37AM -0800, Josh Chamas wrote: This is just a theory though, it seems to be that the session cookies would be set no matter what. Now if you upgraded mod_perl Apache, it may be that the PerSetVar configs are being merged differently, so that your settings are

Caching Apache::ASP-generated pages

2004-01-17 Thread Philip Mak
One of my servers is getting a load average of over 6.00, because of a very popular Apache::ASP-powered database driven website. I'm thinking about getting the front-end httpd to cache the pages generated by Apache::ASP by adding something like this: $Response-AddHeader('Last-Modified',

Re: SessionSerialize and MaxClients

2004-01-12 Thread Philip Mak
On Sun, Jan 11, 2004 at 07:40:16PM -0800, Josh Chamas wrote: SessionSerialize only serializes access to the $Session object, so you would want to have at least as many MaxClients as there are possible concurrent web clients you want to support. Oh, so if I do $Session-{count}++; in my script,

SessionSerialize and MaxClients

2004-01-09 Thread Philip Mak
If the httpd only serves Apache::ASP requests and SessionSerialize is 1, then should MaxClients also be set to 1 to save memory since only one script can run at a time anyway? - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Documentation for $Request-BinaryRead

2003-09-12 Thread Philip Mak
In http://www.apache-asp.org/objects.html it says: $Request-BinaryRead($length) I think it should instead say: $Request-BinaryRead([$length]) and mention that the $length parameter is optional; if it is not given, then the whole thing is returned (at least, that's what I think it does,

Re: Why HTTP Code 200 instead of 500?

2003-07-19 Thread Philip Mak
On Fri, Jul 18, 2003 at 10:24:20PM -0400, Joshua Chamas wrote: This is what happens when Debug is set to higher than 1/-1. You might have settings of 2/-2 or 3/-3, which renders errors pretty HTML format like this. Wouldn't it make more sense for the server to return an HTTP code of 500 (and

Why HTTP Code 200 instead of 500?

2003-07-18 Thread Philip Mak
I got this from Apache::ASP: HTTP/1.1 200 OK Date: Fri, 18 Jul 2003 23:13:35 GMT Server: Apache/1.3.27 (Unix) mod_deflate/1.0.19 mod_accel/1.0.30 Cache-Control: private Content-Type: text/html Transfer-Encoding: chunked 19a5 tt buErrors Output/u/b ol li unknown class 'Files' at

$Request-{Form}

2003-02-10 Thread Philip Mak
Is it all right to use $Request-{Form}? Directly using this variable seems to be an undocumented feature, but I found it useful recently: It makes $Response-{FormFill} more flexible because now rather than only being able to re-populate the form with data that the user just entered, I can also

Re: multipart email using $Server-Mail

2003-02-04 Thread Philip Mak
Fernando Munoz wrote: has anyone tried successfully to send Content-type: multipart/alternative email using the $Server-Mail object? I'm trying to send email with boundaries for text and html portions. I've already have html working with no problem but when I try to put both formats in a

Re: UTF8 issue

2003-01-29 Thread Philip Mak
I'm guessing you'll have to somehow cast the UTF8 strings so that they're interpreted byte-by-byte, rather than character-by-character. Maybe try use utf8; and then pass utf8::encode($str) instead of $str to the MD5 function. On Wed, Jan 29, 2003 at 09:50:13AM -0800, Fernando Munoz wrote: Well,

Re: XML/XSL - html

2003-01-27 Thread Philip Mak
On Mon, Jan 27, 2003 at 09:33:38AM -0800, Josh Chamas wrote: do some runtime XML validation like running it through XML::Simple in an eval {} or something to catch the error, so that users are warned that they need to input properly escaped XHTML. If the users are not programmer types, I'm

$Response-{ContentType} on error

2002-12-29 Thread Philip Mak
Suggestion: If Apache::ASP prints an error page due to Perl dying, I think it should automatically set $Response-{ContentType} back to text/html. Otherwise, the error page might not be seen by the client if the script has already changed it to 'application/whatever' or something.

Re: Apache::ASP and mod_perl

2002-07-30 Thread Philip Mak
On Tue, Jul 30, 2002 at 11:17:52AM +0300, y wrote: How do I know if Apache::ASP is using the benefits of mod_perl? As I understand it, Apache::ASP *only* runs under mod_perl (unless you deliberately configured it to run in CGI mode using the 'asp' executable). If you have PerlHandler

Re: RFC: XMLSubs %= % in attributes

2002-07-09 Thread Philip Mak
On Tue, Jul 09, 2002 at 08:46:14PM -0700, Josh Chamas wrote: %= % expressions will be allowed in XMLSubs attributes, as in: my:tag arg=%= $object-{member} % / That will be nice. I tried to do that ever since I first found out about XMLSubs. This old functionality is not compatible with

Re: RFC: XMLSubs %= % in attributes

2002-07-09 Thread Philip Mak
On Tue, Jul 09, 2002 at 09:22:14PM -0700, Josh Chamas wrote: While we are talking about good configs, how about making UseStrict 1 the default at the same time?! This would be of great benefit to developers in the long term, but the migration pains would be great. This is one of the

Any shorthand for %=$Server-HTMLEncode(XXX)%?

2002-07-07 Thread Philip Mak
Example: b%=$Server-HTMLEncode($story-title)%/bbr by %=$Server-HTMLEncode($story-author-name)%br %=$Server-HTMLEncode($story-description)% Writing all of that $Server-HTMLEncode() all the time gets to be a bit tedious sometimes. How do other people deal with this?

Re: Apache::ASP shows script source when ...

2002-06-03 Thread Philip Mak
On Mon, Jun 03, 2002 at 02:46:56PM -0700, Fernando Munoz wrote: I'm experiencing an ackward situation: everything is being parse perfectly when is executed using http:// but if I change the link to be under SSL with https:// the full source code is shown in the browser even setting debug to

Re: $Server-HTMLEncode, single quotes, and .pm files

2002-06-03 Thread Philip Mak
On Mon, Jun 03, 2002 at 04:05:52PM -0700, Joshua Chamas wrote: but having XMLSubs all go to includes is sometimes overkill. Obviously this points to a weakness in the system, to have to do these things. This might be better supported if all XMLSubs are handled by one default subroutine or

Re: $Response-Redirect($Server-URL())

2002-06-03 Thread Philip Mak
On Mon, Jun 03, 2002 at 04:16:39PM -0700, Joshua Chamas wrote: This would be a trivial extension, but instead of doing this, why not just have [in global.asa] sub redirect { $Response-Redirect($Server-URL(shift, shift)); } That works for me. I just thought that having the $Server-URL()

$Server-HTMLEncode, single quotes, and .pm files

2002-06-01 Thread Philip Mak
Perhaps this should be added to the $Server-HTMLEncode() regexp in ASP.pm? s/\'/#039;/sg; The reason is that the following code will not perform as expected: print INPUT TYPE='TEXT' VALUE='.$Server-HTMLEncode(You're).'; It will become this: INPUT TYPE='TEXT' VALUE='You're' which is

$Response-Redirect($Server-URL())

2002-06-01 Thread Philip Mak
Suggestion: How about allowing, instead of this: $Response-Redirect($Server-URL('requests.asp', { id = $id })); simply this: $Response-Redirect('requests.asp', { id = $id }); Well, the above example is stupid ($Request-Redirect(requests.asp?id=$id) would work just as well), but I'm have

Re: Which are the good ones

2002-05-28 Thread Philip Mak
On Tue, May 28, 2002 at 05:16:53PM +0200, Ismael Touama wrote: When building my apache server with mod_perl module and Apache::ASP API (is that quite right ?!) I saw that it created same files with a .default extension with the configuration files of the server. Which one must I use ? e.g

How to tell FileUploadMax exceeded?

2002-05-26 Thread Philip Mak
I have this in httpd.conf: PerlSetVar FileUploadMax 1048576 PerlSetVar FileUploadTemp 1 I wrote this code to test file uploading: my $file = $Request-{FileUpload}{sjis}; use Data::Dumper; print pre.Dumper($file)./pre; When I upload a file that's too

[OT] using single quotes in HTML

2002-02-23 Thread Philip Mak
I've seen the following programming style used before, for perl code that prints HTML: print font color='red'ERROR!/font; instead of: print font color=\red\ERROR!/font; Using the single quotes for the quotes in HTML allows for cleaner syntax in perl, since then \ or qq{} is

mod_perl 2.0 compatibility?

2001-12-07 Thread Philip Mak
Is Apache::ASP compatible with mod_perl 2.0 and Apache 2.0? If so, are there any problems I should be aware of? I'm getting a new server and I'm thinking of playing with mod_perl 2.0. - To unsubscribe, e-mail: [EMAIL

Re: Request change to MailErrorsTo

2001-11-16 Thread Philip Mak
On Fri, 16 Nov 2001, Robert Bagley wrote: Several email clients will only show the HTML source of the message despite the Content-Type declaration in the header. Aren't there also some MIME headers required (by standard) in order for HTML e-mails to be displayed properly by all clients?

Re: quick question with an easy answer

2001-10-08 Thread Philip Mak
On Mon, 8 Oct 2001, Philip van Ulden wrote: Alright, I'm new to this list and had a quick question. I have an ASP web page developed for use on an IIS system. How difficult would it be to move it to Apache::ASP and what exactly would be involved (other than the actual installation)? What

Server-HTMLEncode speed

2001-09-20 Thread Philip Mak
I have a page on my website that prints a plain text file in HTML. So, it does something like this: print PRE; open(FANFIC, $file) or print File not found: $!\n; print Apache::Util::escape_html($_) while (FANFIC); close(FANFIC); print /PRE\n; I used to use $Server-HTMLEncode() instead

Re: Server-HTMLEncode speed

2001-09-20 Thread Philip Mak
Thanks for the tip about escaping it all at once, instead of line by line. I ended up doing this on my website, since it'll always be hosted on Apache/Linux (I think): local $/ = undef; print escape_html(FANFIC); # from Apache::Util That script is now up to 45 requests per second (it was

Re: Server-HTMLEncode speed

2001-09-20 Thread Philip Mak
On Thu, 20 Sep 2001, Joshua Chamas wrote: If you would humor me, I wonder what the speed would be if you used $Server-HTMLEncode() with that FANFIC optimization? I would be really surprised if it was 40 req/sec. Well, this is interesting. I just benchmarked it, and $Server-HTMLEncode() is

RE: Includes revisited

2001-09-13 Thread Philip Mak
On Thu, 13 Sep 2001, John D. Leonard II wrote: % my $mainvariable = $Session-{mysessionvar}; #as an example. $Response-write( Mylocalsub() ); sub Myloccalsub{ return $mainvariable; } % What if you did this? % use vars qw($mainvariable); $mainvariable = $Session-{mysessionvar}; print

Re: Best practice?

2001-09-12 Thread Philip Mak
On Wed, 12 Sep 2001, Tim Pushor wrote: - Does IE display the error page that you designed, or a 'friendly error'? IE will censor your error message if it is less than 512 bytes big, so if you want to make sure it gets seen, pad it out to more than 512 bytes.

Re: ASP Includes Output Caching RFC

2001-09-12 Thread Philip Mak
On Wed, 12 Sep 2001, Joshua Chamas wrote: I think that the invalidate parameter is the Clear I suggest, and that Clear could be used to effectively deal with the timestamp issue, but the logic must exist outside the caching mechanism. Wouldn't it be a bit complicated to setup this logic,

Parsing error? with XMLSubs

2001-09-08 Thread Philip Mak
A greater than sign inside an attribute passed to an XMLSub will cause an error. This happens even if the greater than sign is enclosed in quotes. I would think that the parser should be able to distinguish a inside quotes from the that ends the XML tag. This works: s:link

Re: Parsing error? with XMLSubs

2001-09-08 Thread Philip Mak
On Sat, 8 Sep 2001, Joshua Chamas wrote: I'll see if I can get this to work. But the parser is pretty fast now, and it'll be a trick to get this to work and keep it fast. It's not terribly important, although it would be nice to have. Right now I'm using a workaround:

Why is my script slow?

2001-09-08 Thread Philip Mak
I have a script that takes 3 seconds to execute; I'm trying to figure out how to make it faster. Here are some facts: 1. I put $s::starttime = [gettimeofday] (that's a function from Time::HiRes) at the beginning of Script_OnStart. Then I put statements at various places in my script to print how

Re: Why is my script slow?

2001-09-08 Thread Philip Mak
On Sat, 8 Sep 2001, Joshua Chamas wrote: Can you show a trace in the error_log with Debug set to -3 ? Make sure Time::HiRes is installed first. The first request error_log set from an apache restart would be helpful to see. I have attached the error log. It may be that upon global.asa

Re: Script_OnStart not getting executed?

2001-09-08 Thread Philip Mak
On Sat, 8 Sep 2001, Joshua Chamas wrote: I think your analysis is right, that Script_OnStart is not always being called, and the reason is that it is not always being found in the global.asa ... I don't know how it would work sometimes not others. A trace from the error_log with Debug set

XMLSubs possible bug and fix

2001-09-02 Thread Philip Mak
I can't get XMLSubs to work with perl v5.00503 with ASP.pm version 2.17. When I put s:tdHi/s:td in my code, it would generate the following perl code: s::td({ }, 'Hi'); which did not work for some reason; I think that perl didn't realize that this was supposed to be a function call. I made it

Re: PerlSetVar Global and virtual hosting

2001-08-24 Thread Philip Mak
On Fri, 24 Aug 2001, Anton Slabbinck wrote: I'm having a problem with Global and virtual hosting. For each virtual server I have a PerlSetVar Global to a unique directory. In each of those directories there exists a General.pm for that site. In the page I have a 'use General;'. The problem

Re: Plea for an unneccesary(?) enhancement to Apache::ASP

2001-08-21 Thread Philip Mak
On Tue, 21 Aug 2001, Henrik Tougaard wrote: It couldbe done with a XMLsub, but isn't that a bit overkill. I've been wondering about that---how much processing time does XMLSub use up? - To unsubscribe, e-mail: [EMAIL

emacs mode for ASP?

2001-06-17 Thread Philip Mak
Does anyone have a good emacs mode file for editing Apache::ASP scripts with? One that takes into account things like perl code is inside % %, and individual % % sections in a document must be linked to each other when calculating proper indentation values, etc. -Philip Mak ([EMAIL PROTECTED

Bug report: FormFill functionality

2001-06-13 Thread Philip Mak
type=text size=40 value=quot;This string is quoted.quot; /form -Philip Mak ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

How does $Response-{Status} work?

2001-06-08 Thread Philip Mak
while trying to use an ErrorDocument to handle the request. If I call an invalid URL (one that does not pass through series.asp), then the ErrorDocument works fine. Suggestions? -Philip Mak ([EMAIL PROTECTED]) - To unsubscribe