midi_karl
Forum Replies Created
-
Hello Matteo,
Modifying the coding as a work-around is incommodious when updating the plug-in and not good practise.
As it is good and common hosting practise to separate program files from data files, I suggest you to offer the above modification or an equivalent solution in the settings of your plug-in.Regards
Karlhave you read my last answer in my post, maybe youur wordpress is located in a subdirectory… i proposed a workaround, maybe it’ll do the job for you
Hi Matteo,
My web-master told me that the problem arises, if the home directory of the domain is not the same as the root directory of the wordpress installation.
In my case the domain karl-westermann.org has the home directory ‘/karl_westermann’ and within this the root directory of the wordpress installation is ‘/karl_westermann/wordpress’.As a workaround my webmaster modified the plug-in coding of ‘map_downloads.php’ as follows:
<?php
/**
* Download file.
*/$wpHomeDir = ‘/karl_westermann’;
/* Check if there is the cookie that allow the download */
if(!isset($_COOKIE[“mapdownload”]) || $_COOKIE[“mapdownload”] !== “true”)
die ($_COOKIE[“mapdownload”].’ <b>Something goes wrong, you don\’t have permission to use this page, sorry.</b>’) ;unset($_COOKIE[‘mapdownload’]);
setcookie(‘mapdownload’, ‘false’, time() – 3600, ‘/’);$file_name = $_GET[“filename”];
$file_url = $_GET[“fileurl”];
$file_url = str_replace(” “, “%20”, $file_url);$web_root = $_SERVER[“DOCUMENT_ROOT”];
$web_address = $_SERVER[‘HTTP_HOST’];$pos = strrpos($file_url, $web_address);
if($pos){
if (isset($_SERVER[‘HTTPS’]) &&
($_SERVER[‘HTTPS’] == ‘on’ || $_SERVER[‘HTTPS’] == 1) ||
isset($_SERVER[‘HTTP_X_FORWARDED_PROTO’]) &&
$_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’) {
$protocol = ‘https://’;
}
else {
$protocol = ‘https://’;
}$file_url = str_replace ($protocol. $web_address .’/’, ”, $file_url);
$file_url = $web_root . $wpHomeDir .”/”. $file_url;
$file_url = str_replace(‘//’, ‘/’, $file_url);//die($protocol . ” — ” .$web_root . ” — ” .$web_address . ” — ” . $file_url );
}
Hi Matteo,
Your directive was successfully implemented.
Thank you very much for immediate assistance.
KarlYour hint solved the problem. Thank you very much, Matteo.
(Sorry, my Internet connection had been broken until now.)Supplementary information:
As a workaround I changed the file name within the HTML code of an existing miniAudioPlayer. The player opened, but it didn’t play the file.Hi pupunzi
I hit on the same problem. Player doesn’t play on Windows XP & FF. No big problem for myself in the moment, because I can use XP & IE. But a considerable part of my visitors is still using the combination XP & FF. Since they do not know about the origin of the problem, they do not switsch to IE and simply think the player doesn’t work at all.
Karl