I was looking for nice MP3 streaming software so I could be able to
play the audio files from my computer. This is how I got the apache::MP3
project. The problem is that I can't get it working in the right way
and I'm wondering whether you can help me out. I'll start to describe
what I've done already:
1. Install apache version 2.0.49
2. Install mod_perl: 1.99_12_20040302
3. Install perl-mp3-info1.11-1.i586.rpm
4. Install apache-mp3-3.05
I had to change some code in MP3.pm to get it working:
1. Turn warnings on in this file for better debugging:
use warnings;
no warnings 'redefine';
2. Change code:
Code:
my $NO = '^(no|false)$'; # regular expression
my $YES = '^(yes|true)$'; # regular expression
my $JSCRIPT=<<END;
function toggleAll(self,field) {
if(self.checked == true){
for (i = 0; i < field.length; i++)
field[i].checked = true ;
} else {
for (i = 0; i < field.length; i++)
field[i].checked = false ;
}
}
END
sub handler ($$) {
my $class = shift;
my $obj = $class->new(@_) or die "Can't create object: $!";
return $obj->run();
}
to this:
Code:
my $NO = '^(no|false)$'; # regular expression
my $YES = '^(yes|true)$'; # regular expression
my $JSCRIPT=<<END;
function toggleAll(self,field) {
if(self.checked == true){
for (i = 0; i < field.length; i++)
field[i].checked = true ;
} else {
for (i = 0; i < field.length; i++)
field[i].checked = false ;
}
}
END
sub handler : method {
my $class = shift;
my $obj = $class->new(@_) or die "Can't create object: $!";
return $obj->run();
}
And:
Code:
y $self = shift;
my $dir = shift;
unless ($self->r->path_info){
to this:
Code:
y $self = shift;
my $dir = shift;
unless ($self->r->path_info eq ''){
Ok, here are the problems:
1. Browsing music directories works fine, but…
- I can't use the search function. When I search something I get:
Server error 500: Either the server is overloaded (no) or there was
an error in a CGI script. Apache error log: [error] handler
Apache::MP3 didn't return a valid return value! How is it possible
that I'm not able to search?
Server error log:
-e: Use of uninitialized value in pattern match (m//) at
/etc/apache2//Apache/MP3.pm line 1843.
-e: Use of uninitialized value in split at /etc/apache2//Apache/MP3.pm
line 1693.
-e: Use of uninitialized value in pattern match (m//) at
/etc/apache2//Apache/MP3.pm line 1843.
-e: Use of uninitialized value in pattern match (m//) at
/etc/apache2//Apache/MP3.pm line 1843.
[error] handler Apache::MP3 didn't return a valid return value!
Line 1843 =
1841 # return true if streaming is allowed from this directory
1842 sub stream_ok {
1843 shift->r->dir_config('AllowStream') !~ /$NO/oi;
1844 }
Line 1693=
1690 # get fields to display in list of MP3 files
1691 sub fields {
1692 my $self = shift;
1693 my @f = split /\W+/,$self->r->dir_config('Fields');
- When I click on the quick help summary url, I can see a nice
screenshot + some meanings of the characters+ another error 500 code
at the bottom of the page.
Ok that's it
-What are the best options for me to get this module working?
-Are there test commands to test the module?
-Do I have to install other versions of the software to get this
running ( I would like to keep this apache2 version).
Hopefully u can help me out with these problems. Thanx in advance,
Deus
Ps, if u need to see the full httpd.conf, mod_perl-startup.pl or default-server.conf, I'll put them on my webserver and post the url's.