Re: [EMAIL PROTECTED] Dynamic text-file created by PHP

2008-01-26 Thread Kent Larsson
> On 25.01.08 06:59, Kent Larsson wrote:
> > I want to create a dynamic textfile using PHP for each request of it. If the
> > users asks for http://server/textfile.txt I want a PHP-script to execute and
> > serve the textual data completely transparent to the user. This is a "single
> > case" so associating all txt-files with PHP is not what I would like to do.
> >
> > Which method would be the cleanest to use in this case? It's not a complex
> > rewrite.
>
> you can make the .txt a php script and force pargins by php parser by using
>  and SetHandler

Thank you! But I still don't get it to work.

Some output: (cat shows the contents of a text file and $ is my command prompt)

$ cat txtfilefromphp.txt


$ cat .htaccess

  SetType application/x-httpd-php


When I surf to it I still get:


Which means that it's interpreted as normal text file. I would like
the user to read the echo line and think (s)he is reading a normal
text file, not a dynamically generated one.

Step one is getting PHP to parse the script. After that I'll have to
imitate the http-header so that it exactly matches a normal text file.
But I'm still having problems with step one.

Has anyone got any suggestions?

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



Re: [EMAIL PROTECTED] Dynamic text-file created by PHP

2008-01-26 Thread Eric Covener
On Jan 26, 2008 3:47 AM, Kent Larsson <[EMAIL PROTECTED]> wrote:
> > On 25.01.08 06:59, Kent Larsson wrote:
> > you can make the .txt a php script and force pargins by php parser by using
> >  and SetHandler
>
> Thank you! But I still don't get it to work.

> 
>   SetType application/x-httpd-php
> 


Tried SetHandler as suggested?

-- 
Eric Covener
[EMAIL PROTECTED]

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



Re: [EMAIL PROTECTED] another instance of apache

2008-01-26 Thread Luis Croker





    I have running two apaches in the same server.  I installed the
first instance normally.  The second one, I compiled and I just copied
the httpd binary file to the system with another name and I put it to
run with another IP. 
 
    Both are running well. 

    Regards. 







Luis Croker
 SCSA
- SCNA

Administrador de Sistemas

Megacable
Comunicaciones

GPG
Key1024D/48C1764B

Key fingerprint = E8B6 E84F ECE4 661E 30C7 7208 042D
BD09 48C1 764B



Mandy Singh wrote:

  Hi Everyone,
   
  I already have an installation of apache 2 (2.0.52 I think) on
the server.
   
  I want to install another instance of apache 2 on the server to
listen to another IP (different than the first instance).
   
  I downloaded apache 2 gz files.
   
  What are the things I should keep in mind while installing
another instance?
   
  I can configure apache good but I am not a sysadmin so am scared
if I install another instance it might mess with the path settings etc
of the first one?
   
  Can someone please shed some light on it?
   
  Thanks.






signature.asc
Description: OpenPGP digital signature


[EMAIL PROTECTED] another instance of apache

2008-01-26 Thread Mandy Singh
Hi Everyone,

I already have an installation of apache 2 (2.0.52 I think) on the server.

I want to install another instance of apache 2 on the server to listen to
another IP (different than the first instance).

I downloaded apache 2 gz files.

What are the things I should keep in mind while installing another instance?

I can configure apache good but I am not a sysadmin so am scared if I
install another instance it might mess with the path settings etc of the
first one?

Can someone please shed some light on it?

Thanks.


Re: [EMAIL PROTECTED] Dynamic text-file created by PHP

2008-01-26 Thread Kent Larsson
> > > On 25.01.08 06:59, Kent Larsson wrote:
> > > you can make the .txt a php script and force pargins by php parser by 
> > > using
> > >  and SetHandler
> >
> > Thank you! But I still don't get it to work.
>
> > 
> >   SetType application/x-httpd-php
> > 
>
>
> Tried SetHandler as suggested?

Yes, sorry about the typo in my last post. It was SetHandler I meant.
Still I am having one problem. I want the http response to look
_exactly_ as when retriving a normal text file. I changed expose_php
to no which got rid of one unwanted header. But still there are
differences:

= A real text file =

Response Headers
DateSun, 27 Jan 2008 01:05:15 GMT
Server  Apache
Last-Modified   Thu, 24 Jan 2008 19:33:03 GMT
Etag"a40158-1a-e90699c0"
Accept-Ranges   bytes
Content-Length  26
Content-Typetext/plain; charset=UTF-8

= My php generated text file =

Response Headers
DateSun, 27 Jan 2008 01:05:17 GMT
Server  Apache
Keep-Alive  timeout=15, max=97
Content-Length  26
Connection  Keep-Alive
Content-Typetext/plain; charset=UTF-8

I can easily add the missing headers to the php generated text file.
But I don't want "Connection: Keep-Alive" or "Keep-Alive: timeout=15,
max=97" sent. That's my main problem at the moment. Any ideas on how
to not send those? Or how to "filter them out" using PHP?

Someone said I could use mod_rewrite to get an exact response which is
identical to the static normal text file from my php generated one.
But I don't know how to do that using mod_rewrite. Any ideas on that
approach?

Thanks for reading my post!

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



[EMAIL PROTECTED] Apache Restart

2008-01-26 Thread Ashwin Basagouda Patil
Dear All,

How I can restart the Apache in one line command ?

I am using the bellow command, to start in SSL connection.

/usr/local/apache/bin/apachectl startssl


If I use the bellow cammand, to restart it is starting in the NON SSL 
connection.

/usr/local/apache/bin/apachectl restart


Please suggest me how I can restarrt the apache in SSL connection by using 
above one line command.

Thanks & Regards

Ashwin Patil


---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.



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



Re: [EMAIL PROTECTED] Apache Restart

2008-01-26 Thread solprovider
See:
http://httpd.apache.org/docs/2.0/programs/apachectl.html
http://httpd.apache.org/docs/2.0/programs/httpd.html

A one-line restart command needs "-DSSL".  Be explicit using the
parameters from the second link:
apachectl -k restart -DSSL

A better solution is to reconfigure for SSL without command line parameters.

solprovider

On 1/26/08, Ashwin  Basagouda Patil <[EMAIL PROTECTED]> wrote:
> How I can restart the Apache in one line command ?
> I am using this command to start with SSL connections:
> /usr/local/apache/bin/apachectl startssl
>
> This command restarts without SSL connections:
> /usr/local/apache/bin/apachectl restart
>
> Please suggest how apache can restart with SSL connections using a one-line 
> command.
>
> Thanks & Regards
> Ashwin Patil

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



Re: [EMAIL PROTECTED] another instance of apache

2008-01-26 Thread Mandy Singh
My concern was that when I run make install command, will it start copying
files to paths that might overlap with earlier intallation? What did you use
- rpm or did u make it yourself?

What does make install do internally?

On Jan 27, 2008 1:12 AM, Luis Croker <[EMAIL PROTECTED]> wrote:

>
> I have running two apaches in the same server.  I installed the first
> instance normally.  The second one, I compiled and I just copied the httpd
> binary file to the system with another name and I put it to run with another
> IP.
>
> Both are running well.
>
> Regards.
>
>
>
>  *Luis Croker*
> --
> SCSA - SCNA
> Administrador de Sistemas
> Megacable Comunicaciones 
> GPG Key1024D/48C1764B 
> Key fingerprint = E8B6 E84F ECE4 661E 30C7 7208 042D BD09 48C1 764B
>
>
> Mandy Singh wrote:
>
> Hi Everyone,
>
> I already have an installation of apache 2 (2.0.52 I think) on the server.
>
> I want to install another instance of apache 2 on the server to listen to
> another IP (different than the first instance).
>
> I downloaded apache 2 gz files.
>
> What are the things I should keep in mind while installing another
> instance?
>
> I can configure apache good but I am not a sysadmin so am scared if I
> install another instance it might mess with the path settings etc of the
> first one?
>
> Can someone please shed some light on it?
>
> Thanks.
>
>