Skip to Content
It is currently April 1st, 2020, 10:40 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: January 16th, 2019, 2:43 pm 
Offline
Senior User
Senior User

Joined: May 5th, 2004, 9:06 am
Posts: 94
Location: Tampa, FL
I've tried everything listed here. I was forced by 1and1 web hosting to upgrade to php 7.2 and now I get an Unsupported driver error. Almost ready to quit because I don't know what else to do. I was very happy when this posting I thought my issue would be solved. I'm open to hearing ideas to try

_________________
I am the owner of the internet rock radio station called 106 Rock Radio. Playing active rock music. Please visit my website http://www.106radio.com
Follow the playlist on Twitter https://twitter.com/106radio


Top
 Profile  
Reply with quote  
PostPosted: January 16th, 2019, 4:26 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7941
Location: Aachen (Germany)
Code:
<?php
ini_set('display_errors', 'true');
error_reporting(E_ALL);


Put those 2 lines at the top of any directly callable PHP file (i.e.: web/playing.php)
Then open the site again and look for PHP error/warning/notice messages.

If none appear, the only remaining option is that you're really missing the MySQL(i) extension from your PHP setup.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: January 16th, 2019, 4:37 pm 
Offline
Senior User
Senior User

Joined: May 5th, 2004, 9:06 am
Posts: 94
Location: Tampa, FL
    Code:
    Notice: Undefined variable: children in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 53

    Notice: Undefined offset: 8 in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 31

    Notice: Undefined offset: 9 in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 31

    Notice: Undefined offset: 10 in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 31

    Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 78

    Warning: reset() expects parameter 1 to be array, null given in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 77

    Warning: Variable passed to each() is not an array or object in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 78

    Notice: Undefined variable: leaf in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 122

    Notice: Undefined index: CONFIG in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/Database.php on line 70

    Warning: Variable passed to each() is not an array or object in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 239



    my line 53 of xml reads:
    Code:
    return $children;

    my line 31 of xml reads:
    Code:
    $name = $vals[$i]['tag'];

    my line 78 of xml reads:
    Code:
    while (list($key, $value) = each($data)) {

    my line 77 of xml reads:
    Code:
    reset($data);

    my line 122 of xml reads:
    Code:
    return $leaf;

    my line 70 of database.php reads:
    Code:
    $dbdata = $dbdata["CONFIG"]["DATABASE"];

    my line 239 of xml reads:
    Code:
    while (list($key, $val) = each($data)) {

    _________________
    I am the owner of the internet rock radio station called 106 Rock Radio. Playing active rock music. Please visit my website http://www.106radio.com
    Follow the playlist on Twitter https://twitter.com/106radio


    Top
     Profile  
    Reply with quote  
    PostPosted: January 16th, 2019, 6:21 pm 
    Offline
    SVS Member
    SVS Member

    Joined: December 6th, 2004, 9:00 am
    Posts: 7941
    Location: Aachen (Germany)
    Please also apply the optional changes from here and check again: viewtopic.php?p=219049#p219049
    Also post the contents of your database config file. (Feel free to replace the credentials with placeholders or nonsensical data, I'm not actually interested in connecting to your database, just wanna check if the structure looks ok :D)

    _________________
    Benedikt Bauer - SVS (Spacial Volunteer Support)

    Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

    My Project:
    Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


    Top
     Profile  
    Reply with quote  
    PostPosted: January 16th, 2019, 8:38 pm 
    Offline
    Senior User
    Senior User

    Joined: May 5th, 2004, 9:06 am
    Posts: 94
    Location: Tampa, FL
    config.php
    Code:
    <?php

    // Define path to application directory
    defined('APP_PATH') || define('APP_PATH', realpath(dirname(__FILE__) . '/../'));
    // Ensure common is on include_path
    set_include_path(implode(PATH_SEPARATOR, array(realpath(APP_PATH . '/library'), '.')));
    // Make a shortcut to DIRECTORY_SEPARATOR
    define('DS', DIRECTORY_SEPARATOR);

    /*
    SET TIMEZONE
       date_default_timezone_set('America/New_York')
       If using >= PHP 5.3 uncomment date_default_timezone_set below and set correct timezone
       For correct options see: http://www.php.net/manual/en/timezones.php
    */
    //date_default_timezone_set('America/New_York');

    ## ======================================== ##
    ## Station general details               ##
    ## ======================================== ##
    define('STATION_NAME', '106 Rock Radio');
    define('STATION_EMAIL', 'xxx@xxxx.com'); //Leave blank if you do not wish to publish your email address!
    define('STATION_LOGO', 'images/106radio_rock-n-roll.png');

    /*
    STATION_ID
       Your SpacialNet station ID.
       Log into your SpacialNet broadcaster account and go to "My Stations" to get this ID.
       This is required to make the listen links on the website to work.
       Follow these steps to set up your station: http://support.spacialaudio.com/wiki/Listing_on_Audiorealm
    */
    define('STATION_ID', 00000);


    ## ============================================================ ##
    ## General options                                    ##
    ## ============================================================ ##


    /*
    ALLOW_REQUESTS
       If true, requests are allowed to be made to SAM.
       If false, all request related links will be hidden.
     */
    define('ALLOW_REQUESTS', true);

    /*
    PRIVATE_REQUESTS
       If true, your own web server will handle song requests.
       If false, AudioRealm.com will handle the request.
     */
    define('PRIVATE_REQUESTS', true);

    /*
    SHOW_TOP_REQUESTS
       If true, display the top requests
     */
    define('SHOW_TOP_REQUESTS',   true);

    /*
    TOP_COUNT
       The number of top requests to display
     */
    define('TOP_REQUEST_COUNT',   10);

    /*
    REQUEST_DAYS
       Show the top requests for the last xx days
     */
    define('REQUEST_DAYS', 30);

    /*
    SAM_HOST
       The internet IP address of the machine SAM is running on.
       DO NOT use a local IP address like 127.0.0.1 or 192.x.x.x (UNLESS your webserver is on the same local network as SAM)
       Not sure what your IP address is?
       Try http://www.ipchicken.com or http://www.whatismyip.com
       If your IP address changes regularly, rather use DNS to make the "name" static.
       See http://www.no-ip.com and http://www.dyndns.com/
    */
    define('SAM_HOST', 'xx.xxx.xxx.xx');

    /*
    SAM_PORT
       The port SAM handles HTTP requests on. Usually 1221.
       If you are behind a router you may need to implement "port forwarding" to make SAM visible.
       For more information on port forwarding see:
         http://en.wikipedia.org/wiki/Port_forwarding
         http://portforward.com/
     */
    define('SAM_PORT', 1221);

    /*
    SHOW_PICTURES
       Must we show album cover pictures in now playing section?
       For this to work you must
       a) Associate the album cover pictures with the tracks using the Song Information Editor in SAM.
          The Amazon lookup really makes this an easy process.
       b) Upload these album pictures to your webserver.
          By default SAM stores the pictures in the directory specified in SAM->Config->General under "Local Picture Directory"
       c) SAM can upload album cover pictures using FTP. See
         * SAM->Config->HTML Ouput to set up FTP details
         * and SAM->Menu->General->HTML Output->Upload all pictures
     */
    define('SHOW_PICTURES', true);

    /*
    PICTURE_URL
       Location where all your album pictures are stored.
       Example Relative path: pictures/
       Example Absolute path: http://your.webserver.com/pictures/
     */
    define('PICTURE_URL', '/sam/web/pictures/');

    /*
    PICTURE_NA
       Use this picture if the song has no picture.
       To disable the use of a default picture set value to empty string.
     */
    define('PICTURE_URL_NA', PICTURE_URL.'na.png');

    /*
    HISTORY_COUNT
       The number of history items to display on the playing page
     */
    define('HISTORY_COUNT',   5);

    /*
    COMING_UP_COUNT
       The number of coming soon songs to display.
       Set to zero to disable coming up section.
     */
    define('COMING_UP_COUNT', 2);

    /*
    CHECK_INTERVAL
       How regularly do you want to check for a song change event in order to refresh the "Now playing" page data.
       Set to zero to disable checks for song change.
       Default settings is every 30 seconds.
       We do not recommend a setting lower than 10 seconds (10000) or higher than 3 minutes (180000).
    */
    define('CHECK_INTERVAL', 10000);

    ## ============================================================ ##

    // The Singleton Database class
    require_once('Common/Database.php');

    // Create a connection to the database from config file
    $db = Database::getInstance(APP_PATH.DS.'config'.DS.'dbconfig.xml.php');

    // Verify the config settings above
    require_once('config.verify.php');


    dbconfig.xml.php
    Code:
    <?php/*
    <CONFIG application="SAM" version="2014.5">
       <Database>
          <Driver>MYSQL</Driver>
          <Host>xx.xxx.xxx.xx</Host>
          <Port>3306</Port>
          <Database>SAMDB</Database>
          <Username>USER</Username>
          <Password>P@ssw0rd</Password>
       </Database>
    </CONFIG>

     */?>

    _________________
    I am the owner of the internet rock radio station called 106 Rock Radio. Playing active rock music. Please visit my website http://www.106radio.com
    Follow the playlist on Twitter https://twitter.com/106radio


    Top
     Profile  
    Reply with quote  
    PostPosted: January 17th, 2019, 5:13 am 
    Offline
    SVS Member
    SVS Member

    Joined: December 6th, 2004, 9:00 am
    Posts: 7941
    Location: Aachen (Germany)
    Did you apply the optional changes and what are the new error messages if any?

    _________________
    Benedikt Bauer - SVS (Spacial Volunteer Support)

    Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

    My Project:
    Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


    Top
     Profile  
    Reply with quote  
    PostPosted: January 17th, 2019, 6:33 am 
    Offline
    Senior User
    Senior User

    Joined: May 5th, 2004, 9:06 am
    Posts: 94
    Location: Tampa, FL
    just in case I missed one line or something like that, I went through and rechecked each line. Then I checked for errors:
    errors list:
    Notice: Only variables should be passed by reference in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 26

    Notice: Undefined index: CONFIG in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/Database.php on line 70

    Warning: Invalid argument supplied for foreach() in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 239

    library/Common/xml.php on line 26:
    Code:
    $siblings = GetChildren($vals, ++$i);


    library/Common/Database.php on line 70:
    Code:
    $dbdata = $dbdata["CONFIG"]["DATABASE"];


    library/Common/xml.php on line 239:
    Code:
    foreach ($data as $key => $value) {

    _________________
    I am the owner of the internet rock radio station called 106 Rock Radio. Playing active rock music. Please visit my website http://www.106radio.com
    Follow the playlist on Twitter https://twitter.com/106radio


    Top
     Profile  
    Reply with quote  
    PostPosted: January 17th, 2019, 10:46 am 
    Offline
    SVS Member
    SVS Member

    Joined: December 6th, 2004, 9:00 am
    Posts: 7941
    Location: Aachen (Germany)
    You obviously missed one of the mandatory changes for PHP 7.2 compatibility.

    Modify the XML parsing code to no longer inline-modify a value that is passed by reference.
    Change library/common/xml.php (Line 25) from:
    Code:
                    $siblings = GetChildren($vals, ++$i); 

    To:
    Code:
                    $i = $i + 1;
                    $siblings = GetChildren($vals, $i); 

    _________________
    Benedikt Bauer - SVS (Spacial Volunteer Support)

    Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

    My Project:
    Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


    Top
     Profile  
    Reply with quote  
    PostPosted: January 17th, 2019, 1:08 pm 
    Offline
    Senior User
    Senior User

    Joined: May 5th, 2004, 9:06 am
    Posts: 94
    Location: Tampa, FL
    Well I have to say you were correct. I messed up and missed one. Now I get an error of
    it repeats 6 times
    Notice: Undefined variable: val in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 240


    Oops! Something went wrong...
    Connection timed out

    Line 240 reads:
    Code:
    if (is_array($val)) {


    I change line 240 to say
    Code:
    if (!is_array($data)) {


    I don't get any errors but the connection times out
    Oops! Something went wrong...
    Connection timed out

    _________________
    I am the owner of the internet rock radio station called 106 Rock Radio. Playing active rock music. Please visit my website http://www.106radio.com
    Follow the playlist on Twitter https://twitter.com/106radio


    Top
     Profile  
    Reply with quote  
    PostPosted: January 17th, 2019, 4:21 pm 
    Offline
    SVS Member
    SVS Member

    Joined: December 6th, 2004, 9:00 am
    Posts: 7941
    Location: Aachen (Germany)
    In web/playing.php around line 15 enter the var_dump line:
    Code:
    } catch (Exception $ex) {
       // The error page will be displayed if anything goes wrong above
       var_dump($ex);
       $message = $ex->getMessage();
       require_once('../display/display.error.php');
    }


    Also in library/Database.php around line 69 add 2 more debug outputs so we can see if there's a problem with the XML data or with the XML parsing:
    Code:
    echo $dbdata;
          $dbdata = XML2Arr($dbdata);
    var_dump($dbdata);
          $dbdata = $dbdata["CONFIG"]["DATABASE"];

    That SHOULD get you more info about what's the problem.

    Negating the is_array check doesn't make any sense. If the value is not an array the next line doesn't work.

    _________________
    Benedikt Bauer - SVS (Spacial Volunteer Support)

    Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

    My Project:
    Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


    Top
     Profile  
    Reply with quote  
    PostPosted: January 17th, 2019, 4:47 pm 
    Offline
    Senior User
    Senior User

    Joined: May 5th, 2004, 9:06 am
    Posts: 94
    Location: Tampa, FL
    doing that made it real mad lol
    Here what I got and also getting Error: Unsupported driver again


    Notice: Undefined variable: children in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 53

    Notice: Undefined offset: 8 in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 31

    Notice: Undefined offset: 9 in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 31

    Notice: Undefined offset: 10 in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 31

    Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 78

    Warning: reset() expects parameter 1 to be array, null given in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 77

    Warning: Variable passed to each() is not an array or object in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 78

    Notice: Undefined variable: leaf in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 122

    Notice: Undefined index: CONFIG in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/Database.php on line 71

    Warning: Variable passed to each() is not an array or object in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 239

    Notice: Undefined variable: children in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 53

    Warning: reset() expects parameter 1 to be array, null given in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 77

    Warning: Variable passed to each() is not an array or object in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 78

    Notice: Undefined variable: leaf in /homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/xml.php on line 122
    NULL object(Exception)#1 (7) { ["message":protected]=> string(97) "Error: Unsupported driver:
    SAM currently supports:
    Firebird
    ADO
    MSSQL
    " ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(83) "/homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/Database.php" ["line":protected]=> int(89) ["trace":"Exception":private]=> array(3) { [0]=> array(6) { ["file"]=> string(83) "/homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/library/Common/Database.php" ["line"]=> int(41) ["function"]=> string(17) "InitFromXMLConfig" ["class"]=> string(8) "Database" ["type"]=> string(2) "::" ["args"]=> array(1) { [0]=> string(79) "/homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/config/dbconfig.xml.php" } } [1]=> array(6) { ["file"]=> string(73) "/homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/config/config.php" ["line"]=> int(150) ["function"]=> string(11) "getInstance" ["class"]=> string(8) "Database" ["type"]=> string(2) "::" ["args"]=> array(1) { [0]=> string(79) "/homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/config/dbconfig.xml.php" } } [2]=> array(4) { ["file"]=> string(71) "/homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/web/playing.php" ["line"]=> int(8) ["args"]=> array(1) { [0]=> string(73) "/homepages/31/d296336864/htdocs/Web_WP-106RockRadio/sam/config/config.php" } ["function"]=> string(12) "require_once" } } ["previous":"Exception":private]=> NULL }

    _________________
    I am the owner of the internet rock radio station called 106 Rock Radio. Playing active rock music. Please visit my website http://www.106radio.com
    Follow the playlist on Twitter https://twitter.com/106radio


    Top
     Profile  
    Reply with quote  
    PostPosted: January 18th, 2019, 4:52 am 
    Offline
    SVS Member
    SVS Member

    Joined: December 6th, 2004, 9:00 am
    Posts: 7941
    Location: Aachen (Germany)
    This looks like a lot of problems at once.
    There should be no each() left once you applied the optional changes.
    I think we're driving in circles right now.

    I've attached my working copy of the SAM templates with all the optional fixes already applied.
    Maybe try starting from scratch with that one.


    Attachments:
    sambc.zip [280.05 KiB]
    Downloaded 91 times

    _________________
    Benedikt Bauer - SVS (Spacial Volunteer Support)

    Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

    My Project:
    Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode
    Top
     Profile  
    Reply with quote  
    PostPosted: January 18th, 2019, 8:35 am 
    Offline
    Senior User
    Senior User

    Joined: May 5th, 2004, 9:06 am
    Posts: 94
    Location: Tampa, FL
    7:55 AM Today I dumped my entire website and uploaded your sambc files added my info and I get the same driver error. I gave up.
    1:49 PM i found an extra letter in my password in the dbconfig.xml file. The easiest, smallest thing .... that's my luck ...might have it solved ... Thanks!

    _________________
    I am the owner of the internet rock radio station called 106 Rock Radio. Playing active rock music. Please visit my website http://www.106radio.com
    Follow the playlist on Twitter https://twitter.com/106radio


    Top
     Profile  
    Reply with quote  
    PostPosted: January 18th, 2019, 1:59 pm 
    Offline
    SVS Member
    SVS Member

    Joined: December 6th, 2004, 9:00 am
    Posts: 7941
    Location: Aachen (Germany)
    Code:
    Oops! Something went wrong...
    Connection timed out

    This message might be caused by a bad password.
    The unsupported driver is only gonna show up if you create an invalid XML document by putting some problematic special character into the password or when there are problems with the source code or when you really don't have the right PHP extension installed and enabled.
    This message will never show up for a bad password error, though.

    _________________
    Benedikt Bauer - SVS (Spacial Volunteer Support)

    Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

    My Project:
    Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


    Top
     Profile  
    Reply with quote  
    PostPosted: January 18th, 2019, 2:54 pm 
    Offline
    Senior User
    Senior User

    Joined: May 5th, 2004, 9:06 am
    Posts: 94
    Location: Tampa, FL
    i was using a wordpress theme that was not php 7 compatible. I still need to do some fixes but for now I have a temporary website up and running. Thanks for helping

    _________________
    I am the owner of the internet rock radio station called 106 Rock Radio. Playing active rock music. Please visit my website http://www.106radio.com
    Follow the playlist on Twitter https://twitter.com/106radio


    Top
     Profile  
    Reply with quote  
    Display posts from previous:  Sort by  
    Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3  Next

    All times are UTC - 6 hours [ DST ]


    Who is online

    Users browsing this forum: No registered users and 6 guests


    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum

    Search for:
    Jump to:  
    Powered by phpBB® Forum Software © phpBB Group