You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mr OCP <mr...@hotmail.com> on 2002/09/13 22:54:57 UTC

[users@httpd] Error executing php scripts

Hi

I am running apache 2 webserver on a linux box, and I am getting the 
following error when browsing to pages which use some php or perl scripts :

--------Snipp from script.log-----Start

%% [Fri Sep 13 16:14:40 2002] GET 
/cgi-bin/flashmemo.cgi?mode=read&125.307877548039 HTTP/1.1
%% 500 /var/www/docs/cgi-bin/flashmemo.cgi
%request
Host: www.example.info
Connection: keep-alive
Accept: */*
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
X-Forwarded-For: 24.103.23.11
Via: 1.0 wc14 (NetCache NetApp/5.2.1R1D9)
%response

%% [Fri Sep 13 16:21:53 2002] POST /login.php HTTP/1.1
%% 500 /var/www/docs/login.php
%request
Host: www.example.info
Connection: keep-alive
Accept: */*
Content-Type: application/x-www-form-urlencoded

--------Snipp from script.log-----End

--------Snipp from error.log------Start

[Fri Sep 13 16:14:40 2002] [error] [client 66.185.85.81] Premature end of 
script headers: flashmemo.cgi
[Fri Sep 13 16:20:32 2002] [error] [client 66.185.85.81] Premature end of 
script headers: flashmemo.cgi
[Fri Sep 13 16:21:20 2002] [error] [client 66.185.85.81] Premature end of 
script headers: flashmemo.cgi

[Fri Sep 13 16:22:08 2002] [error] [client 66.185.85.81] Premature end of 
script headers: login.php
[Fri Sep 13 16:22:08 2002] [error] [client 66.185.85.81] Premature end of 
script headers: login.php

--------Snipp from error.log------End

--------Snipp from access.log-----Start

66.185.85.81 - - [13/Sep/2002:16:22:46 -0400] "GET 
/cgi-bin/flashmemo.cgi?mode=read&71.5879942290485 HTTP/1.1" 500 647

66.185.85.81 - - [13/Sep/2002:16:22:41 -0400] "GET /login.php HTTP/1.1" 500 
647
66.185.85.81 - - [13/Sep/2002:16:22:43 -0400] "GET /login.php HTTP/1.1" 500 
647

--------Snipp from access.log-----End


your help would be much appreciated
Thanks
Mike








_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to delete a file after it's been served?

Posted by go...@cheapgurus.com.
9/13/02 4:56:44 PM, Brian Doyle <li...@balancesoftware.com> wrote:

>Thanks but this doesn't meet my criteria...  I know how to delete a file, I
>guess I'm more interested in being notified that the file has been served.
>
>In other words, can apache signal me somehow (with the filename preferably)
>so that I can then delete the file.
>
>Thanks,
>
>Brian
>
>On 09.13.02 2:43 PM, "Jacob Coby" <jc...@listingbook.com> wrote:
>
>>> Can anyone tell me how to delete a file from the server immediately after
>>> it's been served?
>>> 
>>> I'd like to serve a client-specfic file (created in a temporary directory
>> by
>>> a CGI) then delete it once it's been served.
>> 
>> depends on the language.  most have an unlink() or exec() function that will
>> do what you want.  You have to have permissions to delete it though.
>> 
>> Another option is to cron a job to clean up the directory every 10 min or
>> so.
>> 
>> -Jacob
>> http://www.listingbook.com
>> 
>> 


Hi, Brian!

Assuming that the client-specific file is some form of HTML document, and since it's already being created by a 
CGI, here's what I'd do.

1. Have the creating CGI - which obviously knows the name of the file it is creating - write a line just before the 
closing body tag that looks like this:

<!--#include virtual="/cgi-bin/eraser.cgi?served=clientfilename" -->

2. Create eraser.cgi to delete the file, maybe logging some info about when served, and outputting a thank you, 
copyright notice, disclaimer, or maybe a brief message to the client to remind them that now that they've seen 
it, it's gone. Or the eraser could email you that such and such file was served, etc. It could do just about 
anything.

Of course, if it's some other type of file, it's a different problem, but maybe this will give you some ideas.

Cindy






---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to delete a file after it's been served?

Posted by "John K. Sterling" <jo...@sterls.com>.
Hi -

Couldn't you simply install a cleanup on the request pool?  That 
cleanup function could delete the file.

sterling

On Friday, September 13, 2002, at 05:56 PM, Brian Doyle wrote:

> Thanks but this doesn't meet my criteria...  I know how to delete a 
> file, I
> guess I'm more interested in being notified that the file has been 
> served.
>
> In other words, can apache signal me somehow (with the filename 
> preferably)
> so that I can then delete the file.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to delete a file after it's been served?

Posted by Brian Doyle <li...@balancesoftware.com>.
Thanks but this doesn't meet my criteria...  I know how to delete a file, I
guess I'm more interested in being notified that the file has been served.

In other words, can apache signal me somehow (with the filename preferably)
so that I can then delete the file.

Thanks,

Brian

On 09.13.02 2:43 PM, "Jacob Coby" <jc...@listingbook.com> wrote:

>> Can anyone tell me how to delete a file from the server immediately after
>> it's been served?
>> 
>> I'd like to serve a client-specfic file (created in a temporary directory
> by
>> a CGI) then delete it once it's been served.
> 
> depends on the language.  most have an unlink() or exec() function that will
> do what you want.  You have to have permissions to delete it though.
> 
> Another option is to cron a job to clean up the directory every 10 min or
> so.
> 
> -Jacob
> http://www.listingbook.com
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to delete a file after it's been served?

Posted by Jacob Coby <jc...@listingbook.com>.
> Can anyone tell me how to delete a file from the server immediately after
> it's been served?
>
> I'd like to serve a client-specfic file (created in a temporary directory
by
> a CGI) then delete it once it's been served.

depends on the language.  most have an unlink() or exec() function that will
do what you want.  You have to have permissions to delete it though.

Another option is to cron a job to clean up the directory every 10 min or
so.

-Jacob
http://www.listingbook.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] How to delete a file after it's been served?

Posted by Brian Doyle <li...@balancesoftware.com>.
Can anyone tell me how to delete a file from the server immediately after
it's been served?

I'd like to serve a client-specfic file (created in a temporary directory by
a CGI) then delete it once it's been served.

TIA,

Brian Doyle


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org