Installing A basic Newznab+ with XAMPP on Windows

Okay Guys,

This is only a short guide. I hope to expand on it, but it needs to be written fast. Please note this is a VERY QUICK install, and does not include the plethora of extras you can add to Newznab (but you can add these after if you want). I’m also going to assume this is your only website running on that machine. I’m going to show you Installing Newznab on Xampp.

Please be aware this guide is for Newznab Plus, the donated version. The free version really isn’t worth it if you want to actually index stuff. The donated version comes with all the regex’s you need to properly process the releases. You can get your plus ID from http://www.newznab.com

It’s very easy to install Newznab on Windows.

Step One

Download xampp (I’m not going to show you how to do this, just do the defaults. You can get it at:
Download Link

Download Tortoise SVN – Same as above
Download Link

Step Two

Once you’ve got XAMPP installed and Tortoise SVN you need to check out the Newznab jazz from SVN. Use the SVN details provided in your sign up email.

You need to right click where you want to check it out. I’m going to do it to the default XAMPP install dir

OneUpdate

update

Step Three

Once you’ve got all the files checked out, (sweeeeet) it’s time to start configuring. You need to setup an mysql root password with your xampp install. To do that go to http://localhost/security/index.php – In there you can set a password. Once done lets do a few jobs in Apache.

Find your apache .conf (by default: C:\xampp\apache\conf\httpd.conf)

Change your document root to suit the new filesystem:


DocumentRoot "/xampp/htdocs"

Change it to:


DocumentRoot "C:\xampp\htdocs\nnplus\www"

Sorted, woo. Now enable allowoverrides to all



AllowOverride ALL
Require all denied

Sweet. Now restart Apache from the XAMPP control panel.

Step Four
Now it’s time to start the install. Go to http://localhost/install

You should see the newznab page.

Three

Click Start Preflight checks.

You’ll probably get a couple of ‘check on these badboy’ type errors such as:

That’s fine. We’ll fix these. Find your php.ini (C:\xampp\php\php.ini) and update the following (change them depending on your own system resources. I’ve got a lot of ram, so i’m happy to give it a fair whack – Just use common sense). We’ll also update error_reporting whilst we’re in here.

max_execution_time = 120

memory_limit = 1024M

error_reporting = E_ALL & ~E_STRICT

Awesome. Now restart apache using the xampp control pannel.

Step Five

Now comes the DB settings. I’m just using the basic root information we setup in xampp security. You can change this to be whatever you’re happy with. If you have no idea what’s going on, just use root and the password you set earlier.

Then click create database jazz. Rad.

Step Six

Made it this far? Awesome. I’m oh-so-proud of you. Now it’s time to add your Usenet Server Settings. I’m sure you don’t need a screenshot of this, it’s very simple. Then click next.

Step Seven

Caching goes beyond the realm of this guide, so I’m going to ignore it. If you need caching (Only really if you’re having more than a few users) Give it a try, if you get stuck ask in #newznab on synirc.

Once you’ve said none, setup an admin user.

The default path for NZBs should be fine. If you need to change it…change it!

Step Eight

Woah, we did it. Your newznab server is installed! Radical man. You’ll want to go through the admin ‘Edit Site’ page and change it to be what you want. You should also remove (or at least rename the install folder now). Also please add your NN ID in site-edit if you want all the regexs!

Step Nine

Lets get some mother flipping releases in this beach shall we! It’s very simple. Lets first of all make sure it works!

To download the regex’s you want give running update_releases.php a go. Using CMD prompt navigate to the misc/update scripts folder and use the newly got php.exe to run the script.


cd C:\xampp\htdocs\nnplus\misc\update_scripts
C:\xampp\php\php.exe update_releases.php

You should see it list the regex number for your nnplus and it’ll say created 0 releases.

Lets activate some groups first. Go to http://localhost/admin/group-list.php and activate one. I’m going to choose one at random for this test. Activate any groups you want to index. But i’d recommend you play around with one group to get how it works before you start adding all of them! I’ve activated alt.binaries.teevee.

Once activated. Time to do the same as above but with the update_binaries.php


cd C:\xampp\htdocs\nnplus\misc\update_scripts
C:\xampp\php\php.exe update_binaries.php

Sweeet it works! Now it’s finished run update_releases again to create the releases.

Outstanding.

Step Ten

All that’s left to do on a basic site is get the batch scripts working. Go to C:\xampp\htdocs\nnplus\misc\update_scripts\win_scripts and edit runme.bat with your path to php (before the lines such as php.exe update_database_version.php. Whever eve it has php.exe change before it to be:


C:\xampp\php\php.exe update_database_version.php

Don’t forget to do it for all of them!

Step Eleven

Well now just run the runme.bat and leave it…it’s running! Huzzah, you did it!

Theres a LOT more you can do with newznab. This is a basic install.

Any issues, #newznab on synirc.net.

Tags

Like this Article? Share it!

About the Author

Author Gravatar
Tom

Tom's a developer who has a love of all things technical. 7TB For the fileserver just isn't enough for him these days. You can usually find him buying things he doesn't need or watching Reading FC.

Related Posts

111 Comments

  1. Doing something similar for OS X would be useful — MAMP + newznab configuration would be the way to go.

    • It’s very similar. I’ll have a go tomorrow eve

      • Tom,
        Looking forward to it. I’ve tried getting it set up (on OS X Mountain Lion w/ MAMP Pro) but can’t seem to get the update scripts to work. (PHP out of memory errors regardless of the allocation size).

        • Having the similar problems getting the update scripts to run on Mountain Lion with XAMPP. PEAR include path complaints. I’m sure it’s a matter of sorting out the files that come with XAMPP vs. the php/pear files installed via Xcode.

          • Im getting out of memory errors to. When backfilling it just says killed. Then on the console I can see it says out of memory

            Memory limit is set to -1 in cli and php.

            Anyone know how to resolve?

      • Hi Tom,

        I was wondering how the OS X guide is going? For some reason I can never connect to my database. Tried with both XAMPP & MAMP. I get these two errors:

        Pear – when updating
        Warning: require_once(PEAR.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/nnplus/www/lib/Net_NNTP/NNTP/Protocol/Client.php on line 73

        and

        arning: mysql_connect(): No such file or directory in /Applications/MAMP/htdocs/nnplus/www/lib/framework/db.php on line 21
        fatal error: could not connect to database! Check your config.

        Any suggestions?

  2. Can you clarify step 8: add your NN ID in site edit to get all the regexes? I try running the update_releases script and it gets 0 releases, although I scraped a lot of headers.

  3. can you do a Ubuntu guide for a virtual host?

  4. How about a tutorial for the free version ?

    I have extracted the free version to “C:\xampp\htdocs\nnplus”

    but inspite of apache and everything else running fine “\localhost\install” says object not found.

    Any advise ?

    • The free version isn’t really worth it (and not in subversion) – Theres no regexs so you’ll have to write them all(which is quite a lot) easily worth £10

  5. Nice guide. I got it installed ok, but when I try to run the PHP scripts, nothing happens. There’s no output and it just returns to a new command line. The php error log doesnt have anything useful either. Any ideas? Thanks!

  6. Thanks for the how to! Maybe an article for those extras to really get pro for us. Thanks again!

  7. Great guide – thanks! Worked first time… now to play with the configs!

  8. MasterCrucuifier December 11, 2012 at 6:49 am · Reply

    Thanks this is what I needed and it worked. It was so easy a noob could get this site up and running. Wait a noob did do it. Me

    They should scrap the free version as I couldn’t get it to work as the Regex is hard to do.

    Thanks Again

  9. Pingback: How To: Index Usenet easily using Newznab - Tiag.me

  10. Awesome guide, very good work. If you have the spirit for an adventure with sphinx integration, I’d love to see your take on it. I gave it a go and didn’t get anywhere with it… Windows with WAMP here… The built in search is really kind of worthless, I can’t get anything to pull up :(

  11. Hi
    Im Hving a problem when I try to open “http://localhost/install. I get an error message “URL Not Found”. I have downloaded nnplus to c:\xampp\htdocs\nnplus and reconfigured the apache\conf\httpd.conf file to point to the new directory but no luck. Any help would be greatly appreciated. Thanks for this Windows guide as I hate Linux

    Cheers

  12. Thanks for the help! Quick question, do you know of anyway to disable the covers? I’d rather not have all those covers downloaded if I can help it.

  13. I did an install with OS X using XAMPP. Its very similar to window but I had to modify my bash profile to point to the correct version of PHP. I believe I had to manually enable PEAR as well for PHP. Also ran into a huge issue recursively changing directory and file permission using finder. Finally figured out I had to use chmod at the command prompt instead of using finder.

  14. Tom,

    Thanks for the article. I was able to get my server up and running the first time following your instructions.

    The only thing I needed to do that wasn’t included in your instructions was to restart apache at the end of Step 3.

    Thanks again.

  15. Jacqueline Shane December 12, 2012 at 6:59 pm · Reply

    Very interesting guide. Thank you. Over the weekend, I put Newznab+ on Ubuntu – it works but I don’t like Linux.

    After seeing this, I decided to use Xaamp for OSX install. Got 99% done. The Xaamp monitor is saying the Mysql is running, but when I run the update scripts, it says that it can’t connect to MySql socket. Maybe it is something to do with paths? But can’t work it out. HELP?

    This would be great on OSX, so I don’t need to work off Virtual Machines. Ugh.

    Jaqueline.

    • Jacqueline Shane December 13, 2012 at 3:37 pm · Reply

      I fixes this error… And running perfectly on xampp on OSX Lion.

      Had to do a symbolic link to the MySql.sock in the Xampp folder from /Var/MySql/

      This guide is great thanks.

  16. So on the DB creation step I get the following error “Unable to create database and data. Check permissions of your mysql user.” Funny thing though, when I look at phpMyAdmin it did actually create the database. For reference I’m running the current version of MAMP on 10.8.2

  17. Tom,

    Absolutely awesome guide!

    Sitting in #newznab, waiting for update_binaries.php to finish, revealed A LOT of useful tweaks/fixes/other tidbits as well!

    Thanks :)

  18. Tom,

    Great guide.

    Having trouble connecting to my Usenet server using SSL the test fails every time. Works fine with non-ssl settings

    Any ideas??

    Thanks.

    • SSL is disabled by default in XAMMP. Go into your php.ini file and under “Dynamic Extensions” remove the semicolon before “extension=php_openssl.dll”.

    • you must open php.ini and remove the semicolon:

      ;extension=php_openssl.dll

      extension=php_openssl.dll

    • I have same issue…Downloaded a php editor to look at line 561 (as suggested in the error), but do not know what to do with it :(
      ‘Googled’, but it talks about SSL certificates – even more confusing..Advice would be appreciated…Thx

      • Same as my answer above Mark. I had the same error as you and removing the semicolon did the trick.

        • Hi,
          Thx for the pointer…(I am not familiar with the linux version, hence tunable to spot an easy mistake :-) ) I reformatted drive & persevered with linux & have it running now – though I am scared to quit as I do not know how to shut the running progs properly :) – tried before & had probs getting the scripts running again :(

          Will check out the windows install again later – over hols :-)

  19. First of all , INCREDIBLE GUIDE!!!

    What kind of hardware (CPU, RAM, HD Space) will I need for this? Would it be possible to run this on my media server or is a separate box recommended?

  20. Hi,
    Getting as far as ‘News Server Setup’, It says “failed to write to socket”. There is a Warning at top screen if i forgot to enable ssl line 561?

    Looked at file using notepad – garbled…could you please advise :) Using SSL 563

    Port 119 does progress but not on SSL..TIA mark

  21. Sorry too many aa’s in email address..doh

    mark

  22. Hi tom can you clarify this statement. Maybe I am missing something.

    Step Eight

    ” You should also remove (or at least rename the install folder now).”

  23. Sweet guide,

    A nice thing to do is have the runme.bat batch file running in the background at all time.

    create a vbs file:

    open notepad
    paste :

    Set WShShell = WScript.CreateObject(“WScript.Shell”)
    WShShell.Run “runme.bat”, 0

    save it as filename.vbs

    go into task scheduler and create a basic task and add the file and make i launch on startup .
    then when its created edit the new task and delay it 30 secs after launch.

    ps make sure the vbs is in the same directory as runme.bat or link it in the vbs file,

    and when starting batch file while you are no physicly in the directory it will default to c:/user

    so u have to add someting like:

    c: “drive of your file”
    cd Xampp\htdocs\nnplus\misc\update_scripts\win_scripts

    before

    “”cd..”"

    in runme.bat

    //Mace

  24. I am stuck at the for svn checkout. I got the nnplus but it is not accepting the provided username/password I got in the email

    what do I do?

    thanks!

  25. nevermind< got it done, bad keyboard

  26. Thanks so much for the guide! I hope you get the 3rd party add on guide set up. No matter where I place the 3rd part programs (unrar, mediainfom etc, C drive, F drive etc) I get an “The unrar path does not point to a valid binary” error (for each add on). I use forward slashes and backwards slashes in the path and still no go. Look forward to reading the guides!

    • I don’t know if this helps you but this is my paths which worked for me

      C:/Program Files/MediaInfo/MediaInfo.exe
      C:/Program Files/WinRAR/winrar.exe
      C:/Program Files/ffmpeg/ffmpeg.exe

    • fixed my own problem. For whatever reason, in the site editor, where you input the paths to the 3rd part add ons, it did not like it when I typed in the drive letter and colon. When I copied the “F:/” from the pre-populated Temp Unrar File Path and pasted it into the other, blank file paths and then typed the rest of the file path. it worked fine.
      For Example:
      1. Highlight the “F:/” in the Temp Unrar File Path
      2. Press Ctrl-C
      3. Go to the Unrar Path field
      4. Press Ctrl-V
      5. Then type in xampp/unrar/unrar.exe so the filed now reads F:/xampp/unrar/unrar.exe
      6. Save

      Now though, when I run the update releases script, I am having problems with mediainfo. When the script uses the mediainfo app, it opens a mediainfo window and wont do anything until I close the window manually.

  27. great write up , has been very helpful
    but I think am stuck :(
    get to step 9
    and it goes through everything and starts to spit out notices 3 in total just repeating them selfs.
    Notice: Undefined property: stdClass::$curlproxyaddress in C:\xampp\htdocs\nnplu
    s\www\lib\util.php on line 150

    Notice: Undefined property: stdClass::$curlproxytype in C:\xampp\htdocs\nnplus\w
    ww\lib\util.php on line 151

    Notice: Undefined property: stdClass::$curlproxyuserpwd in C:\xampp\htdocs\nnplu
    s\www\lib\util.php on line 152
    I really don’t think i missed a step anywhere . can someone help me ?

  28. I personally think I messed up somewhere because its taking forever to go through one cycle. I moved to 1 day from 7 and I’m hoping I dont have to start over. Ive reset/purged all my active groups but still at a loss. Anyone have any simple instructions to clear old data without reinstalling?

  29. after I have run runme.bat I see it just finished with Updating completed in 37.304.07 seconds. I’m not sure if I should run it again or something else to shorten this up

  30. Ran through this last evening, took me about 45 minutes to run through. Excellent tutorial, easy to follow instructions (didn’t hurt that I am a web developer who runs my own server, hehe)… looking forward to unlocking the power and excitement!

  31. Great guide – Thanks!

    A bit stuck though – when I’m prompted to create an admin user I get the following:

    fatal error: could not select database! Check your config.

    Any advice is greatly appreciated.

  32. Chimera – I am getting the same error, but mine has been working properly for over a week now. I read on another forum that it may be an issue with TV Rage, but I am not sure.

  33. Thanks for this great tutorial. I was a bit confused about step 10 and what bit to leave and where to enter the new code when editing the runme. After a couple of edits i’m afraid i have it knackered. Can anybody post a pic or the proper runme.bat code. am so close to being up and running. TIA

  34. Thanks so much for this tutorial, I ran a ubuntu computer for over a year and was trying to set this up in ubuntu vm but this worked sooooo much better in windows.

    for wtfchuck here is what the runme.bat should look like:

    http://pastebin.com/S8YrShiX

  35. When running the bat file, I see this: ” Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\nnplus\www\lib\binaries.php on line 249
    Server did not return xx article(s).”

    xx = variable number

    Could you please advise? – Many thanks,

    Mark

  36. Thanks for posting this guide. I have everything working until step 9. The update_releases scripts doesn’t show any output in the cmd window. I’m assuming I should use the windows cmd window…

    Thanks,
    Matt

  37. Having the same problem as Matt.. binaries work fine, but running update_releases stops after displaying “Starting release update process

    Any ideas?

  38. Hi, I’m having issues at step 3, I have installed tortoise and xampp, however I cannot seem to connect to localhost. I can connect fine to sickbeard/sabnzb using localhost, but not these (have tried localhost:80/443 for apache, 3306 for mySQL).

    Any ideas why?

  39. Thanks for the tutorial this is great by the way. I am having the issue that when I run the update releases script it doesn’t find any releases. When i ran on the Mac it was only able to find 1 new release of a file. I know that there are tons more files that it should be indexing but I’m not sure why its not posting. Any thoughts??

  40. If anyone is receiving a socket error while backfilling etc please read:
    The error is likely related to memory. As long as you edited PHP.ini in step four of this guide and the problem persists you can drop the max messages in site edit to 10000. This resolved the issue for me.

    Handy bit of info regarding a few problems you may have:
    http://www.tglane.com/2012/12/30/newznab-on-shared-hosting/

  41. Having the same issue as Kam above – cant access the localhost site. Any tips?

  42. I’m stuck at the very start of Step Four.

    When I try to go to http://localhost/install

    I get Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again

  43. Excellent tutorial. Got mine working perfectly thanks on windows 7.
    Probably too late to do this now but i would like to share access to my site to a few family members. I have installed NNPLUS on one of my desktop computers on my network using Xampp etc as shown so not sure about installing WAMP now as it may mess up my Xampp.
    Also i have a minecraft server running on another server on my network, will this be affected?
    I have installed the IIS service in windows ready.
    Any advice?

  44. 1) So what’s next. Step 11 = run the RUNME.BAT
    Is this now supposed to continuously run, or have I done something wrong? Mine has been running for a while, and if I’m not mistaken is running the same thing over and over again. Is this the intended function?

    2) What is the purpose of runme_with_scrape.bat?

    3) I’ve used just the a.b.teevee as in the example above. I now have a website with a number of entries in the TV category. I downloaded one of the NZB files, and ran it in Sabnzbd. It loads fune, but nothing is downloading. Have I done something wrong?

  45. Great article, I was struggling with the Ubuntu install that I almost gave up but with your guide I was able to get it up and running first time.s

    Thanks for putting this together!

  46. Is anyone having problems with update_binaries freezing randomly. I have checked the database for errors. The drive is not full and i have plenty of memory. It seems to happen once a day. Any ideas on how to troubleshoot this problem.

  47. Great guide

    xampp and newznab plus was easy to setup and get running on windows 7, but by adding tutorial group and running relevant php files and runme.bat

    produce no output on site, not sure were going wrong. (all looks fine :>)

    any help would be great! (no luck with ‘google’)

  48. Darn it, I feel silly
    Missed out one crucial thing in past post issue :
    This tutorial = Sweet! (fyi newznab id is one in purchase email , but it’s called ‘KEYCODE’)

  49. @Jeremy
    I’m having the same problem.
    I have to keep killing it and stating again.
    I’m on Ubuntu

  50. I am embarrassed to ask this but….

    “Step 2 – Once you’ve got XAMPP installed and Tortoise SVN you need to check out the Newznab jazz from SVN. Use the SVN details provided in your sign up email.

    You need to right click where you want to check it out. I’m going to do it to the default XAMPP install dir.”

    What exactly do you mean by “check out the Newznab jazz from SVN. Use the SVN details provided in your sign up email.”?

  51. I did not get any SVN details in the email I received from Newznab, only a link to a download and a KEYCODE. So, would I put the following in for SVN?

    svn://svn.newznab.com/nn/branches/nnplus

    Also – why do you have the SVN blacked out in the photo above?

  52. OK – I’m sorry about bombarding you – please delete my previous question (s). I figured it out. It looks like the new method of obtaining the SVN info is a little different than when you wrote your guide. I was only provided with a KEYCODE which is used in IRC to generate the SVN user and pass. Also, inside of the ADMIN settings, there is an entry field for the KEYCODE that you must provide in order to get the appropriate REGEX’s.

    Thanks for the guide – I’m up and running thank to you!

  53. Chet Thunder, I am in exactly the same situation as you – I can’t seem to find a resolution for the issue at this point, which is not making life easy.

    Could you explain the IRC/Keycode – SVN user and password solution that you identified?

    • Sure – you need to go to Newznab.com and click on the IRC chat channel. When in the channel type ?? SVN and it will pop open a new channel. In that new channel follow the on screen instructions and enter your Keycode as shown. It will reply with the necessary information for you to log in to the SVN.

  54. I was curious if you could expand on how to update the SVN after initial install. I admit I am new to SVN and tortoise, but I am seeing the following issue. When I click on update SVN, it shows me that there are updated files. Turns out the updates occurred in the windows script folder, so that folder now has a red exclamation point over it as oppose to a green check mark (which all the other folders have). I assume this means that the files on my server are older than the ones indicated with the red exclamation point. So how would I go about updating those files? Do I need to browse the SVN repository and manually download them? Or is there a tortoise function that will grab the files and replace what’s in my server directory?

    Thanks!

  55. TO CHET THUNDER

    in order to properly utilize the SVN and tortoise, you need to have purchased the Newznab program. Once you do that, go to the newznab.com chat forum and type “?? svn”

    it will bring up a window in the chat area where it would ask you for your ID key that was sent to you.

    I found out the hard way to configure tortoise….put once properly done, it will download all files needed to run Newznab.

    hope that helps……

  56. Great guide!

    Meaning to do this since the death of nzbmatrix.. your guide is just so easy to follow. and humorous! :D

    Legend.

  57. I just wanted to say, “Thank you!” for your tutorial. I only had a few problems that going through the comments helped out solving.

    Nice write up! Thanks again!

  58. Anyone else getting out of memory errors?

    Windows/Xampp newznab build on a Win6 box with 16gb RAM, was running fine for months, then during update_releases, PostPrc fails evey time:

    PostPrc : Updating GID in releases table
    Fatal error: Out of memory (allocated 13107200) (tried to allocate 262144 bytes) in G:\xampp\htdocs\nnplus\www\lib\nzbinfo.php on line 192

    I’ve tried setting php.ini to 128M, 256M, 512M, 1024M, 2056M, and -1

    Any ideas?

  59. I have an issue at Step 4.

    When I try to open http://localhost/install I get a 403 Error (Access forbidden). Any ideas?

  60. Very helpful, got me up and running pretty quickly!

    Now to work out how backfills etc. work.

  61. I went through the whole install and everything worked great but I cannot get to any of the pages or log in page, Give me a 404 Error Object not Found!

    http://localhost/login/

  62. Did this install back in December, running great ever since! Any questions go to the IRC channel. I’m a windows guy so I’ll be able to help.

  63. http://nzbindex.in is an example of a newznab site…

  64. Hi.

    Im stuck at the chekout point.
    What location should be inserted in the “URL of repository”?

  65. I installed Newznab back in January ’13 using this guide. At that time, it was a breeze.
    When I recently tried to update it, I botched something and broke it.
    No problem, just reinstall.
    Problem, apache won’t restart at the end of step three.
    Has anything changed that would would make this guide out of date?

    • Hi NZBSeeker, Nothing I’m aware of that should’ve changed, can you have a look in your event logs? In one of them it should give you a little bit about why Apache won’t start.

  66. i would advice to increase the “upload_max_filesize=2M” from php.ini to 4M.
    because of that limitation big nzb’s (typically 50GB releases) were not correctly processed.

    technically:
    your browser is uploading the file to the apache/httpd service which simultaneously writes this file to your xampp temp folder. however when that file reaches 2MB its closed by the service, processed and removed. the browser upload goes on till the full file is transferred but that data is ignored by the service.
    the structure of that file is incomplete and considered invalid.
    your import function does not report anything back at all which is a pity…

  67. (correction to my previous post)
    update: set it to 10 MB since i have just found files with size 6-7 MB

    the cli/import.php script does work fine though

Leave a Comment