Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter pixelfundi

    (@pixelfundi)

    SOLVED: My server configuration would not allow url access to the file so I modified the direct_download.php file to access the mp3 using realpath().

    For example:

    $real_file = str_replace("https://www.yourdomain.com/", "/your/path/to/htdocs/wordpress/mp3/", $file); 
    
    $filename = realpath($real_file);

    bclair85

    (@bclair85)

    What part did you remove? from direct_download.php
    I tried this but now Im getting to much pathway in the download.
    Not sure if that is still keeping it from working.

    Thread Starter pixelfundi

    (@pixelfundi)

    It sounds like you have an extra slash somewhere, but just in case:

    $filename_parts = explode("/",$file);
    $filename = $filename_parts[count($filename_parts)-1];

    is replaced with

    $real_file = str_replace("https://www.yourdomain.com/", "/your/path/to/htdocs/wordpress/mp3/", $file); 
    
    $filename = realpath($real_file);

    I beefed up some other areas of the file, so let me know if you can’t get it working and I’ll post the whole lot.

    bclair85

    (@bclair85)

    Thanks for your help.

    I replaced the text as follows but now I get
    direct_download.php to download before I was getting the right file but no data.

    $real_file = str_replace(“https://domain.com/”, “/html/Sermons/”, $file);

    Hi,
    It seems that I′ve also the same problem can somebody describe for me how I can get this fixed…??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Download Link Not Working’ is closed to new replies.