Re: [port to mp2] Apache::MP3

2003-06-17 Thread Stas Bekman
[CC'ing Clemens Schrimpe]

This is great news.  Enclosed is my current version, which is slightly 
different from 3.03.  It is also called 3.04, unfortunately.
Thanks Lincoln,

I'm not sure when I'll be able to merge this, as I'm leaving on vacation 
shortly. However Clemens Schrimpe has been working on porting it as well, so 
he might beat me to it.

Meanwhile if somebody asks about a 2.0 port, you can point them to this URL:
http://stason.org/tmp/Apache-MP3-3.04.tar.gz
As Clemens Schrimpe has pointed out in a private email, my port is not 
complete as I failed to notice that ICY headers should be sent in nph- mode, 
and xmms seems to work just fine with it. Hopefully Clemens will provide a 
better port soonish.

Lincoln

On Monday 02 June 2003 07:37 am, Stas Bekman wrote:

I've ported Apache::MP3 to mp2. I'm not submitting it as a patch yet, since
I want to try to make the changes co-exist with mp1.
This package currently works only with mp2:

  http://stason.org/tmp/Apache-MP3-3.04.tar.gz

This a temporary location and will be gone once I submit the changes to
Lincoln and he releases a new version.
I've also cleaned up the code to emit no warnings and be a bit less
error-prone (as I tested with no so perfect mp3 files). Still there could
be problems, but it should be good enough to start with.
p.s. Lincoln, do you have any changes since 3.03? If so, can you please
send them to me so I work with the latest version. Thanks.
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




--

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


[port to mp2] Apache::MP3

2003-06-02 Thread Stas Bekman
I've ported Apache::MP3 to mp2. I'm not submitting it as a patch yet, since I 
want to try to make the changes co-exist with mp1.

This package currently works only with mp2:

  http://stason.org/tmp/Apache-MP3-3.04.tar.gz

This a temporary location and will be gone once I submit the changes to 
Lincoln and he releases a new version.

I've also cleaned up the code to emit no warnings and be a bit less 
error-prone (as I tested with no so perfect mp3 files). Still there could be 
problems, but it should be good enough to start with.

p.s. Lincoln, do you have any changes since 3.03? If so, can you please send 
them to me so I work with the latest version. Thanks.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Apache::MP3

2003-05-30 Thread FARRINGTON, RYAN
Title: Apache::MP3





Has anyone gotten Apache::MP3 to run on Mod_perl 2?





Re: Apache::MP3

2003-05-30 Thread Stas Bekman
FARRINGTON, RYAN wrote:
Has anyone gotten Apache::MP3 to run on Mod_perl 2?
Hold on a bit, I'll post a ported version soonish.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: shim silence in Apache::MP3

2003-03-24 Thread Lincoln Stein
Hi Sean,

It sounds like a great idea, but it's not going to happen soon.  My first 
priority is to get Apache::MP3 working with mod_perl 2.0 while maintaining 
compatibility with mod_perl 1.0.So much has changed between the two 
versions that I've basically given up on maintaining all my mod_perl scripts 
until I have a big chunk of free time (unlikely to happen soon, if ever).

Lincoln


On Monday 24 March 2003 08:05 am, Sean M. Burke wrote:
 Me and Chris Nandor and Joe Johnston were just nattering on about frilly
 little nicities would like (or have liked) in Apache::MP3.  And I just
 thought of one, hooboy!

 Namely: maybe an option for inserting 2s of silence between tracks, or
 maybe just between tracks in different directories.  What do you think?
 Somewhere around here I have some mp3s and oggs of absolute silence, of
 various runtimes, and even one with a runtime of 4 minutes 33 seconds, of
 course.

-- 

Lincoln D. Stein   Cold Spring Harbor Laboratory
[EMAIL PROTECTED] Cold Spring Harbor, NY




Re: shim silence in Apache::MP3

2003-03-24 Thread Stas Bekman
Lincoln Stein wrote:
Hi Sean,

It sounds like a great idea, but it's not going to happen soon.  My first 
priority is to get Apache::MP3 working with mod_perl 2.0 while maintaining 
compatibility with mod_perl 1.0.So much has changed between the two 
versions that I've basically given up on maintaining all my mod_perl scripts 
until I have a big chunk of free time (unlikely to happen soon, if ever).
Looks like a good opportunity for folks who want to get up to speed with mp2 
to help CPAN developers port their modules to 2.0. I'm sure Lincoln will 
appreciate to get a patch that makes Apache::MP3, and his other modules work 
with mp2. Lincoln, please correct me if I'm wrong ;)

On Monday 24 March 2003 08:05 am, Sean M. Burke wrote:

Me and Chris Nandor and Joe Johnston were just nattering on about frilly
little nicities would like (or have liked) in Apache::MP3.  And I just
thought of one, hooboy!
Namely: maybe an option for inserting 2s of silence between tracks, or
maybe just between tracks in different directories.  What do you think?
Somewhere around here I have some mp3s and oggs of absolute silence, of
various runtimes, and even one with a runtime of 4 minutes 33 seconds, of
course.
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


RE: [mp1] Help with Apache::MP3

2003-02-27 Thread Wilcox, Curtis
I've resolved this problem, at least to a degree which satisfies me. I built
apache-1.3.27 and mod_perl-1.27 together following the INSTALL.simple
instructions from the mod_perl source but adding EVERYTHING=1 when running
Makefile.PL. This makes Apache::MP3 work on a Red Hat 7.3 system with perl
5.8.0 added and also on Red Hat 8.0 (which has perl 5.8.0 included) but only
if mod_perl-1.99 was *not* a selected package. On an 8.0 system with
mod_perl-1.99 present, /usr/local/apache/bin/apachectl configtest still
causes a segmentation fault.

Many thanks to Ged Haywood for plenty of support off-list.

 --
 From: Wilcox, Curtis
 Sent: Thursday, February 20, 2003 1:31 PM
 To:   [EMAIL PROTECTED]
 Subject:  [mp1] Help with Apache::MP3
 
 Actually I run into the problem before I get to the Apache::MP3 part but
 running Apache::MP3 is the ultimate goal.
 
 The distro I'm trying is Red Hat 8.0 which includes apache 2.x.x, mod_perl
 1.99 and perl 5.8.0 but Apache::MP3 requires the 1.0 mod_perl API. I tried
 to use the Apache::compat module as suggested by the Namp! web site
 http://namp.sourceforge.net/ to make it compatible with the 1.0 API but
 that didn't seem to work. I get failed to resolve handler `Apache::MP3'
 in
 the httpd/error_log when trying to load the directory Apache::MP3 is set
 to
 handle.
 
 I would just as soon not use Apache 2 anyway so I tried installing
 apache-1.3.27 and mod_perl-1.27, following the instructions in
 INSTALL.simple, included in the mod_perl source. Unfortunately when I add
 the following to httpd.conf, the apachectl configtest segfaults:
 
 Location /Songs
 SetHandler perl-script
 PerlHandler Apache::MP3
 /Location
 
 /usr/local/apache/bin/apachectl configtest
 /usr/local/apache/bin/apachectl: line 171:   999 Segmentation fault
 $HTTPD -t
 
 The segfault is not caused by the PerlHandler, it still happens if there's
 only the SetHandler line.
 
 I have successfully run Apache::MP3 on a Red Hat 7.3 configuration but I'd
 like to use Red Hat 8.0 because of a number of the updates included the
 current version of perl. This page compares the versions of the relevant
 components (as far as I can tell) and the output of httpd -V, httpd -l,
 and
 perl -V on the Red Hat 8.0 and Red Hat 7.3 machines.
 
 http://stream.esm.rochester.edu/trouble/stream80_vs_stream73.html
 
 I should also mention that on Red Hat 8.0 if I do not select the Web
 Server set of packages, Apache 2.0 is still installed but mod-perl 1.99
 is
 not. I don't *think* that should make a difference but I can't tell.
 
 Does anyone know a specific cause of this problem? What's my best option,
 do
 a different compile of apache  mod_perl? Could I upgrade Red Hat 7.3 to
 8.0
 and retain my apache configuration but end up with perl 5.8.0?
 
 -- 
 Curtis Wilcox   Eastman School of Music
 [EMAIL PROTECTED]
 
 
 


Re: [mp1] Help with Apache::MP3

2003-02-27 Thread Stas Bekman
Wilcox, Curtis wrote:
I've resolved this problem, at least to a degree which satisfies me. I built
apache-1.3.27 and mod_perl-1.27 together following the INSTALL.simple
instructions from the mod_perl source but adding EVERYTHING=1 when running
Makefile.PL. This makes Apache::MP3 work on a Red Hat 7.3 system with perl
5.8.0 added and also on Red Hat 8.0 (which has perl 5.8.0 included) but only
if mod_perl-1.99 was *not* a selected package. On an 8.0 system with
mod_perl-1.99 present, /usr/local/apache/bin/apachectl configtest still
causes a segmentation fault.
If you have a problem with mp2, you have to try the latest stable version or 
even the cvs version, since many bugs were fixed since the version bundled 
with RH8.0. If the bugs is still there, please do a complete bug report 
following the guidelines:
http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


[mp1] Help with Apache::MP3

2003-02-20 Thread Wilcox, Curtis
Actually I run into the problem before I get to the Apache::MP3 part but
running Apache::MP3 is the ultimate goal.

The distro I'm trying is Red Hat 8.0 which includes apache 2.x.x, mod_perl
1.99 and perl 5.8.0 but Apache::MP3 requires the 1.0 mod_perl API. I tried
to use the Apache::compat module as suggested by the Namp! web site
http://namp.sourceforge.net/ to make it compatible with the 1.0 API but
that didn't seem to work. I get failed to resolve handler `Apache::MP3' in
the httpd/error_log when trying to load the directory Apache::MP3 is set to
handle.

I would just as soon not use Apache 2 anyway so I tried installing
apache-1.3.27 and mod_perl-1.27, following the instructions in
INSTALL.simple, included in the mod_perl source. Unfortunately when I add
the following to httpd.conf, the apachectl configtest segfaults:

Location /Songs
SetHandler perl-script
PerlHandler Apache::MP3
/Location

/usr/local/apache/bin/apachectl configtest
/usr/local/apache/bin/apachectl: line 171:   999 Segmentation fault
$HTTPD -t

The segfault is not caused by the PerlHandler, it still happens if there's
only the SetHandler line.

I have successfully run Apache::MP3 on a Red Hat 7.3 configuration but I'd
like to use Red Hat 8.0 because of a number of the updates included the
current version of perl. This page compares the versions of the relevant
components (as far as I can tell) and the output of httpd -V, httpd -l, and
perl -V on the Red Hat 8.0 and Red Hat 7.3 machines.

http://stream.esm.rochester.edu/trouble/stream80_vs_stream73.html

I should also mention that on Red Hat 8.0 if I do not select the Web
Server set of packages, Apache 2.0 is still installed but mod-perl 1.99 is
not. I don't *think* that should make a difference but I can't tell.

Does anyone know a specific cause of this problem? What's my best option, do
a different compile of apache  mod_perl? Could I upgrade Red Hat 7.3 to 8.0
and retain my apache configuration but end up with perl 5.8.0?

-- 
Curtis Wilcox   Eastman School of Music
[EMAIL PROTECTED]





Re: [mp1] Help with Apache::MP3

2003-02-20 Thread Ged Haywood
On Thu, 20 Feb 2003, Wilcox, Curtis wrote:

[snip,snip]
 tried installing apache-1.3.27 and mod_perl-1.27, following the
 instructions in INSTALL.simple, included in the mod_perl
 source. Unfortunately when I add the following to httpd.conf, the
 apachectl configtest segfaults:
 
 Location /Songs
 SetHandler perl-script
 PerlHandler Apache::MP3
 /Location
 
 /usr/local/apache/bin/apachectl configtest
 /usr/local/apache/bin/apachectl: line 171:   999 Segmentation fault
 $HTTPD -t
 
 The segfault is not caused by the PerlHandler, it still happens if there's
 only the SetHandler line.

Did you build mod_perl as a DSO?  If so I'd try static.

 I have successfully run Apache::MP3 on a Red Hat 7.3 configuration but I'd
 like to use Red Hat 8.0 because of a number of the updates included the
 current version of perl. This page compares the versions of the relevant
 components (as far as I can tell) and the output of httpd -V, httpd -l, and
 perl -V on the Red Hat 8.0 and Red Hat 7.3 machines.
 
 http://stream.esm.rochester.edu/trouble/stream80_vs_stream73.html

Er...

hurricane:~$  ping stream.esm.rochester.edu
PING stream.esm.rochester.edu (172.30.209.9) from 212.22.195.7 : 56(84) bytes of data.

--- stream.esm.rochester.edu ping statistics ---
15 packets transmitted, 0 packets received, 100% packet loss

 Could I upgrade Red Hat 7.3 to 8.0

How much time have you got?

 and retain my apache configuration but end up with perl 5.8.0?

If you want Perl 5.8.0 under 7.3 that's no problem, just grab the
source and compile it.  (Don't use RPMs unless you relish pain...:)

73,
Ged.




RE: [mp1] Help with Apache::MP3

2003-02-20 Thread Wilcox, Curtis
 -Original Message-
 From: Ged Haywood [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 20, 2003 4:30 PM
 To: Wilcox, Curtis
 Cc: [EMAIL PROTECTED]
 Subject: Re: [mp1] Help with Apache::MP3
 
 
 On Thu, 20 Feb 2003, Wilcox, Curtis wrote:
 
 [snip,snip]
  tried installing apache-1.3.27 and mod_perl-1.27, following the
  instructions in INSTALL.simple, included in the mod_perl
  source. Unfortunately when I add the following to httpd.conf, the
  apachectl configtest segfaults:
  
  Location /Songs
  SetHandler perl-script
  PerlHandler Apache::MP3
  /Location
  
  /usr/local/apache/bin/apachectl configtest
  /usr/local/apache/bin/apachectl: line 171:   999 Segmentation fault
  $HTTPD -t
  
  The segfault is not caused by the PerlHandler, it still 
 happens if there's
  only the SetHandler line.
 
 Did you build mod_perl as a DSO?  If so I'd try static.

It's not a DSO, it's compiled in. If I had gotten the URL correct, that
would have been clear :-)

  I have successfully run Apache::MP3 on a Red Hat 7.3 
 configuration but I'd
  like to use Red Hat 8.0 because of a number of the updates 
 included the
  current version of perl. This page compares the versions of 
 the relevant
  components (as far as I can tell) and the output of httpd 
 -V, httpd -l, and
  perl -V on the Red Hat 8.0 and Red Hat 7.3 machines.
  
  http://stream.esm.rochester.edu/trouble/stream80_vs_stream73.html
 
 Er...
 
 hurricane:~$  ping stream.esm.rochester.edu
 PING stream.esm.rochester.edu (172.30.209.9) from 
 212.22.195.7 : 56(84) bytes of data.

Sorry, I forgot the hostname is on a private IP. This link works.

http://128.151.209.241/trouble/stream80_vs_stream73.html

 --- stream.esm.rochester.edu ping statistics ---
 15 packets transmitted, 0 packets received, 100% packet loss
 
  Could I upgrade Red Hat 7.3 to 8.0
 
 How much time have you got?

The implication being that booting the 7.3 machine with an 8.0 isn't going
to get me an option that a regular person would call an upgrade?

  and retain my apache configuration but end up with perl 5.8.0?
 
 If you want Perl 5.8.0 under 7.3 that's no problem, just grab the
 source and compile it.  (Don't use RPMs unless you relish pain...:)

Is it pretty clear how to make everything use 5.8.0 instead of the
pre-existing version? Is it as simple as replacing /usr/bin/perl?



Apache::MP3

2003-01-03 Thread paul . barker



Hi All

This may be off topic but since it's Friday I thought I'd have a quick play and
install Apache::MP3.

I've built the module and followed the Apache config instructions on the web
site, but every time I try to access the /music location I get a 500 error and
the following line in error_log :

[Fri Jan  3 13:24:49 2003] [error] Can't locate object method new via package
Apache (perhaps you forgot to load Apache?) at
/opt/perl/lib/site_perl/5.6.1/Apache/MP3.pm line 80.

Any ideas why it's not working. I'm using other modules without issue.

Perl 5.6.1
Mod Perl 1.27
HPUX 11i

startup.pl

#!/usr/local/bin/perl -w
# to load this file when the server starts, add this to httpd.conf:
# PerlRequire /path/to/startup.pl

BEGIN{
        use Apache ();
        use lib Apache-server_root_relative('lib/site_perl/5.6.1');
}

# make sure we are in a sane environment.
$ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/ or die GATEWAY_INTERFACE not Perl!;

use Apache::Registry ();
use Apache::Constants();
use DBI ();
use DBD::mysql ();
use CGI qw(-compile :all);
use CGI::Application;
use GD;
use MP3::Info;
use Apache::MP3;

1;

Cheers

Paul



***
Important.
Confidentiality: This communication is intended for the above-named person and
may be confidential and/or legally privileged. Any opinions expressed in this
communication are not necessarily those of the company. If it has come to you
in error you must take no action based on it, nor must you copy or show it to
anyone; please delete/destroy and inform the sender immediately.

Monitoring/Viruses
Orange may monitor all incoming and outgoing emails in line with current
legislation.  Although we have taken steps to ensure that this email and
attachments are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus free.

Orange PCS Limited is a subsidiary of Orange SA and is registered in England No
2178917, with its address at St James Court, Great Park Road, Almondsbury Park,
Bradley Stoke, Bristol BS32 4QJ.
***




Re: Apache::MP3

2003-01-03 Thread asdf asdf
Paul

I do know know that in your startup.pl file, if you put:

BEGIN{
   use Apache ();
   use lib Apache-server_root_relative('lib/site_perl/5.6.1');
}

Then the path to the directory would be:
/usr/local/apache/lib/site_perl/5.6.1
or
Whever the server root for apache is.

The directory you are pointing to looks like the Perl installation.

That lib directive points to the location of your Apache modules.

That stands out, but maybe veterans of mod_perl will see what I am getting 
at. I have built custom modules in a directory structure like so

/usr/local/apache/perl/Apache/Header.pm

with my use lib being set to:
use lib Apache-server_root_realtive('perl');

So anything in the Apache namespace would be placed in the Apache directory. 
I hope to play with the Apache::MP3 module myself, but I believe it has to 
be put in this directory. If I am wrong, please, fellow perlMonks, correct 
me.

Michael Shirk




From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Apache::MP3
Date: Fri, 3 Jan 2003 13:37:10 +




Hi All

This may be off topic but since it's Friday I thought I'd have a quick play 
and
install Apache::MP3.

I've built the module and followed the Apache config instructions on the 
web
site, but every time I try to access the /music location I get a 500 error 
and
the following line in error_log :

[Fri Jan  3 13:24:49 2003] [error] Can't locate object method new via 
package
Apache (perhaps you forgot to load Apache?) at
/opt/perl/lib/site_perl/5.6.1/Apache/MP3.pm line 80.

Any ideas why it's not working. I'm using other modules without issue.

Perl 5.6.1
Mod Perl 1.27
HPUX 11i

startup.pl

#!/usr/local/bin/perl -w
# to load this file when the server starts, add this to httpd.conf:
# PerlRequire /path/to/startup.pl

BEGIN{
        use Apache ();
        use lib Apache-server_root_relative('lib/site_perl/5.6.1');
}

# make sure we are in a sane environment.
$ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/ or die GATEWAY_INTERFACE not 
Perl!;

use Apache::Registry ();
use Apache::Constants();
use DBI ();
use DBD::mysql ();
use CGI qw(-compile :all);
use CGI::Application;
use GD;
use MP3::Info;
use Apache::MP3;

1;

Cheers

Paul



***
Important.
Confidentiality: This communication is intended for the above-named person 
and
may be confidential and/or legally privileged. Any opinions expressed in 
this
communication are not necessarily those of the company. If it has come to 
you
in error you must take no action based on it, nor must you copy or show it 
to
anyone; please delete/destroy and inform the sender immediately.

Monitoring/Viruses
Orange may monitor all incoming and outgoing emails in line with current
legislation.  Although we have taken steps to ensure that this email and
attachments are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus 
free.

Orange PCS Limited is a subsidiary of Orange SA and is registered in 
England No
2178917, with its address at St James Court, Great Park Road, Almondsbury 
Park,
Bradley Stoke, Bristol BS32 4QJ.
***


_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE* 
http://join.msn.com/?page=features/virus



Re: Apache::MP3 requires PerlSetupEnv on, patch to convert toApache::Request

2002-03-05 Thread Ask Bjoern Hansen

On Mon, 4 Mar 2002, Stas Bekman wrote:

[] 
 Can CGIpm detect that 'PerlSetupEnv Off' is in effect and die if that's 
 the case? for example by testing some env var that most likely should be 
 set with 'PerlSetupEnv On'? eg:

For now I have added that check to Apache::MP3  (with warn instead
of die If it goes into CGIpm it shouldn't be with die, you might
want to use CGIpm but not any of the functions that are using
%ENV)



 - ask

-- 
ask bjoern hansen, http://asknetceteradk/ !try; do();
more than a billion impressions per week, http://valueclickcom




Re: Apache::MP3 requires PerlSetupEnv on, patch to convert to Apache::Request

2002-03-04 Thread Stas Bekman

Eric Hammond wrote:
 Lincoln:
 
 After a day of adding debug statements into Apache::MP3 and CGI.pm
 I finally tracked down why my streaming was not working.  I had
 listened to http://perl.apache.org/guide/performance.html#PerlSetupEnv_Off
 which caused $ENV{QUERY_STRING} to not be set which broke CGI.pm.

The guide does say:

Scripts using the CGI.pm module require PerlSetupEnv On
because that module relies on a properly populated CGI
environment table.

But I realize that a user of Apache::MP3 may not realize that the latter 
uses CGI.pm under the hood.

Can CGI.pm detect that 'PerlSetupEnv Off' is in effect and die if that's 
the case? for example by testing some env var that most likely should be 
set with 'PerlSetupEnv On'? e.g.:

   #check that we aren't running under PerlSetupEnv Off
   if ($ENV{MOD_PERL}  !ENV{SCRIPT_FILENAME}) {
   die CGI.pm cannot run under 'PerlSetupEnv Off' setting;
   }



 To save others the agony, you might want to add a note to the Apache::MP3
 docs that it requires PerlSetupEnv on
 
 Alternatively, you might consider rewriting Apache::MP3 to use 
 Apache::Request instead of CGI.pm (though I understand you may have 
 a fondness for the latter).
 
 I've included a patch to convert Apache::MP3 to use Apache::Request
 for parameters.  More work would be required to convert the other uses 
 of CGI.pm, but if you'd like, I'd be willing to tackle that, too, as 
 it would be nice to not require the large size of CGI.pm.
 

_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Apache::MP3 requires PerlSetupEnv on, patch to convert to Apache::Request

2002-03-03 Thread Eric Hammond

Lincoln:

After a day of adding debug statements into Apache::MP3 and CGI.pm
I finally tracked down why my streaming was not working.  I had
listened to http://perl.apache.org/guide/performance.html#PerlSetupEnv_Off
which caused $ENV{QUERY_STRING} to not be set which broke CGI.pm.

To save others the agony, you might want to add a note to the Apache::MP3
docs that it requires PerlSetupEnv on

Alternatively, you might consider rewriting Apache::MP3 to use 
Apache::Request instead of CGI.pm (though I understand you may have 
a fondness for the latter).

I've included a patch to convert Apache::MP3 to use Apache::Request
for parameters.  More work would be required to convert the other uses 
of CGI.pm, but if you'd like, I'd be willing to tackle that, too, as 
it would be nice to not require the large size of CGI.pm.

Thanks
--
Eric Hammond
[EMAIL PROTECTED]

--- Apache/MP3.pm.orig  Sat Mar  2 18:00:37 2002
+++ Apache/MP3.pm   Sun Mar  3 10:14:23 2002
@@ -67,7 +67,7 @@
 
 sub new {
   my $class = shift;
-  unshift @_,'r' if @_ == 1;
+  @_ = ('r' = Apache::Request-new(shift)) if @_ == 1;
   return bless { @_ },$class;
 }
 
@@ -82,35 +82,35 @@
 if -d $r-filename;  # should be $r-finfo, but STILL problems with this
 
   #simple download of file
-  return $self-download_file($r-filename) unless param;
+  return $self-download_file($r-filename) unless $r-param;
 
   # this is called to stream a file
-  return $self-stream if param('stream');
+  return $self-stream if $r-param('stream');
 
   # this is called to generate a playlist on the current directory
   return $self-send_playlist($self-find_mp3s)
-if param('Play All');
+if $r-param('Play All');
 
   # this is called to generate a playlist on the current directory
   # and everything beneath
   return $self-send_playlist($self-find_mp3s('recursive')) 
-if param('Play All Recursive') ;
+if $r-param('Play All Recursive') ;
 
   # this is called to generate a shuffled playlist of current directory
   return $self-send_playlist($self-find_mp3s,'shuffle')
-if param('Shuffle');
+if $r-param('Shuffle');
 
   # this is called to generate a shuffled playlist of current directory
   return $self-send_playlist($self-find_mp3s,'shuffle')
-if param('Shuffle All');
+if $r-param('Shuffle All');
 
   # this is called to generate a shuffled playlist of current directory
   # and everything beneath
   return $self-send_playlist($self-find_mp3s('recursive'),'shuffle')
-if param('Shuffle All Recursive');
+if $r-param('Shuffle All Recursive');
 
   # this is called to generate a playlist for one file
-  if (param('play')) {
+  if ($r-param('play')) {
 my $dot3 = '.m3u|.pls';
 my($basename) = $r-uri =~ m!([^/]+?)($dot3)?$!;
 $basename = quotemeta($basename);
@@ -137,8 +137,8 @@
   }
 
   # this is called to generate a playlist for selected files
-  if (param('Play Selected')) {
-return HTTP_NO_CONTENT unless my @files = param('file');
+  if ($r-param('Play Selected')) {
+return HTTP_NO_CONTENT unless my @files = $r-param('file');
 my $uri = dirname($r-uri);
 $self-send_playlist([map { $uri/$_ } @files]);
 return OK;




Apache::MP3::Skin and PerlSetVar

2001-11-28 Thread Patrick Buckingham

I just install Apache::MP3 and it works fine but if I try to use ::Skin
I get these messages for PerlSetVar

PerlSetvar takes two arguments Perl config var and value This does
this with ::Sortlist also. But with the straight MP3 modules I can use
PerlSetVar 

  SetHandler perl-script
PerlHandler Apache::MP3::Skin
PerlSetVar  CacheDir   /usr/tmp/mp3_cache
PerlSetVar  SortFieldsAlbum,Title,-Duration
PerlSetVar HomePath /sounds   # optional
PerlSetVar DefaultSkin default.tmpl   # required

This is the config


Thanks,

Patrick



Re: Apache::MP3::Skin and PerlSetVar

2001-11-28 Thread Jason Galea

Patrick Buckingham wrote:

 I just install Apache::MP3 and it works fine but if I try to use ::Skin
 I get these messages for PerlSetVar
 
 PerlSetvar takes two arguments Perl config var and value This does
 this with ::Sortlist also. But with the straight MP3 modules I can use
 PerlSetVar 
 
   SetHandler perl-script
   PerlHandler Apache::MP3::Skin
   PerlSetVar  CacheDir   /usr/tmp/mp3_cache
   PerlSetVar  SortFieldsAlbum,Title,-Duration
   PerlSetVar HomePath /sounds   # optional
   PerlSetVar DefaultSkin default.tmpl   # required
 
 This is the config
 
 
 Thanks,
 
   Patrick
 
 .
 
 


try taking out the comments, ie # optional  # required (or just 
move them to a separate line) - it's worked for me before.. I don't 
think PerlSetVar recognises the # as the start of a comment.



-- 
J
Web Developer

Eight Degrees Off Centre
http://www.eightdegrees.com.au/




Apache::MP3 error

2001-09-06 Thread Alex Porras

My setup:

- redhat 7.1
- perl 5.6.0 (original redhat rpm)
- mod_perl 1.26 (compiled)
- apache 1.3.20 (compiled)

I installed Apache::MP3 per the instructions in the docs.

perl.conf:

VirtualHost 192.168.123.100
ServerName removed
ServerAdmin removed
DefaultType text/plain
DirectoryIndex index.html
Location /songs
PerlSetVar  CacheDir/usr/tmp/mp3_cache
SetHandler  perl-script
PerlHandler Apache::MP3
/Location
/VirtualHost

httpd.conf:

# for Apache::MP3
AddType audio/mpeg mp3 MP3
AddType audio/playlist m3u M3U

startup.pl:

use MP3::Info;
use Apache::MP3;
use CGI;

I put a single MP3 in the 'songs' directory.  In what appears to be the
first request each child gets, the page pulls up fine.
However, any subsequent requests to each child result in this error in
the error_log:

[Thu Sep  6 00:51:23 2001] [error] Can't call method start_html on an
undefined value at /usr/lib/perl5/5.6.0/CGI.pm line 258.

Any ideas?

--Alex



Re: Apache::MP3 Problem?

2000-11-29 Thread tom

I think your "Order" directive is wrong.
order should be lower case, as should be allow and all.

Give that a whirl.

Tom


On Tue, Nov 28, 2000 at 08:11:06PM -0500, Sean Keplinger wrote:
 
 The Apache::MP3 module allows you to stream MP3 files from your webserver --
 it's a pretty spiffy little interface. Everything appears to be working
 fine, but when I try to stream an MP3, I get the following error in my
 error_log:
 
 [Tue Nov 28 20:01:54 2000] [error] [client x.x.x.x] need AuthName:
 /mp3/songname.m3u
 
 Is it requesting that I set up a .htaccess file for that directory, or is
 something potentially misconfigured in the Location directive?
 
 My access.conf is as follows:
 
 Location /mp3
 
SetHandler perl-script
PerlHandler Apache::MP3::Sorted
 
PerlSetVar  SortFieldsAlbum,Title,-Duration
PerlSetVar  FieldsTitle,Artist,Album,Duration
PerlSetVar  CacheDir   /usr/tmp/mp3_cache
 
Order deny,allow
Allow from All
 
 /Location
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Apache::MP3 Problem?

2000-11-28 Thread Sean Keplinger


The Apache::MP3 module allows you to stream MP3 files from your webserver --
it's a pretty spiffy little interface. Everything appears to be working
fine, but when I try to stream an MP3, I get the following error in my
error_log:

[Tue Nov 28 20:01:54 2000] [error] [client x.x.x.x] need AuthName:
/mp3/songname.m3u

Is it requesting that I set up a .htaccess file for that directory, or is
something potentially misconfigured in the Location directive?

My access.conf is as follows:

Location /mp3

   SetHandler perl-script
   PerlHandler Apache::MP3::Sorted

   PerlSetVar  SortFieldsAlbum,Title,-Duration
   PerlSetVar  FieldsTitle,Artist,Album,Duration
   PerlSetVar  CacheDir   /usr/tmp/mp3_cache

   Order deny,allow
   Allow from All

/Location


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]