Camen Design Forum

Getting NNS working on my own server

append delete monty

Hello all,

I represent Bristol Braille Technology, a small not-for-profit creating a radically cheaper refreshable Braille display*. We have recently had a surge in interest in our work via e-mail and have decided to go for a more public conversation by integrating a forum into the site. I like the design and the methods of NNS --- and appreciate Kroc's work more generally --- so have opted for this.

Initially its just going to be running as a seperate forum in a subdomain ( I've dumped all the files from the latest release into the FTP directory and followed the README.txt file therein. You will see, however, that this has not worked. I would like some advice on what might be causing this.

Having spent two hours 'talking' (mostly waiting) to server administrators from IX Web Hosting**, I was finally told that its an issue with the .htaccess file that came with the forum. I don't believe them, but I suppose it could be some sort of incompatibility with their system.

The curious thing about our server (which is a standard LAMP jobbie) is that there are no 'public_html' or 'www' directories as you'd normally expect, just the domain name as a directory, everything within which is publically visible. There are no .htaccess files viewable either.

So, my question is; is there something I'm mising from the install procedure, and is the server set up I describe a normal one.

Thanks in advance,

Ed Rogers,

P.S. I can't resist using the same username as I initially used to post on here many months ago.

* http//

Reply RSS


append delete #1. Kroc

I would need more information to work with.
Check the basics, like Apache version number.

The location you've linked us to does not contain NNF, so there's nothing I can view there, even an error message, to help further.

append delete #2. Martijn

What happens if you upload just an index.html with some dummy text in it, like

% index.html


Just to test if the subdomain you set-up actually works.

If it does you could try uploading every file except for the htaccess file? If it really is the htaccess file giving problems at least something should show then. If it still doesn’t show anything that was clearly not the problem and we’ll need more info.

That Bristol Braille Technology project looks awesome. I’ve always marvelled at how those things can be used. It’s too bad I’m neither a Braillist nor do I live within the West Country or I would be all over this.

append delete #3. monty

Kroc and Martijn,

CentOS release 5.3 (Final)
Apache version 1.3.41
PHP version 5.2.17

I quote a administrator from the server providers who thinks he's found the cause of the problem.

As I can see this issue is related to the following line of your .htaccess
"RewriteCond %{QUERY_STRING} path=(?:themes|users|lib) [NC]""

Yes, I've tried uploading a static page and it runs fine.

I'm glad you've taken an interest in the project. It certainly an interesting field to be working in. Perhaps you can join us on the forums some time?



P.S. Can a mod please remove the previous post (#3) entirely as I used an inappropriate member name (i.e. a personal account)? If so, then thank you.

append delete #4. Martijn

Next test, try putting a # in front of both that RewriteCond and the RewriteRule directly after. Like so:

% .htaccess
	# don’t allow forum access to users / themes / lib folder
	# RewriteCond %{QUERY_STRING} path=(?:themes|users|lib) [NC]
	# RewriteRule ^ - [F]

Note that this will disable a security function. But if this makes the forum work report back and we’ll try add this security into the PHP instead. (You’ll be exposing the wrong data. *Please report back.* Can’t stress that enough.)

append delete #5. monty

The 404 remains when I comment out those lines. However, if I comment out these lines ...

	# don’t allow forum access to users / themes / lib folder
	#RewriteCond %{QUERY_STRING} path=(?:themes|users|lib) [NC]
	#RewriteRule ^ - [F]

	# page numbers on the root forum
	RewriteRule ^:(\d+)$ ?page= [QSA,L]

	# a sub-forum
	#RewriteCond %{REQUEST_URI} ^(/(?:[^\./&]+/)+)(?::\d+)?$
	RewriteCond %{DOCUMENT_ROOT}%1 -d
	#RewriteRule ^((?:[^\./&]+/)+)(?::(\d+))?$ ?path=&page= [QSA,L]

	# a thread
	#RewriteCond %{REQUEST_URI} ^(/(?:[^\./&]+/)*[_a-z0-9-]+)(?::\d+)?$
	RewriteCond %{DOCUMENT_ROOT}%1.rss -f
	#RewriteRule ^((?:[^\./&]+/)*)([_a-z0-9-]+)(?::(\d+))?$ thread.php?path=&file=&page= [QSA,L]

... Then I get the ...

'.htaccess' file is missing, or not enabled.

... message from the forum. It seems to be a matter of finding the root directory, but any more detailed analysis is beyond me I'm afraid. Is this explanatory?

append delete #6. Kroc

Have you confirmed that you are running Apache 2.1+ (preferably 2.2). Those lines are not compatible with older versions of Apache (we had another user discover they were still on 1.3!)

append delete #7. monty

Err, so are we, it would seen. Quoting from above ...

CentOS release 5.3 (Final)
Apache version 1.3.41
PHP version 5.2.17

Is this an insurmountable problem or can those lines be rewritten for old versions? Thanks for all the quick assistance, by the way.

append delete #8. Kroc

Right now, there is no solution. However, I will work on a way to run NNF without htaccess in the future. Sorry about this :( You need to talk to your hosts. Running Apache 1.3 is simply unacceptable, especially from a security standpoint.

Kroc added on

P.S. The PHP version must be at least 5.2.3, so your PHP needs updating too. Honestly, some web hosts are just terrible :/

append delete #9. monty

I thought as much. I'm trying to get it updated now. Will let you know how it goes.

append delete #10. monty

They refused to upgrade either! Its a very cheap package, but they would only upgrade if I went for a VPS. IX Web Hosting: great customer service, lousy package control.

I suppose this means we're looking for another server-provider. Can anyone recommend a reliable provider from England or Wales?

monty added on

Preferably a fairly small company, but I'm open to all suggestions.

append delete #11. Ben

I use swbroadband ( for a number of websites and their service for me has been impeccable. Fast response times to any problems and an up-to-date server/php setup. The server they have me on is running Apache 2.2.22 and PHP 5.3.10. Runs NNF perfectly.

They are Cornwall-based. Ryan Devonshire is the chap who runs it and I am yet to have a response to any of my queries that was not from him.

append delete #12. Kroc

I can recommend as they have been running Camen Design for a few years and service has been courteous and helpful. NNF is written and tested for their server environment. They have an option to choose between PHP 5.2 and PHP5.3.

append delete #13. monty

Thank you both for your recommendations. I plumped for The Hosting Folks in the end. Unfortunately I'm not having much joy here either. I have created a subdomain and uploaded the forum files into it, and the result is this message:

A file permissions error has occurred. Please check the permissions on the script and the directory it is in and try again.

I have set the files to 777 permissions (temporarily) to no avail.


P.S. I know Kroc is getting married tomorrow --- congratulations! --- and I'm not so much of a cad that I'd hope for a reply in the near future. Just thought it politer than ignoring this thread for a week or so, and hopefully someone else might be able to help anyway.

append delete #14. Kroc

Check the docs, I can't remember what it is, but the root files have to be a certain value 644 perhaps, I can't remember; you can also run the permissions check from the control panel. That should clear up your problem.

(P.S. killing a bit of time on the morning of the wedding so that I don't end up sitting around dressed for hours :P)

append delete #15. South West Broadba

Thank you for the recommendation Ben.

Monty, it's possible that your new host is running suPHP which doesn't allow permissions greater than 755 (it'll just throw a Internal Server error). When using suPHP, setting permissions to anything more than 755 is not required, the scripts will be able to write to directories/files without any issues.

If you would like to try out one of our packages, pop an order through on the website with the voucher FREEMONTH and you can test out the service to see if it's compatible.

Thank you once again,

Ryan Devonshire
South West Broadband

append delete #16. monty

Thank you both. It turned out to be what you both suggested, a number of files having the wrong permissions. I will post again once we have gone live with this.

Ryan, thank you for your offer. I should be OK for now, but I'll bear yourselves in mind if we need to host another site elsewhere in future.

monty added on

Spoke slightly too soon. The forum is now up but, having created a thread, I am now unable to view it. The thread title is 'Welcome to the Forum!', but it throws up a 404. The RSS file is there and the index.xml includes it. What am I missing?


append delete #17. Ben

Hi monty,

Could you post a link? Also, can you directly access the rss file through the browser?

append delete #18. monty

I can access the RSS feed through my browser.

append delete #19. Ben

Aha! This is entirely replicable on my own machine. The "bug", so to speak is that you have a period in your directory path.

So, for example:

Would work fine, while:

Produces the same issue you are having. If you have no option to change the directory names, I would strongly recommend you create a subdomain that points to that directory.

append delete #20. Kroc

Is there something I can change with NNF to resolve this? I can see it being common that folders have dots in the name as per domain names on shared hosts; but personally, I’ve not seen this problem before.

append delete #21. monty

Right! So given that that is only a temporary URL for use before I switch over servers properly the problem should just vanish as soon as the domain is transferred across. Many thanks. I will, of course, report back.

append delete #22. Ben

Is there something I can change with NNF to resolve this? I can see it being common that folders have dots in the name as per domain names on shared hosts; but personally, I’ve not seen this problem before.

I'm not sure how critical it is, but what seems to be the issue is that line 92 of the .htaccess:

% htaccess
RewriteRule ^((?:[^\./&]+/)*)([_a-z0-9-]+)(?::(\d+))?$ thread.php?path=&file=&page= [QSA,L]

Isn't matching the words with periods in. I've had a fiddle, but so far no joy. I'll keep on fiddling and let you know if I find a solution.

I don't think it is a major issue to simply say to people not to put periods in their directory names. It's not exactly a common practice anyway.


When I get married, I will be switching my phone off and leaving it at home for a week. I don't want the distraction during this precious moment in my life.

Get out of here! (I hope you're having a great time)

Ben added on

Changing line 90 to this:

% htaccess
RewriteCond %{REQUEST_URI} ^(/(?:[^/&]+/)*[_a-z0-9-]+)(?::\d+)?$

Seems to allow viewing of threads. When I post a reply, though, it throws a 403 Forbidden error for the file (using a URL of, for example,

I'm not particularly clued up with this stuff, I'm afraid, so I wouldn't recommend you change stuff, Monty, until someone who is clued up tells you it's safe to do so. I can't think of an instance where you wouldn't want to match a period, but there could be something I'm missing that led to it being included in the "do not match" brackets before.

append delete #23. Kroc

The reason periods are not matched in folder names is to avoid attacks against the server by sending a path querystring containing "../../../" &c. to get above the root and into the server's secure file system.

I can modify NNF to allow single dots in path names, as long as they are not followed by more dots. For now, yes, everything will just automagically work when you are not using the temporary address, and have the nameservers bound.

Kroc added on

P.S. Also, thank you greatly for everybody involved in highlighting the bug, you will be credited. I’ve not yet got everything set up at my new home, it will probably be a week yet before I put in new changes.

append delete #24. monty

The forum has gone live now at However it has not yet been publically announced, which is likely to happen over the weekend.

Thanks to all those who helped me get it set up; especially Kroc, of course, who had more pressing things to be doing during that time ...

append delete #25. monty

Hello again all,

The forum remains quiet for now and is likely to do so for another month or so. However I do have a particular request for help that you may be able to help me with.

There are a few technical contributers who would be keen to post detailed concepts on the forum, including images. Preferably not links to, but images embedded into it. Now I know I can manually edit posts to include linked images, but I wonder if there is a way to convert a linked image (perhaps from the file extension) into a img tag?

Thank you,



(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn