Perl On Apache
am 10.08.2007 20:13:58 von Louis
I have a web application that at some point I would like to run a perl
script on the web server to update an excel spreadsheet on the server.
My problem is..Apache seems to be running it as a cgi script(?). It
displays the script on the browser!
Is there a way to do this? What is needed to configure Apache to run it
as a "normal" script?
Thank you.
Re: Perl On Apache
am 10.08.2007 20:37:42 von Mirco Wahab
Louis wrote:
> I have a web application that at some point I would like to run a perl
> script on the web server to update an excel spreadsheet on the server.
>
> My problem is: Apache seems to be running it as a cgi script(?). It
> displays the script on the browser!
>
> Is there a way to do this? What is needed to configure Apache to run it
> as a "normal" script?
If you could be so kind and provide some
details regarding ...
- your operating system and version,
- your apache version and install location,
- your Perl version and install location,
.... I'm sure everybody in this news group, which
is among the most frendliest and professional
groups in the usenet world, would start to
present a matching solution fast.
Regards
M.
Re: Perl On Apache
am 10.08.2007 20:52:01 von JT
Louis wrote:
> I have a web application that at some point I would like to run a perl
> script on the web server to update an excel spreadsheet on the server.
> My problem is..Apache seems to be running it as a cgi script(?). It
> displays the script on the browser!
The output (to stdout) of a script run by Apache goes into the
page that gets returned by the server. That's what allowing a
web server to run scripts at all is meant for.
> Is there a way to do this? What is needed to configure Apache to run it
> as a "normal" script?
If you want to update a file when the URL associated with your
script is requested by a client then in the script open the
file you want to update and write to that file instead of
stdout. Or write a wrapper script that gets invoked instead
on a request and in this wrapper script run the first script
with its stdout redirected to the file you want to update.
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
Re: Perl On Apache
am 10.08.2007 22:21:15 von Sherm Pendley
Louis writes:
> I have a web application that at some point I would like to run a perl
> script on the web server to update an excel spreadsheet on the server.
>
> My problem is..Apache seems to be running it as a cgi script(?). It
> displays the script on the browser!
On the contrary, that shows that Apache is not running your script; if it
were doing so, you'd be seeing your script's output, not your script.
> Is there a way to do this? What is needed to configure Apache to run
> it as a "normal" script?
Apache doesn't run "normal" scripts. Your Perl script must run as either a
CGI (easier) or as a mod_perl server extension ((usually) faster). Both
CGI and mod_perl environments impose requirements above and beyond those
imposed on "normal" scripts run in a terminal, such as returning a proper
set of HTTP headers, and (usually, but not always) HTML output.
To get started with CGI in Perl, have a look at the CGI meta-faq:
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: Perl On Apache
am 11.08.2007 02:08:25 von Bill H
On Aug 10, 2:13 pm, Louis wrote:
> I have a web application that at some point I would like to run a perl
> script on the web server to update an excel spreadsheet on the server.
>
> My problem is..Apache seems to be running it as a cgi script(?). It
> displays the script on the browser!
>
> Is there a way to do this? What is needed to configure Apache to run it
> as a "normal" script?
>
> Thank you.
Louis - you need to enable it. Look in your httpd.conf file, either
in : /usr/local/etc/apache/httpd.conf or in /etc/apache/httpd.conf -
For more information on this file look at www.apache.org. Curious what
instalation are you using that didnt enable perl under apache on
installation?
Bill H
Re: Perl On Apache
am 11.08.2007 03:51:07 von Petr Vileta
Bill H wrote:
> On Aug 10, 2:13 pm, Louis wrote:
> Louis - you need to enable it. Look in your httpd.conf file, either
> in : /usr/local/etc/apache/httpd.conf or in /etc/apache/httpd.conf -
or in /etc/httpd/conf/httpd.conf
on Linux of course. On windows this could be somewhere on c:\program
files\Apache
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
[OT] Dealing with spam (was: Perl On Apache)
am 11.08.2007 05:55:17 von Gunnar Hjalmarsson
Petr Vileta wrote:
> (My server rejects all messages from Yahoo and Hotmail.
Funny; I get almost no spam from Yahoo or Hotmail servers.
Or are you saying that you reject messages based on the faked From
addresses??
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Re: [OT] Dealing with spam (was: Perl On Apache)
am 16.08.2007 09:28:15 von Martijn Lievaart
On Sat, 11 Aug 2007 05:55:17 +0200, Gunnar Hjalmarsson wrote:
> Petr Vileta wrote:
>> (My server rejects all messages from Yahoo and Hotmail.
>
> Funny; I get almost no spam from Yahoo or Hotmail servers.
Neither do I. But I reject all mail from hotmail, so othat figures.
> Or are you saying that you reject messages based on the faked From
> addresses??
I both reject any message with a hotmail "mail from" and all messages
from hotmails servers.
M4
Re: [OT] Dealing with spam (was: Perl On Apache)
am 17.08.2007 01:48:45 von Petr Vileta
Martijn Lievaart wrote:
> On Sat, 11 Aug 2007 05:55:17 +0200, Gunnar Hjalmarsson wrote:
>
>> Petr Vileta wrote:
>>> (My server rejects all messages from Yahoo and Hotmail.
>>
>> Funny; I get almost no spam from Yahoo or Hotmail servers.
>
> Neither do I. But I reject all mail from hotmail, so othat figures.
>
>> Or are you saying that you reject messages based on the faked From
>> addresses??
>
> I both reject any message with a hotmail "mail from" and all messages
> from hotmails servers.
>
I reject many other mails by IP address or IP ranges. If you want to have my
blacklist you can download it from
http://www.practisoft.cz/download/blacklist.zip
At the begin I have section called "idiots list". In this section are unique
IPs of people who have PC infected frequently (idiots) :-)
Maybe this name (idiots list) will come new standard term. We have
white-list, black-list, shadow-list. Why not idiots-list? :-)
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)