Warning-Cannot Modify Header Information...

Ask Questions or make comments about Mp3 Toolbox
Post Reply
ZimShady
Posts: 4
Joined: Thu Sep 15, 2005 7:59 pm

Warning-Cannot Modify Header Information...

Post by ZimShady » Thu Sep 15, 2005 8:03 pm

Hello. I am getting these error messages when I try to connect and it screws up my radio.
Warning: Cannot modify header information - headers already sent by (output started at /home/skazor/public_html/radio/mp3toolbox_conf.php:285) in /home/skazor/public_html/radio/index.php on line 1385

Warning: Cannot modify header information - headers already sent by (output started at /home/skazor/public_html/radio/mp3toolbox_conf.php:285) in /home/skazor/public_html/radio/index.php on line 1386

Warning: Cannot modify header information - headers already sent by (output started at /home/skazor/public_html/radio/mp3toolbox_conf.php:285) in /home/skazor/public_html/radio/index.php on line 1388

Warning: Cannot modify header information - headers already sent by (output started at /home/skazor/public_html/radio/mp3toolbox_conf.php:285) in /home/skazor/public_html/radio/index.php on line 1389

Warning: Cannot modify header information - headers already sent by (output started at /home/skazor/public_html/radio/mp3toolbox_conf.php:285) in /home/skazor/public_html/radio/index.php on line 1390
thats http://radio.skazor.com

on my other host i'm having the same problem.
Warning: Cannot modify header information - headers already sent by (output started at /usr/home/itzimman/public_html/radio/mp3toolbox_conf.php:289) in /usr/home/itzimman/public_html/radio/index.php on line 1385

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/itzimman/public_html/radio/mp3toolbox_conf.php:289) in /usr/home/itzimman/public_html/radio/index.php on line 1386

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/itzimman/public_html/radio/mp3toolbox_conf.php:289) in /usr/home/itzimman/public_html/radio/index.php on line 1388

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/itzimman/public_html/radio/mp3toolbox_conf.php:289) in /usr/home/itzimman/public_html/radio/index.php on line 1389

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/itzimman/public_html/radio/mp3toolbox_conf.php:289) in /usr/home/itzimman/public_html/radio/index.php on line 1390
thats http://radio.zserver.org

any suggestions?

User avatar
Jay
Will work for food (Administrator)
Posts: 2867
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay » Fri Sep 16, 2005 2:54 am

looks like it's working now.
- Jay

Max Krivanek
Posts: 1
Joined: Fri Sep 16, 2005 7:06 am
Location: In your window.

Post by Max Krivanek » Fri Sep 16, 2005 7:13 am

It would appear that you had (or someone else) accidently put a return at the end of the config file or somehow started the output to the browser.

But just like Jay just said, looks like its working now. :D
- Max
The one and only.

ZimShady
Posts: 4
Joined: Thu Sep 15, 2005 7:59 pm

Post by ZimShady » Fri Sep 16, 2005 6:30 pm

it doesn't work if you modify anything but the directory name in the config file. I reset the config file and it works but I still can't change anything

User avatar
Jay
Will work for food (Administrator)
Posts: 2867
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay » Fri Sep 16, 2005 8:13 pm

in that case you must be doing something to the config file that outputs an error or a something.

Please post the config file that is causing problems.

According the the errors above the output was at:
mp3toolbox_conf.php line 289
- Jay

ZimShady
Posts: 4
Joined: Thu Sep 15, 2005 7:59 pm

Post by ZimShady » Fri Sep 16, 2005 11:19 pm

Here is the config file:
<?php
/************************************************************/
/* The First ever truely independent php broadcast solution */
/* M P 3 */
/* T O O L B O X */
/************************************************************/
/*****************************************************************************
Mp3 ToolBox v. 1.0 beta 5
=========================
mp3toolbox_conf.php
=========================
License
=======
You are hereby granted to use MP3 ToolBox for personal or
commercial use.

If you plan to use parts or the whole code in your own
project be sure to include a nice credit to the original
author.

www.radiotoolbox.com cannot be held liable for the use of
this code. If you are weary about using this script then
please delete it now.

While I have tried my best to tie up the security loose ends
there may still be security problems with this script.

Credit
======
Written and Designed by Jay Krivanek
Location: www.radiotoolbox.com/mp3toolbox

*****************************************************************************/

/***********************/
/* Basic Configuration */
/***********************/

/* Source Location (this can be multiple directories)
*/
$source_dir[0] = \"files\";
$category[0] = \"Music\";

/* Private Server: This setting tells Radio Toolbox that only authorized viewers are allowed
to view the contents of the index or listen or download the streams. To add accounts to
the mp3 toolbox private server mode, use the authlist.php file. Private Server mode should
be considered experimental. It also uses Basic HTTP authorization. So any client wishing to
listen to content must have a player which supports HTTP authorization (i.e. Winamp)
*/
$private_server = \"No\";

/* Downloadable (do you want people to download your music directly from the server?
*/
$downloadable = \"No\";

/* Size Mode: this determines the format of the Size entries in the size column
of your mp3toolbox index.
*/
$size_mode = \"MB\";

/* Recurse Directories, set this to Yes if you would like to have Mp3 ToolBox recurse directories
entered above.
*/
$recurse_dir = true;

/* This is the location of your template file, this can be a relative or absolute path to the template file
this file is responsible for changing the look of mp3toolbox.
*/
$skin_file = \"alt_template.php\";

/* Agent Block: This was added to allow you to customize which user-agents should be blocked
from the audio content, this is allowed in order to further curtail stream ripping, however
there is no absolute solution. Example of entries could be \"Mozilla\" to block
Mozilla based browser like Internet Explorer or Netscape, or in a list \"Mozilla|RMA\" to
block audio content from the browser above and Real Player. This feature is
based on regular expressions, so beware of using . in a name because . means everything
*/
$agent_block = \"Nothing\";

/* ID3v1.1 tag template: If the mp3 being listened to has an ID3v1 or ID3v1.1 tag it will be
used for display, the following template allows you to tell mp3toolbox what info you would
like to show from the tag and how. Tagging is similar to Winamp.
%1 = ID3 Artist %4 = ID3 Year %7 = ID3v1.1 Track Number
%2 = ID3 Title %5 = ID3 Comment
%3 = ID3 Album %6 = ID3 Genre

NOTE: Currently there is no support for ID3v2 tags.
*/
$title_format = \"%1 - %2\";

/* Whether to convert a filename from \"tO aDOOR yoU fROM aFar\" to \"To Adoor You From Afar\"
Set to true if you would like this or false to use original case, this setting is
overridden if there is an ID3 tag detected.
*/
$pretty_titles = true;


/***********************/
/* Radio Configuration */
/***********************/

/* NOTE: In radio mode all mp3s must be set to the same sample rate. It is */
/* recommended that you use a sample rate that is divisable by 11 so choose */
/* 11Khz, 22Khz, 44Khz etc, files must also share the same Channel mode (stereo or */
/* mono), you can elect to use the $stream_* filter options below if you do not wish */
/* to worry about seperating certain files from others. VBR is NOT supported for */
/* sourcing a SHOUTcast server, however VBR files will work perfectly fine when */
/* listened to directly from the script or in Radio Style mode. */

/* What would you like to display as the title of your radio stream
*/
$station_name = \"My Station\";

/* Special Note: If you would like to give the illusion that the station is running
in real time, you should encode all of your mp3\'s to the same bitrate and enter it
here. This value is passed to a shoutcast server for listing on a yp. this value
is used when the $stream_bitrate filtration feature is not present.
*/
$base_bitrate = \"128\";

/* Stream Frequency: This feature was added as a safety check for the radio style portion.
Most players will find it difficult to bump their frequency during playback so it is
a good idea to keep the frequency consistant. Allowable and recommended settings are
11025, 22050, 44100 and if you want to be different in daring you can also use 12000,
24000, 48000 however these frequencies are not supported by all players,
or you can leave it blank if you just really don\'t care :)
*/
$stream_freq = \"44100\";

/* Stream Bitrate: This feature was added as a safety check for the radio style portion.
Some players may find it difficult to switch bitrates on the fly, unlike players like Winamp
or you may desire to keep a consistant bitrate throughout a stream, set this to any
valid constant bitrate 8, 16, 24, 32, 48, 56, 128, 192 etc etc. Leave blank if you
don\'t care. NOTE: by setting this filter you override the $base_bitrate variable setting.
*/
$stream_bitrate = \"\";

/* Stream Mode: This feature was added as a safety check for the radio style portion.
Most players will find it difficult to change the channel mode from stereo to mono or
vice versa during a stream playback. Set to Stereo to only play stereo files in a stream
or set to Mono to only play mono files in a stream (heh go figure). Leave blank if you wish
not to use this filter, however it is recommended that you do.
*/
$stream_mode = \"Stereo\";

/* This setting tell Mp3 Toolbox whether you want to allow it to shuffle your mp3\'s for
Radio Style playback
*/
$shuffle = \"yes\";

/* This setting allows mp3toolbox to trim what it thinks is silence at the end of a song
this feature is very experimental and mileage may vary depending on the MP3
*/
$silence_eleminator = \"On\";

/* This setting allows you to make the MP3 time become a countdown timer
for the currently playing MP3, really kind of trivial but great for
seeing how much of your mp3 is cut of by the silence eleminator feature.
*/
$time_mode = \'NONE\';

/* The following options really only do anything if you plan on sourcing
a plublic SHOUTcast server with Mp3toolbox. With exceception to the
$url option which can be found in Winamp\'s minibrowser while playing
the stream.
*/

/* Genre you would like to appear in at the SHOUTcast directory
*/
$genre = \"Variety\";

/* Whether to publish to the SHOUTcast directory or not
*/
$publicize = 1;

/* Contact information for YP Directory
*/
$url = \"http://www.radiotoolbox.com/\";

$irc = \"N/A\";

$icq = \"N/A\";

$aim = \"N/A\";


/********************/
/* Playlist Options */
/********************/

/*******************************************************************************
Playlist Logic Scripting
If you are looking to control the output of the radio style a bit more
by adding your own promos between songs or by playing from certain directories
in a particular order you can use this feature NOTE: This feature is disabled
when directory recursing is off.
*******************************************************************************/

/* Enable the Playlist Scripting function here, set to true to turn on or false
for off. Note: This feature is disabled when directory recursing is off.
*/
$playlist_script = false;

/* Due to the nature of running a playlist script it may be neccessary to not repeat
a song within a certain amount of minutes. NOTE: this setting is only applied
when $playlist_script is enabled. Set to 0 if you prefer to not use this feature.
*/
$no_song_repeat_within = 60;

/* Directories that should not follow the $no_song_repeat_within feature. Great for
When you need promos and ads to run but music to follow the no repeat feature.
*/
$noapply_repeat[0] = $source_dir[0].\"/Promos\";


/*******************************************************************************
Place your script here, the proper format for a script is something like this:

$playlist_scr[0] = $source_dir[0]; <-- this will make the first position in the script pull from $source_dir[0] from above (remember that directories are recursive)
$playlist_scr[1] = $source_dir[0].\"/Promo\"; <-- After a song from $playlist_scr[0] is played then a song from this directory is played.
$playlist_scr[2] = \"/home/mp3/ads/\"; <-- The playlist script is not restricted to only the directories listed above, you can use any directory on your file system that is available to php.

For those familiar with php, this is just a simple array of directory paths.
*******************************************************************************/

$playlist_scr[0] = $source_dir[0].\"/MP3\";
$playlist_scr[1] = $source_dir[0].\"/Promos\";

/*******************************************************************************
End Script
*******************************************************************************/

/******************************************************/
/*SHOUTcast-like options, (does not require shoutcast)*/
/******************************************************/

/* Intro File: Just like the good ole SHOUTcast intro file ;)
Be sure that the file follows the filtration criteria above, otherwise it won\'t
Play. Leave Blank or comment out to disable.
*/
#$intro_file = $source_dir[0].\"/intro.mp3\";

/* Intro Title: Place a custom welcome message while the intro file plays. Comment
or leave blank to disable Not quite in shoutcast but hey why not right?
*/
#$intro_msg = \"This is my intro message, welcome\";

/* Meta Interval: Very similar to the MetaInterval in the SHOUTcast Server
This tells the script how often to send title metadata. This also
controls how CPU hungry this script is in NON SHOUTcast source modes. The
lower the number the more cycles that will be consumed the higher the number
the less accurate the title streaming is. This setting also effects Download
and all stream functions. NOTE: You should leave this value
at the default of 8192 unless you are absolutely sure you need to change it.
This value should also be a multiple of 8.
*/
$MetaInterval = 8192;

/* Allow Relay: Another SHOUTcast-like feature, this determines weather shoutcast
servers will be able to use this script as a source.
*/
$AllowRelay = false;

/* Listener Time: Another SHOUTcast-like feature, this feature limits the connection time
for users of the Radio service in minutes. Setting this value to 0 will allow a client to
stay connected for an unlimited amount of time.
*/
$ListenerTimer = 0;


/********************/
/* Advanced Options */
/********************/

/* For Debugging purposes: leave this item set to false or commented
unless you are having issues with Mp3 toolbox, by setting this value
to true or uncommented, you will have mp3 toolbox generate a log of activity
and display certain details of mp3\'s in certain interfaces. It is not
recommended that you run in this mode for daily use.
*/
$debug = false;
?>
All I have changed is the directory of the music. If I change anything else, the errors in the first post occur.

User avatar
Jay
Will work for food (Administrator)
Posts: 2867
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay » Fri Sep 16, 2005 11:48 pm

again what have you changed to cause the error. Using phrases like 'anything else' is too vague and causes me to have to guess.
- Jay

ZimShady
Posts: 4
Joined: Thu Sep 15, 2005 7:59 pm

Post by ZimShady » Sat Sep 17, 2005 1:37 am

well, for example, if i try to change the name of the station, it will cause those errors. if i try to add another section, i will get those errors. variables that the config file says you can change make the file mess up.

User avatar
Jay
Will work for food (Administrator)
Posts: 2867
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay » Sat Sep 17, 2005 1:43 am

well the config file follows all the rules of php, so make sure you don't use quotes improperly or add new lines where there shouldn't be any.

If you work on new section make sure that you are duplicating the code properly and following php's syntax rules.
- Jay

Post Reply