Re: Apache::MP3
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: Apache::MP3
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
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
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/
Re: Apache::MP3::Skin and PerlSetVar
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/
Re: Apache::MP3 Problem?
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]