Sermon Browser Plugin for WordPress - Forum: Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/ Simple:Press Version 6.5.1 Wilma Feather on How to override PHP settings in hosted environment? http://www.sermonbrowser.com/forum/sermon-browser-support/how-to-override-php-settings-in-hosted-environment/#p22142 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/how-to-override-php-settings-in-hosted-environment/#p22142 A php.ini in /wp-admin with these two lines increases upload size for me on 1and1

upload_max_filesize = 24M
post_max_size = 24M

I need both lines to accommodate long sermons and large images.

]]>
Wed, 11 Feb 2015 18:28:08 +0000
Extrafino on Server Migration gone bad... http://www.sermonbrowser.com/forum/sermon-browser-support/server-migration-gone-bad/#p22141 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/server-migration-gone-bad/#p22141 If the php-Version of your current server is above 5.5, you will need to replace or remove the mysql_real_escape_string function.

See this forum for details

]]>
Mon, 02 Feb 2015 15:09:36 +0000
amavarick on Fatal error on sermon page? http://www.sermonbrowser.com/forum/sermon-browser-support/fatal-error-on-sermon-page/#p22140 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/fatal-error-on-sermon-page/#p22140 I am experiencing the same thing except mine did not go away. I have disabled all plugins except for sermon browser. Google searching the error brings many results of websites returning the same error.

]]>
Mon, 02 Feb 2015 05:45:47 +0000
Travis Augustine on Server Migration gone bad... http://www.sermonbrowser.com/forum/sermon-browser-support/server-migration-gone-bad/#p22139 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/server-migration-gone-bad/#p22139 Good Morning Everyone,

I just moved our church's website to a new host and as expected things broken (bound to happen I know). One of the things that did not handle the transfer well was Sermon browser.

As of right now, the flash player, that used to show up when browsing to one of the sermons is not showing up and when I try to upload a new sermon I get the following errors:

Warning: mysql_real_escape_string(): Access denied for user 'wesleyum'@'localhost' (using password: NO) in /home/wesleyum/public_html/wp-content/plugins/sermon-browser/sb-includes/admin.php on line 2233

Warning: mysql_real_escape_string(): A link to the server could not be established in /home/wesleyum/public_html/wp-content/plugins/sermon-browser/sb-includes/admin.php on line 2233

Warning: mysql_real_escape_string(): Access denied for user 'wesleyum'@'localhost' (using password: NO) in /home/wesleyum/public_html/wp-content/plugins/sermon-browser/sb-includes/admin.php on line 2233

Warning: mysql_real_escape_string(): A link to the server could not be established in /home/wesleyum/public_html/wp-content/plugins/sermon-browser/sb-includes/admin.php on line 2233

Warning: mysql_real_escape_string(): Access denied for user 'wesleyum'@'localhost' (using password: NO) in /home/wesleyum/public_html/wp-content/plugins/sermon-browser/sb-includes/admin.php on line 2240

Warning: mysql_real_escape_string(): A link to the server could not be established in /home/wesleyum/public_html/wp-content/plugins/sermon-browser/sb-includes/admin.php on line 2240

I'm pretty sure its either a permissions error, or something wrong with the database.

I would appreciate any help that you could provide.

Thank you very much,

Travis

]]>
Sun, 01 Feb 2015 14:14:28 +0000
Kenna on iTunes not accepting podcast feed http://www.sermonbrowser.com/forum/sermon-browser-support/itunes-not-accepting-podcast-feed/#p22138 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/itunes-not-accepting-podcast-feed/#p22138 Unfortunately this podcast has still not been indexed by iTunes and does not appear on their store. We have been in contact with iTunes to ask what the problem is and it seems that there are two problems… the first one was an easy fix, the second I don’t know how to fix…

1. The podcast feed link and audio file names have spaces in them (fixed)
2. The iTunes response tells me that the direct link to the audio file does not work. It’s true! I pulled the direct link from the podcast feed to one of the audio files and it takes me to the websites audio blog page, not directly to the audio file. Here’s an example: http://www.followchurch.com.au.....anuary.mp3 if you go here you don’t go directly to the audio file. The audio file link is actually here: http://www.followchurch.com.au.....anuary.mp3 so why is Sermon browser generating a feed that includes a link to a page on the website rather than linking to the file?

I went searching in the plugin options and I can see these settings, not sure if I need to change something here?
Upload folder: wp-content/uploads/sermons/
http://www.followchurch.com.au.....s/?podcast
Private podcast feed: http://www.followchurch.com.au.....s/?podcast
MP3 shortcode: Default:

Any help would be appreciated, I’m getting pretty desperate to find a fix for this. Thanks.

]]>
Thu, 29 Jan 2015 23:01:44 +0000
Extrafino on How to override PHP settings in hosted environment? http://www.sermonbrowser.com/forum/sermon-browser-support/how-to-override-php-settings-in-hosted-environment/#p22137 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/how-to-override-php-settings-in-hosted-environment/#p22137 I think you are asking in the wrong forum again. You should contact your hoster directly or read through your hoster's FAQ.

PHP can be run in a variety of ways and if your hoster does not allow you to change your settings, you will not be able to do it in any other way but asking.

On my hoster I have to upload a complete php.ini with all settings and not just the settings I want to change, but that really depends.

]]>
Thu, 29 Jan 2015 18:44:04 +0000
DaiBo on How to override PHP settings in hosted environment? http://www.sermonbrowser.com/forum/sermon-browser-support/how-to-override-php-settings-in-hosted-environment/#p22136 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/how-to-override-php-settings-in-hosted-environment/#p22136 ** I posted this topic on wordpress.org and I am reposting here because this forum seems to be more active.

I have a multisite installation in a hosted environment.

I need to increase the max file upload size to the following (suggested by the Sermon Browser FAQ):

file_uploads = On
upload_max_filesize = 15M
post_max_size = 15M
max_execution_time = 600
max_input_time = 600
memory_limit = 48M

My restrictions:
1. The only access I have to the file system is through FTP.
2. The path structure in FTP is: /wordpress/wp-admin/ I don't have access to files above the FTP root level.
3. I don't have access to the system's php.ini file.
4. The system is running on Windows IIS.
5. The PHP version is 5.2.x.

What can I do to override these settings? I tried putting these settings into a php5.ini file in a few folders from FTP root to wp-admin, and when I opened up the wordpress site on the browser, the only thing I got is the line:
"Your PHP installation appears to be missing the MySQL extension which is required by WordPress."

All I want to do is to override the few settings listed above without changing any other configuration.

Please let me know what I need to do.

]]>
Thu, 29 Jan 2015 17:15:28 +0000
Extrafino on iTunes not accepting podcast feed http://www.sermonbrowser.com/forum/sermon-browser-support/itunes-not-accepting-podcast-feed/#p22135 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/itunes-not-accepting-podcast-feed/#p22135 Hmm... it seems the url of your site is missing in the guid part. I just have not figured out why...

Did you change any other files?

It looks like sb_display_url is putting out nothing. This function is in sermon.php in the main directory of SermonBrowser.

]]>
Thu, 29 Jan 2015 15:09:32 +0000
Extrafino on Sermon Browser Not Uploading Typed in URL For Sermons http://www.sermonbrowser.com/forum/sermon-browser-support/sermon-browser-not-uploading-typed-in-url-for-sermons/#p22134 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/sermon-browser-not-uploading-typed-in-url-for-sermons/#p22134 Regarding your question

If the "function mysql_real_escape_string, everything passing through this function will return without a value", why does everything save except the typed in URL?

Because the programming looks like this: $sname = mysql_real_escape_string($_POST['sname']);

So only the name is put through this function and not the other values, because they require no user input.

Regarding

Where did you do/put this, "$wpdb->prepare to protect from SQL attacks"?

I removed all occuences of mysql_real_escape_string and used $wpdb->prepare everywhere where data is saved to the database. That means anywhere you find $wpdb->query("INSERT INTO 

]]>
Thu, 29 Jan 2015 14:57:34 +0000
martint@cfl.rr.com on No Sermons displaying at all in Wordpress 4.1 http://www.sermonbrowser.com/forum/sermon-browser-support/no-sermons-displaying-at-all-in-wordpress-4-1/#p22133 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/no-sermons-displaying-at-all-in-wordpress-4-1/#p22133 Hello all,

I'm not sure when this began as I don't load the sermons, just service the web site. Tonight I went to fix another small issue un-related to SB and noticed that none of our sermons were showing up. Not in the Widgets, not in the Sermon browser pages or anywhere. They are embedded from youtube.com in SB and the widgets. We also post the audio and PDF files from the sermons and they all show but no Sermons. We are running WP 4.1 php 5.5 (tried many different versions of php) and I've also tried the ajax.php edit that someone had posted was causing issues with Series not showing (Removing the line "mysql_real_escape_string"). All to no avail, I still can't figure out what has gone wrong. Any help would be deeply appreciated... the site is http://www.sbcorlando.com

Blessings,

Tom

]]>
Thu, 29 Jan 2015 05:06:30 +0000
Kenna on iTunes not accepting podcast feed http://www.sermonbrowser.com/forum/sermon-browser-support/itunes-not-accepting-podcast-feed/#p22132 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/itunes-not-accepting-podcast-feed/#p22132 Ok sure here is my entire podcast.php code. Thanks for your help!

 

<?php
//Prints ISO date for podcast
function sb_print_iso_date($sermon) {
if (is_object($sermon)) {
echo date('D, d M Y H:i:s O', strtotime($sermon->datetime));
} else
echo date('D, d M Y H:i:s O', strtotime($sermon));
}

//Prints size of file
function sb_media_size($media_name, $media_type) {
if ($media_type == 'URLs') {
if(ini_get('allow_url_fopen')) {
$headers = array_change_key_case(@get_headers($media_name, 1),CASE_LOWER);
$filesize = $headers['content-length'];
if ($filesize)
return "length=\"{$filesize}\"";
}
} else
return 'length="'.@filesize(SB_ABSPATH.sb_get_option('upload_dir').$media_name).'"';
}

//Returns duration of .mp3 file
function sb_mp3_duration($media_name, $media_type) {
global $wpdb;
if (strtolower(substr($media_name, -3)) == 'mp3' && $media_type == 'Files') {
$duration = $wpdb->get_var("SELECT duration FROM {$wpdb->prefix}sb_stuff WHERE type = 'file' AND name = '".esc_sql($media_name)."'");
if ($duration)
return $duration;
else {
if ( ! class_exists( 'getID3' ) ) {
if ( version_compare(get_bloginfo('version'), '3.6', '<') )
require(SB_INCLUDES_DIR.'/getid3/getid3.php');
else
require( ABSPATH . WPINC . '/ID3/getid3.php' );
}
$getID3 = new getID3;
$MediaFileInfo = $getID3->analyze(SB_ABSPATH.sb_get_option('upload_dir').$media_name);
$duration = isset($MediaFileInfo['playtime_string']) ? $MediaFileInfo['playtime_string'] : '';
$wpdb->query("UPDATE {$wpdb->prefix}sb_stuff SET duration = '".esc_sql($duration)."' WHERE type = 'file' AND name = '".esc_sql($media_name)."'");
return $duration;
}
}
}

//Replaces & with &amp;
function sb_xml_entity_encode ($string) {
$string = str_replace('&amp;amp;', '&amp;', str_replace('&', '&amp;', $string));
$string = str_replace('"', '&quot;', $string);
$string = str_replace("'", '&apos;', $string);
$string = str_replace('<', '&lt;', $string);
$string = str_replace('>', '&gt;', $string);
return $string;
}

// Convert filename to URL, perhaps with stats
// Stats have to be turned off for iTunes compatibility
function sb_podcast_file_url($media_name, $media_type) {
$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
if (stripos($user_agent, 'itunes') !== FALSE | stripos($user_agent, 'FeedBurner') !== FALSE)
$stats = FALSE;
else
$stats = TRUE;
if ($media_type == 'URLs') {
if ($stats)
$media_name=sb_display_url().sb_query_char().'show&amp;url='.rawurlencode($media_name);
} else {
if (!$stats)
$media_name=trailingslashit(site_url()).ltrim(sb_get_option('upload_dir'), '/').rawurlencode($media_name);
else
$media_name=sb_display_url().sb_query_char().'show&amp;file_name='.rawurlencode($media_name);
}
return sb_xml_entity_encode($media_name);
}

// Returns correct MIME type
function sb_mime_type($media_name) {
require (SB_INCLUDES_DIR.'/filetypes.php');
$extension = strtolower(substr($media_name, strrpos($media_name, '.') + 1));
if (array_key_exists ($extension, $filetypes))
return ' type="'.$filetypes[$extension]['content-type'].'"';
}

$sermons = sb_get_sermons(
array(
'title' => isset($_REQUEST['title']) ? stripslashes($_REQUEST['title']) : '',
'preacher' => isset($_REQUEST['preacher']) ? $_REQUEST['preacher'] : '',
'date' => isset($_REQUEST['date']) ? $_REQUEST['date'] : '',
'enddate' => isset($_REQUEST['enddate']) ? $_REQUEST['enddate'] : '',
'series' => isset($_REQUEST['series']) ? $_REQUEST['series'] : '',
'service' => isset($_REQUEST['service']) ? $_REQUEST['service'] : '',
'book' => isset($_REQUEST['book']) ? stripslashes($_REQUEST['book']) : '',
'tag' => isset($_REQUEST['stag']) ? stripslashes($_REQUEST['stag']) : '',
),
array(
'by' => 'm.datetime',
'dir' => 'desc',
),
1,
1000000
);

if (function_exists('wp_timezone_override_offset'))
wp_timezone_override_offset();

header('Content-Type: application/rss+xml');
echo '<?xml version="1.0" encoding="UTF-8"?>'."
";
?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="<?php echo sb_xml_entity_encode(sb_get_option('podcast_url')) ?>" rel="self" type="application/rss+xml" />
<title>Follow Church Podcast</title>
<itunes:author>Luke Williams</itunes:author>
<itunes:summary>Follow Church - Level 1 of the Toomah Community Centre in Lakeside Square, Pakenham, Victoria</itunes:summary>
<description>Follow Baptist Church Australia. Matthew 16:24: “Then Jesus said to His disciples, If anyone would come after me, he must deny himself and take up his cross and follow me”.</description>
<link><?php echo sb_xml_entity_encode(site_url()) ?></link>
<language>en-us</language>
<copyright>© 2015 Follow Church</copyright>
<itunes:explicit>no</itunes:explicit>
<itunes:owner>
<itunes:name>Pastor Luke Williams - Follow Church</itunes:name>
<itunes:email>lukew@followchurch.com.au</itunes:email>
</itunes:owner>
<itunes:image href="http://www.followchurch.com.au/follow-church-logo.jpg" />

<lastBuildDate><?php sb_print_iso_date(isset($sermons[0]) ? $sermons[0]: time()) ?></lastBuildDate>
<pubDate><?php sb_print_iso_date(isset($sermons[0]) ? $sermons[0]: time()) ?></pubDate>
<generator>Wordpress Sermon Browser plugin <?php echo SB_CURRENT_VERSION ?> (https://www.sermonbrowser.com/)</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs&gt;
<category>Religion &amp; Spirituality</category>
<itunes:category text="Religion &amp; Spirituality"></itunes:category>
<?php
$mp3count = 0;
$accepted_extensions = array ('mp3', 'm4a', 'mp4', 'm4v','mov', 'wma', 'wmv');
foreach ($sermons as $sermon) {
if ($mp3count > 15)
break;
$media = sb_get_stuff($sermon);
if (is_array($media['Files']) | is_array($media['URLs'])) {
foreach ($media as $media_type => $media_names)
if (is_array($media_names) && $media_type != 'Code')
foreach ((array)$media_names as $media_name)
if (in_array(strtolower(substr($media_name, -3)), $accepted_extensions)) {
$mp3count++;
?>
<item>
<guid><?php echo sb_podcast_file_url($media_name, $media_type) ?></guid>
<title>Follow Church Podcast</title>
<link><?php echo sb_display_url().sb_query_char().'sermon_id='.$sermon->id ?></link>
<itunes:author><?php echo sb_xml_entity_encode(stripslashes($sermon->preacher)) ?></itunes:author>
<?php if ($sermon->description) { ?>
<description><![CDATA[<?php echo stripslashes($sermon->description) ?>]]></description>
<itunes:summary><![CDATA[<?php echo stripslashes($sermon->description) ?>]]></itunes:summary>
<?php } ?>
<enclosure url="<?php echo sb_podcast_file_url($media_name, $media_type).'" '.sb_media_size($media_name, $media_type).sb_mime_type($media_name); ?> />
<?php $duration = sb_mp3_duration($media_name, $media_type);
if ($duration) { ?>
<itunes:duration><?php echo $duration ?></itunes:duration>
<?php } ?>
<category><?php echo sb_xml_entity_encode(stripslashes($sermon->service)) ?></category>
<pubDate><?php sb_print_iso_date($sermon) ?></pubDate>
</item>
<?php
}
}
}
?>
</channel>
</rss>
<?php die(); ?>

]]>
Thu, 29 Jan 2015 03:29:02 +0000
jacobske@msn.com on Sermon Browser Not Uploading Typed in URL For Sermons http://www.sermonbrowser.com/forum/sermon-browser-support/sermon-browser-not-uploading-typed-in-url-for-sermons/#p22131 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/sermon-browser-not-uploading-typed-in-url-for-sermons/#p22131 Extrafino...from your link, "It seems it is the same problem I (you) already had.  I am (you are) using a PHP Version which does not support the function mysql_real_escape_string, everything passing through this function will return without a value.  I (you) had to remove 8 occurences in sermon-browser/sb-includes/ajax.php and use  $wpdb->prepare to protect from SQL attacks.

So it will now look like this

$ssname = $_POST['ssname'];

After this, everything works again."

Two questions:

1 - Where did you do/put this, "$wpdb->prepare to protect from SQL attacks"?

2 - If the "function mysql_real_escape_string, everything passing through this function will return without a value", why does everything save except the typed in URL?

Thanks for the help!

Kip

]]>
Wed, 28 Jan 2015 23:35:42 +0000
Extrafino on Sermon Browser Not Uploading Typed in URL For Sermons http://www.sermonbrowser.com/forum/sermon-browser-support/sermon-browser-not-uploading-typed-in-url-for-sermons/#p22130 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/sermon-browser-not-uploading-typed-in-url-for-sermons/#p22130 Try what I did here... I think you have the same problem and your filename is empty after save

https://www.sermonbrowser.com/f.....es-broken/

]]>
Wed, 28 Jan 2015 23:14:31 +0000
jacobske@msn.com on Sermon Browser Not Uploading Typed in URL For Sermons http://www.sermonbrowser.com/forum/sermon-browser-support/sermon-browser-not-uploading-typed-in-url-for-sermons/#p22129 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/sermon-browser-not-uploading-typed-in-url-for-sermons/#p22129 Thanks for responding.

Version is php 5.5.20.

I can manually update the url name in the _sb_stuff part of the database and it appears/works correctly.  Unfortunately for some reason I cannot get the url to save when I add a new sermon or edit an older sermon.

Kip

]]>
Wed, 28 Jan 2015 22:09:26 +0000
Extrafino on Sermon Browser Not Uploading Typed in URL For Sermons http://www.sermonbrowser.com/forum/sermon-browser-support/sermon-browser-not-uploading-typed-in-url-for-sermons/#p22128 Sermon Browser Support http://www.sermonbrowser.com/forum/sermon-browser-support/sermon-browser-not-uploading-typed-in-url-for-sermons/#p22128 What version of PHP is your webspace running?

And, if you go and check inside your database, do you see any changes?

]]>
Wed, 28 Jan 2015 19:20:43 +0000