Error message

Notice: Undefined variable: _POST in include_once() (line 1 of /home3/esuninfo/public_html/atutility7/sites/all/themes/simplecorp/template.php).

Setup basic authorization on trac to protect all files

While trac is great, one thing I can't figure out is protect everything from anonymous to view. I can , however, remove all the permissions to the anonymous users in the admin, but that's troublesome, since you'll have to add them back to authenticated user.

So here's what I did to setup the basic authorization on Apache and Trac to protect everything.

  • Create the htpasswd file

    htpasswd -c /home/projects/myproject/conf/htpasswd admin

  • Change the apache virtual host config file:

    vi /etc/apache2/sites-enabled/sites

The easy way to setup trac on Ubuntu and connect with apache2

I'd been using trac to do project management for sometime. And I'm going to setup a new trac server on Ubuntu 12.04, I'd also like to use it through apache since my server's firewall blocks all other ports except 80. I'd read the docs of connect trac with Apache through fcgid, but it's very complex, so I decided to make it easier by using apache's proxy module.

  • Install trac:

    apt-get install trac

  • Create the project dir

    mkdir -p /home/projects/myproject trac-admin /home/projects/myproject initenv

PHP manual in PDF format

Recently I'm reading php manual, and I'd love to read it on my mobile phone and kindle as well. But there's no PDF format available to download, there are HTML files though, still I'd love to have PDF format so it'll be easier to read.

Here's the steps I create the PDF format of PHP manual

1.check out the php manual

svn checkout phpdoc
cd phpdoc
php doc-base/configure.php

2.Install phd on my Ubuntu 12.04, run the following as root

Remember user choices in multiple request/pages using jQuery and sessionStorage

Assuming user is filling in a form, and hit the refresh button or click a link accidently, too bad for user have to fill in it again. So how about remember the user choices/input, and pop that back into the form? will user filling happy about that?

Assuming it's a text input