Starting August 15th, Amazon’s web service API started requiring all requests to be signed—that is, they must include a cryptographically generated key.

This is important, because while the service as always required an ID to run, it was never a secret. In fact, the former developer’s access ID has been embedded in the Now Reading Reloaded script since the very beginning.

The change, however, requires the addition of another key, this one like a password, and it’s not supposed to be given out. Since Now Reading Reloaded is open source, that means anyone who wanted to could use my key.

As a result, I’ve modified the plugin to use two more fields in the options screen, one for the Access ID and one for the Secret Key: both of these are required to add books from Amazon, and you will have to get both yourself.

Actually, it’s easy to do: go to the AWS site and register. Then plug the two keys they give you into the appropriate spaces in the Now Reading options screen. Resume reading.

§3966 · August 19, 2009 · Tags: , , , ·

27 Comments to “Now Reading Reloaded changes”

  1. Katy says:

    Thanks for the updated plugin! =) I just upgraded Rob’s old one to yours and everything is working perfectly again!

  2. Alyna says:

    Hi, thank you for the update!
    Unfortunately I wasn’t careful and I have uploaded over the change I have done. :(
    Now I’m getting some problems and I cannot fix them. For instance I try to edit the sidebar template and although I make changes it stays the same. :( When I try to edit it in the wordpress editor it says: “Editing now-reading-reloaded/templates/sidebar.php (inactive)”, although the plugin is active.

    Have you ever encountered such a problem before?


    • Ben says:


      The template files appear as “inactive” in the plugin screen regardless of the actual plugin status.

      In the future, you should keep local template files in your theme’s folder (see the Readme)

  3. Katy says:

    Hello, I just updated Now Reading Reloaded and now it’s not working! Is there a way to get a previous version?

  4. Kevin says:

    First of all… Great plug-in! Now for the bad.. I have one error that will not allow me to search.

    Warning: pack() [function.pack]: Type H: illegal hex digit M in /home/jtamiscl/public_html/wp-content/plugins/now-reading-reloaded/amazon.php on line 27

    Warning: pack() [function.pack]: Type H: illegal hex digit V in /home/jtamiscl/public_html/wp-content/plugins/now-reading-reloaded/amazon.php on line 27

    It continues like this with different illegal hex digit then ends with

    Fatal error: Call to a member function on a non-object in /home/jtamiscl/public_html/wp-content/plugins/now-reading-reloaded/amazon.php on line 169

    Works fine on one server but not on another. Any ideas??

    • Ben says:

      What version of PHP, Apache, etc? Also, are you certain you’ve entered the correct information into the Amazon Acccess Key and Secret Key field?

      • Kevin says:

        Yes, I even copied and pasted the working one to the non-working one to make sure.

        Apache version 1.3.41 (Unix)
        PHP version 5.2.5
        MySQL version 4.1.22-standard
        Wordpress is newest version. I am going to remove and re-install tomorrow and see if that works.

      • Kevin says:

        No luck. Maybe a permissions problem? I have no idea.

      • Ben says:

        Does the working server have a different configuration? That is, if the plugin works for you in one environment and not in the other, what are the differences between the two environments?

      • Kevin says:

        Not really. I mean they are on different servers but they are both running linux with the above versions of software. Where is the configuration info stored? I deleted the directory and re-upped it and all my settings were restored. I would like to do a complete re-install and remove all the keys and settings.

      • Kevin says:

        Here is the error log with debug mode on.


        The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.


      • Ben says:


        Tables are stored in the database with this information.

        They look like wp_now_reading_XYZ.

      • Kevin says:

        OK, I am officially going crazy. I deleted the 4 db entries, removed the plug-in directory, installed a fresh downloaded copy, activated the plug-in.. bang all my key data was still there. Are the Amazon keys stored in a different database entry or file? I am thinking maybe the data is corrupt. I have even deleted the keys and saved the options hoping it would reset the keys. Same errors.

      • Kevin says:

        OK. I have tried one last thing. I signed my wife up for the Amazon program and have a completely different set of keys. Same exact error. Any ideas at all? I would really love you use this plug-in but I am at a loss what to try next.

    • kickstand says:

      I’m getting the exact same error over here. Any ideas? Have you been able to fix?

  5. Fips says:

    Thanks for keeping this plugin up-to-date, great to see someone take over the flame. Just a quick query if you can help: I’ve had some non-standard templates in my theme folder since using Rob’s plugin, which seem to be ignored since installing Now Reading Reloaded. I’ve had them in now-reading/ or now-reading-reloaded/ with no success, and moving the default files from the plugin’s folder provides the error that no template files were found. Obviously I can simply overwrite the defaults with each update, but it’s a step I’d like to avoid if I can help it. Any idea what could be the cause of this problem, or perhaps how I could find out which directory NRR is searching in when it looks for non-standard template files?

    • Ben says:

      Not sure what the issue could be. The template loading function is nr_load_template, which is on line 351 of now-reading.php.

      First it looks in {your_theme}/now-reading-reloaded/{template_file}.php.
      Then it looks in {your_theme}/now-reading/{template_file}.php.
      Then it looks in {plugin_directory}/templates/{template_file}.php.

      • Fips says:

        The only thing I can think is that the TEMPLATEPATH in $template = TEMPLATEPATH ."/now-reading-reloaded/$filename"; is somehow coming up with the wrong path on my installation. Is there any easy way to echo that out so I could check?

  6. Ben says:

    sure; after those lines line put echo $template;. It should print the path in your sidebar’s now-reading section.

    • Fips says:

      Aha, thanks for that. It is printing the correct paths, so I’m pretty stumped. There shouldn’t be anything wrong with the permissions either, so unless you can think of anything else, I’ll just have to accept that it isn’t finding or recognising those files. But no big hassle for me to copy the files over after updating. Thanks for the prompt feedback!

      • Ben says:

        So it’s echoing /home/chez/ What happens if you were to change the directory to now-reading-reloaded?

      • Fips says:

        Exactly. Perhaps I popped the echo $template; in a different place than you meant, I’d put it after each line in the nr_load_template function section and it showed me the three paths I would have expected to sidebar.php.

        I’ve tried using both now-reading and now-reading-reloaded directories, and moved the plugins/now-reading-reloaded/templates to make sure it wasn’t for whatever weird reason defaulting to that, all to no avail. Set up like that, author/tag/book pages provide the error about a missing template file, whilst the library and sidebar remain blank.

        I did notice a curious issue when moving the directories around that I sometimes had to reset WordPress’ permalinks (i.e. just click save changes). Not sure if that’s indicative of some misconfiguration or not.

      • Ben says:

        What happens when you do echo file_exists($template);. Should return a 1 if true, and nothing if false. We know the constructed path is correct, but we don’t know if the file is being read successfully.

      • Fips says:

        Excuse the delay. Just tried that, with nothing being displayed for either directory in the themes folder, and a 1 being output as you said when the plugins/now-reading-reloaded/templates/ folder is left intact. Since these are the exact files I copy over to the plugins folder, I can’t see it being a problem parsing the files, and I’ve tried setting all permissions to ‘stupid’ with no success. Also, just for reference, the server is kept fairly well up-to-date, with PHP currently at 5.2.10.

      • Ben says:

        Hmm, so clearly, the plugin isn’t able to read the files in your theme folder, which is… odd. Presently, I’m stumped.