[Trac] Re: Installing Trac using FastCGI in a shared hosting environment

2007-06-28 Thread Eric Anderson

On Jun 28, 6:56 am, Graham Dumpleton [EMAIL PROTECTED]
wrote:
 Don't set PYTHONPATH like that as it is too late by then. Instead use:

   import sys
   sys.path.insert(0, /home/pix/lib/clearsilver/lib)

 That you are inserting site-packages directories for two different
 Python versions looks very bad.

I thought that was odd also but that is the path the trac install put
it under. Anyway thanks to your help I now have it running under CGI.
Now my next task is FastCGI.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~--~~~~--~~--~--~---



[Trac] Clearing Sample Data

2007-06-28 Thread Eric Anderson

When setting up a new trac environment it comes with a bunch of sample
data. It seems to be 4 milestones and the Trac manual. Is there anyway
I can get it to not do this? Right now I am manually deleting each
wiki page but that is time consuming. I am hoping to setup a trac
environment for each project I work on and really don't want to do
this on every project. I can live with the milestones but the wiki is
a pain.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~--~~~~--~~--~--~---



[Trac] Re: Clearing Sample Data

2007-06-28 Thread Eric Anderson

On Jun 28, 10:44 am, Eli Carter [EMAIL PROTECTED] wrote:
 The wiki pages provide the help text for the system; it is not recommended
 that you remove those.

If I want help I'll go to the main website. I'll keep key pages in
there (page index, recent changes, wiki formatting) but most of that
stuff is just annoying and in the way.

 The sample milestones and components can be removed by a script around
 trac-admin.  (Not saying that's ideal, just that that's what can be done at
 the moment.)

I think wiki pages can also be managed via trac-admin so perhaps I
just need to craft a script that uses trac-admin convert the default
environment to my preferred default environment.

Thanks for the advice,

Eric


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~--~~~~--~~--~--~---



[Trac] Installing Trac using FastCGI in a shared hosting environment

2007-06-27 Thread Eric Anderson

Not sure if this is the right place to post a installation question so
please tell me where to post if this is the wrong place.

I am trying to install the latest stable version of Trac on my shared
hosting environment (Site5 to be specific). My basic steps were:

1. Download Trac
2. Run the install with the --prefix option to install in a directory
I can manage
3. Download ClearSilver
4. Install with the --prefix option to install where I desire
5. Create a Trac environment for my project

Now at this point I can run tracd and I have a working installation of
Trac. But I would like to make trac use Apache/FastCGI instead of
tracd but at least I know it is basically working. I'm attempting
plain CGI first before I throw in FastCGI to the mix.

To get tracd working all I had to do was update my PYTHONPATH to
include the libraries installed for trac and update my LD_LIBRARY_PATH
to include the ClearSilver libraries. So my assumption is the CGI
needs the same environment variables set so it can find the necessary
libraries. So I my next steps are:

1. Symlink the directories my webserver looks loads to the htdocs and
cgi-bin directory in trac. That way the resources and scripts are
available.
2. Create a .htaccess file that looks like the following so that
trac.cgi is always run unless a resource requested exists:

###
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ cgi-bin/trac.cgi [QSA,L]
###

The .htaccess file was mostly borrowed from the way rails redirects to
it's dispatch file. This may be overkill and I may just need to
redirect a request for / to cgi-bin/trac.cgi.

3. Added the following to start of trac.cgi so the environment
variables are set right:

##
import os
os.environ['LD_LIBRARY_PATH'] = /home/pix/lib/clearsilver/lib
os.environ['PYTHONPATH'] = /home/pix/apps/trac/lib/python2.4/site-
packages:/home/pix/lib/clearsilver/lib:/usr/lib/python2.3/site-
packages
os.environ['TRAC_ENV_PARENT_DIR'] = /home/pix/projects
##

The end result of this is when I make I request I get back:

##
Oops...

Trac detected an internal error: No module named trac.web

Traceback (most recent call last):
  File trac.cgi, line 24, in ?
from trac.web import cgi_frontend
ImportError: No module named trac.web
##

I assume this means that it cannot find the trac libraries but it
should since I am setting PYTHONPATH the same as my shell environment.
I am not knowledgeable at on on Python. Just wanting to setup Trac so
I thought maybe someone here might have a suggestion.

Any help would be greatly appreciated.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~--~~~~--~~--~--~---