Page 1 of 1

Installation Problems

PostPosted: Tue Mar 08, 2016 8:49 am
by ronluna
after following the guide posted at github "https://github.com/SchedulesDirect/mfdb-json/tree/API-20141201"

I was able to add and link lineup using sd-json into mythtv but I did run into a few problems.

1- sd-utility.php is unable to create schedulesdirect database's tables when running for the first time. I had to manually create 3 tables and the perform sd-utility.php --reset in order to get the script to recreate all the tables from scratch.

2- while searching for lineups (using option #2 sd-utility.php) The script keeps showing this message:
PHP Warning: Invalid argument supplied for foreach() in /home/xxxxx/mfdb-json/sd-utility.php on line 1154

3- the script is unable to set the schema version in the database. I have run the sd-utility.php and add a few listing to my account, linked it to a channel lineup and update it. everything works well ...

Problems start while trying to grab the program information. Here is the output.

./mfdb-json.php

Using production server.
2016-03-08 08:00:27:Checking to see if we're running the latest client.
2016-03-08 08:00:28:mfdb-json.php developer grabber API:20141201 v0.28/2015-12-04
2016-03-08 08:00:28:Temp directory for Schedules is /tmp/mfdb_schedules_1b5XyH
2016-03-08 08:00:28:Temp directory for Programs is /tmp/mfdb_programs_erUjsM
2016-03-08 08:00:28:Using database information from ~/.mythtv/config.xml
2016-03-08 08:00:28:Connecting to Schedules Direct database.
2016-03-08 08:00:28:Connecting to MythTV database.
2016-03-08 08:00:28:FATAL: Schema version mismatch.
2016-03-08 08:00:28:This code is: 3 but the database is
2016-03-08 08:00:28:Did you run the sd-utility.php program yet?


Any ideas how to solve the scheme version situation?

Re: Installation Problems

PostPosted: Tue Mar 08, 2016 10:21 am
by ronluna
To bypass the Fatal error when trying to retrieve the Schema Version that mfdb-json.php was returning. I made the following change:

Ugly hack but it worked

//$dbSchedulesDirectJSONschemaVersion = settingSD("SchedulesDirectJSONschemaVersion");
$dbSchedulesDirectJSONschemaVersion = "3";