Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1

    Title
    Barely A Broadcaster
    Join Date
    Jun 2016
    Location
    Hastings East Sussex
    Posts
    82
    Rep Power
    0

    Unhappy samphp

    i use sam broadcaster i have managed to get html requests working by myself
    but i cant get php requests working iv done everything and still not working all im getting is
    http://urban-radio.co.uk/radio/playing.php

    please help

  2. #2
    James's Avatar
    Title
    Administrator
    Join Date
    Jan 2008
    Location
    Melbourne, Australia
    Posts
    12,182
    Rep Power
    10
    You're getting a 500 error, so the server is encountering an error running the script.
    Could you post some code for us to take a look?

  3. #3

    Title
    Barely A Broadcaster
    Join Date
    Jun 2016
    Location
    Hastings East Sussex
    Posts
    82
    Rep Power
    0
    which code do you want the config or samdb.xml.php

  4. #4
    James's Avatar
    Title
    Administrator
    Join Date
    Jan 2008
    Location
    Melbourne, Australia
    Posts
    12,182
    Rep Power
    10
    playing.php as that's the one showing a 500 error.

  5. #5

    Title
    Barely A Broadcaster
    Join Date
    Jun 2016
    Location
    Hastings East Sussex
    Posts
    82
    Rep Power
    0

    now playing

    PHP Code:
    <? require("config.php");   $db->open("SELECT songlist.*, historylist.listeners as listeners, historylist.requestID as requestID, historylist.date_played as starttime FROM historylist,songlist WHERE (historylist.songID = songlist.ID) AND (songlist.songtype='S') ORDER BY historylist.date_played DESC",6); $history $db->rows(); reset($history);  $db->open("SELECT songlist.*, queuelist.requestID as requestID FROM queuelist, songlist WHERE (queuelist.songID = songlist.ID)  AND (songlist.songtype='S') AND (songlist.artist <> '') ORDER BY queuelist.sortID ASC",2); $queue $db->rows(); reset($queue);   //### Calculate the bezt time to refresh the webpage in order to show new updated song information //==================================================================================================  list($key, $song) = each($history); $listeners = $song["listeners"];
     
    $starttime strtotime($song["date_played"]); $curtime time();  $timeleft $starttime+round($song["duration"]/1000)-$curtime;
      
    //Set refesh interval if($timeleft>0) # 30 second minimum wait   { $timeout = $timeleft;}        # if timeleft is valid, refresh on timeleft (should be end of song) else   { $timeout = 90; }            # otherwise, fall back on 90 second refresh    if(($timeout>180) or ($timeout==0)) $timeout = 180; if($timeout<30) $timeout  = 30;    $refreshURL = "playing.php?buster=".date('dhis').rand(1,1000); //================================================================================================== 
    $pic_cnt 0;function PicName(){ global $pic_cnt; echo "Picture".$pic_cnt; } function NextPicName(){  global $pic_cnt$pic_cnt += 1PicName();} 
    function 
    PutSongRow(&$song) { global $rc$showpic$darkrow$lightrowPrepareSong($song);  $rc++; $bgcolor $darkrow; if(($rc 2)==0$bgcolor $lightrow?>   <tr bgcolor="<? echo $bgcolor?>">   <?if($showpic){?>    <td valign="middle" width="1%"> <? if($song["haspicture"]) {?>            <a href="<? echo $song["buycd"]; ?>" target="_blank"><img id="<? NextPicName(); ?>" onError="PictureFail('<? PicName(); ?>')" width="60" height="60" src="<? echo $song["picture"]; ?>" alt="Buy CD!" border=0></a><?};?>              </td><?}?>    

        <td <?if(!$showpic) echo "colspan=2"?>><font size="2" color="#003366"><small><?       echo $song["combine"];       if($song["requestid"]!=0) { echo " ~requested~ "; }       ?></small></font></td>    <td nowrap width="1%">       <p align="center"><font size="2" color="#003366"><a href="<? echo $song["buycd"]; ?>" target="_blank"><img    src="images/buy.gif" alt="Buy this CD now!" border="0"></a></font>     </td>    <td nowrap width="1%">       <p align="center"><font size="2" color="#003366"><a href="<? echo $song["website"]; ?>" target="_blank"><img    src="images/home.gif" alt="Artist homepage" border="0"></a></font>     </td>        <td nowrap align="center" nowrap width="1%">       <font size="2" color="#003366"><a href="javascript:songinfo(<? echo $song["songid"]; ?>)"><img    src="images/info.gif" alt="Song information" border="0"></a></font>     </td>        <td nowrap><font color="#003366" size="2"><small><? echo $song["album"]; ?></small></font></td>    <td nowrap>       <p align="right"><font color="#003366" size="2"><small><strong><? echo $song["mmss"]; ?></strong></small></font>    </td>  </tr><?}//PutSongRow
    /* ## ===================================================================== ## */
    ?>
    <? 
    require("header.php"); ?>
    <SCRIPT LANGUAGE="JavaScript"><!--- var refreshID = ""; refreshID = setTimeout("DoRefresh()", <? echo ($timeout*1000); ?>); function DoRefresh(){  document.location.href = '<? echo $refreshURL?>';}//---></SCRIPT>
    <?if($listeners>0)echo "There are currently $listeners listeners tuned into this station!<br><br>";?><table border="0" width="98%" cellspacing="0" cellpadding="4">  <tr bgcolor="#002E5B">     <td colspan="2" nowrap align="left">       <p><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><b>Currently Playing</b></font>    </td>    <td colspan="3" nowrap align="center">       <p><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><b>Links</b></font>    </td>    <td nowrap align="left">       <p><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><b>Album</b></font>    </td>    <td nowrap align="Right">       <p><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><b>Time</b></font>    </td>  </tr>
    <?   $rc=0;  PutSongRow($song);   $mainsong $song;?>  
    <? if(count($queue)>0){?><tr bgcolor="<? echo $lightrow?>"><td colspan="7"><b><font size="2" color="#777777">Coming up:</font></b>
    <font size="2" color="003366"><b><? $i=0; while(list($key$song) = each($queue)) {  if(empty($song["artist"]))    $song["artist"] = 'Unknown';     if($i>0) echo ", ";   echo $song["artist"];    if($song["requestid"]!=0)    { echo " ~requested~"; }   $i++;   }?></b></font></td></tr><?}?>
      <tr bgcolor="#002E5B">     <td colspan="7" nowrap>       <p align="left"><b><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF">Recently         played songs</font></b>     </td>  </tr>  <?   $rc=0;  while(list($key$song) = each($history))    PutSongRow($song); ?></table>
    </td><td valign='top' align='center'>
    <?##################### Request Dedication require("dedication.php");#===================   ?>  
    <? ##################### BuyCD image if($mainsong["haspicture"]) require("buycd.php");#=================== ?>
      <? ################### Top 10 requestsif($showtoprequests)   require("top10requests.php");#===================?>         </td>     <? require("footer.php"); ?>
    Last edited by ultra89; 10-31-2017 at 02:29 AM. Reason: adding text

  6. #6

    Title
    Barely A Broadcaster
    Join Date
    Jun 2016
    Location
    Hastings East Sussex
    Posts
    82
    Rep Power
    0
    also do i have to do anything in sams html output config

  7. #7
    James's Avatar
    Title
    Administrator
    Join Date
    Jan 2008
    Location
    Melbourne, Australia
    Posts
    12,182
    Rep Power
    10
    ultra89, you need to really use a code editor. I am not going to spend another half an hour reformatting code for you for free just so I can read it to fix an issue.

    Your code is all on one line and without proper spacing, which makes it hard to read. It's like me typinglikethisitmakesthingsreadllyha
    rdtoreadbecausethereisnotproperspacing
    .


    Please format your code properly and re-post it for me to help you.

  8. #8
    RDJUser's Avatar
    Title
    Avid Broadcaster
    Join Date
    Aug 2012
    Location
    Harpurhey, Manchester UK
    Posts
    143
    Rep Power
    12
    Again I get a feeling you are trying to RUN before you can WALK....

    Your website is badly laid out and you should really learn how to code the basics before you move onto more complicated things like the SAM request system... If you can't get the basics right you have no hope going any further.

    (I get a feeling ports 3306 & 1221 aren't open on your website host/firewall/router end therefore you won't be able to get the web templates for SAM PHP web to work)

    You might want to search the Spacial forums for an answer/solution there's bound to be one already posted in the 15 or so years the forums have been online.

    You really need to grasp the basics before you start demanding for help.


    Proud USER of RadioDJ since 2010

    Online: Twitter - Blog - RadioDJ

  9. #9

    Title
    Barely A Broadcaster
    Join Date
    Jun 2016
    Location
    Hastings East Sussex
    Posts
    82
    Rep Power
    0
    Rite one thing I'm not demanding, I'm asking
    two my ports are open host/router/firewall
    three I'm only asking for help just on that
    code I sent in this forum. I know things aren't free
    and don't even go there about my website, I'm not letting people
    bring me down. Omg so please can you help me out instead of telling me what to do

  10. #10
    shoutcaststreaming's Avatar
    Title
    Premium Member
    Join Date
    Sep 2008
    Location
    Los Angeles, California
    Posts
    784
    Rep Power
    28
    Usually a 500 error is generated if:
    - the permissions of the file(s) are incorrect
    - the ownership of the file(s) are incorrect
    - the files are not in the proper location
    - selinux is enabled and is choking on something

    The error has nothing to do with 3306 and / or 1221 being open.
    SCS - Dedicated Bandwidth Servers
    Shoutcast / Icecast / Windows Media
    Transcoding - Auto DJ - Mobile Radio - FLASH Players - Auto DJ
    Broadcasting World's Stream Host of the Month

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •