WordPress.org

Ready to get started?Download WordPress

Forums

podPress
[resolved] Auto detect file size and doesn't work after upgrading to 8.8.9 (40 posts)

  1. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    I still think taht the problem has something to do with the parameters of the request which gets send if you cli9ck on the Auto Detect buttons.

    If Jeremy enters a full URL of a file on a remote server then the request seems to get redirected to the front page or the 404 page of the blog (and the log file was empty)

    Maybe it is some kind of a security feature of those servers. Which does not allow requests with URLs which include a further URL to a remote server (or to a different domain).
    If one enters a full URL as the location of a media file then a typical requests looks like
    "http://www.example.com/wp-content/plugins/podpress/podpress_backend.php?action=getfilesize&filename=http://www.example.net/downloads/example.mp3"
    And the problem seems to exists only if auch an request includes an URL of a different domain:

    1. Auto detect works fine on local hosted mp3s whether I just enter the filename or I enter the complete url.

    Jeremy, I think that you could ask the hosting provider if there is a server side feature which filters request like the one above.

    I will take further look on the encoding of the value of the &filename= parameter.

    Regards,
    Tim

  2. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    The encoding of the string values of these requests are probably not ok. I have made already some changes (current Dev Version is 8.8.9.2 RC 5). All the value are getting encoded with encodeURIComponent() (JS) now (That seems to be the recommended method.). The file size auto detection may already work better. But I'm not finished with the modifications.

    I will report back later.

  3. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Jeremy, Ray,

    the changes which I wanted to make are now in the Development Version.
    I have revised all 3 detection procedures. The plugin is able to use Curl procedures to detect the file size of a remote media file or to download a remote file to detect the duration and other ID3 data (if fsockopen() is not available or fails).

    Probably the most important modification regarding the problems which you, Jeremy, have encountered is the different method (encodeURIComponent()) to encode the parameters of the request which gets initiated through a click on the Auto Detect buttons.

    Jeremy, I would appreciate it if you could try once again to detect for instance the file size of one of these media files which are hosted on archive.org.

    Regards,
    Tim

  4. jersnav
    Member
    Posted 3 years ago #

    Dear Tim and Ray,
    I apologize for not communicating in the last week. I was in Dallas for a meeting and just plain didn't have any extra time.

    Tim, I installed the new version and it still is not functioning as before. To make sure I have the correct version, it is reporting as 8.8.9.2 RC 9. Is that correct?

    Also, I have the debug flag set to true and the error does not trigger a report to the log.

    I'd be happy to ask hostgator, but I'd need help formulating the question to ask them. I'm not sure what I should ask

    Thank you!!
    Jeremy

  5. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Jeremy,

    no need to apologize! I have needed the time to think about the problem and to make the changes of 8.8.9.2 RC 9 (which was the last Dev version).

    Today, I have made a new version (8.8.9.2 RC 10) which includes 4 tests to debug the other aspect of the auto detection request - the HTTP request method itself.

    That the auto detection is still not working in the Host Gator hosted blogs and that the log files have no entries of the attempts are indicators that maybe something is not right with HTTP request method.

    In the past versions podPress used the GET method in the requests which should return file size, duration and other ID3 data.
    I think maybe it is better to use the POST method to send the parameters to the PHP script. I would like to find out if the POST method works on these Host Gator blogs.
    That is why I have implement 4 tests today. If you set PODPRESS_DEBUG_LOG to TRUE then you will see below the Auto Detect button of the file size row a "AJAX Test:" section with the buttons "with filename POST", "with outfilename POST", "with filename GET" and "with outfilename GET".
    Usually a click on one of these buttons creates a message box below the buttons which looks like:

    POST
    action: ajaxtest
    filename:
    rqtype: nofilename

    If you click on a "with filename ..." button, the AJAX request will contain the parameter filename and the URL of the file should be appear in the message box. The "without filename ..." buttons are there to make requests without this filename parameter. Maybe that makes a difference. In these cases the "filename: " line in the message will not contain an URL.

    I suspect that not all tests will produce such a box with 4 lines in your case. Maybe the GET method tests will produce only error messages. But I hope that both POST method tests will be successfully on the Host Gator blog(s). If both POST method tests are successful, I will switch the method of the real Auto Detect requests.

    I would appreciate it very much if could activate and do these 4 tests.
    Please, enter an URL of a remote media file into the location field before you start the tests.

    Regards,
    Tim

  6. jersnav
    Member
    Posted 3 years ago #

    Hi Tim,
    Thank you for the continued help here!
    I downloaded 8.8.9.2 RC 12 and ran the 4 tests.

    Here is what happened:

    Click on "With Filename Post"
    Returns:
    POST
    action: ajaxtest
    filename: http://www.archive.org/download/IntroductionToIntegrativeMedicineWithDoctorSaputo/saputo.mp3
    rqtype: withfilename

    Click on "With Filename Get"

    returns error message:
    Error: There was a problem with the request - 403

    Click on Without File Name Post:
    POST
    action: ajaxtest
    filename:
    rqtype: nofilename

    Click on Without File Name Get:
    GET
    action: ajaxtest
    filename:
    rqtype: nofilenameGET

  7. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Okay, that makes it clear. I'm going to change the HTTP request method to POST.

    Thank you for making these tests. I will create one further RC version.

    Regards,
    Tim

  8. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Jeremy,

    I have changed the request method to POST. You may try the 8.8.9.2 RC 14.

    Regards,
    Tim

  9. jersnav
    Member
    Posted 3 years ago #

    Dear Tim,
    I have downloaded RC 14..... and it works!!
    Both file size autodetect and duration autodetect function correctly with the remotely hosted mp3 file.
    Thank you very much!!!
    Jeremy

  10. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Jeremy,

    I'm glad that it works and I thank you for your patience and for doing all these tests!

    Regards,
    Tim

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags