Support » Plugin: MelAbu WP Download Counter Button » Upload and download don’t work

  • Resolved henzishi

    (@henzishi)


    After clicking on download: here are it displays me :

    Warning: Invalid error type specified in C:\xampp\htdocs\wordpress\wp-content\plugins\download-counter-button\classes\class.MelibuDownloader.php on line 355

    Please someone can help me ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Samet Tarim

    (@prodeveloper)

    Hi, I will gladly continue to help you, but these are too little to give, so I can understand your error message. Can you still post your shortcode here? Then I can example to see which file type you use.

    The error that is seen with you, is not the actual error. But as far as I can see was or could the file not be found.

    This error in line 355 you can change in which you the:
    trigger_error('...',E_WARNING);
    Rename in:
    trigger_error('...',E_USER_WARNING);

    Then you get the actual error message.

    Hope could first help.

    Hi, Thanks for answering.
    I changed like you told me and this is what it displays me :

    Warning: The file path does not, therefore, the file could not be found. Is SERVER DOCUMENT ROOT: “/C:\xampp\htdocs\wordpress/wordpress/wp-content/uploads/2017/01/Hallelujah-Karaoke-HD-In-the-style-of-Alexandra-Burke.mp3”? It could not be determined, the server Document root. in C:\xampp\htdocs\wordpress\wp-content\plugins\download-counter-button\classes\class.MelibuDownloader.php on line 355

    Plugin Author Samet Tarim

    (@prodeveloper)

    Hi, and thanks for your reply.

    As I can see, your path has not been properly determined and compiled traffic.

    I can help you fix the problem however I need your help for it.

    With you is the first problem of the slash at the beginning:
    /C:\xampp\htdocs\wordpress/wordpress/wp-content/uploads/2017/01/Hallelujah-Karaoke-HD-In-the-style-of-Alexandra-Burke.mp3

    Then these more slashes are backslahes:
    C:\xampp\htdocs\wordpress

    And here it is normal slashes:
    /wp-content/uploads/2017/01/Hallelujah-Karaoke-HD-In-the-style-of-Alexandra-Burke.mp3

    So that I can fix the error, please do the following:

    • Open the download-counter-button folder either in the WP editor under Design -> Editor or under wp-content/plugins/download-counter-button
    • Open in classes/class.MelibuDownloaderAbstract.php
    • On line 79, protected function parse_url_to_path ($ url, $ absolutepath) {
      You find this function
    • Write this down as follows:
      /**
        * GET PATH
        * @param type $url
        * @param type $absolutepath
        * @return string
        */
        protected function parse_url_to_path($url, $absolutepath) {
      
            $arr = parse_url($url);
            $thinpart = str_replace(filter_input(INPUT_SERVER, "DOCUMENT_ROOT"), '', $absolutepath);
                  
            //  Please do the following and, as I have done, these four echos with these variables. 
                  
            // ECHO 1
            echo $thinpart . '<br>';
                  
            // ECHO 2
            echo $absolutepath . '<br>';
                  
            $thinparter = str_replace($thinpart, '', $absolutepath);
                  
            // ECHO 3
            echo $thinparter;
                  
            if ($thinpart == $absolutepath) {
                $fullfilepath = '/' . trim($absolutepath, '/') . $arr['path'];
            } else {
                $fullfilepath = $thinparter . $arr['path'];
            }
                  
            // ECHO 4
            echo $fullfilepath;
                  
            return $fullfilepath;
      }
    • post here then from the output
    • This reply was modified 2 years, 9 months ago by Samet Tarim.
    • This reply was modified 2 years, 9 months ago by Samet Tarim.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Upload and download don’t work’ is closed to new replies.