##
GForge 3.0 FAQ

###
Updated 6/20/2003

###
Suggestions are welcome.

Users FAQ
Administrators FAQ
Developers FAQ

## Users

1. I've submitted a new project request to GForge but it's not up yet. What gives?

   http://gforge.org/ isn't a hosting site - it's the home of the GForge project itself. If you want a project hosted somewhere, you might want to submit it to Sourceforge or Savannah.

2. How do I move an item from the bug tracker to the feature request tracker? Or from any tracker to any other tracker?

   First, give yourself admin rights on both trackers by clicking on the Tracker tab, clicking on the Admin link, clicking on the Bug tracker, click on "Add/Update Users & Permissions", and add yourself to the tracker. Do the same for the feature request tracker. Now click on the Tracker tab, click on the Bug tracker, click on the bug you want to move, and then select the Feature Request tracker from the "Data Type" dropdown box. Hit Submit and voila! It's moved.

## Administrators

1. I installed GForge, but when I point my browser to http://mygforgesite/, I think I'm getting an infinite redirection-loop since a dialog appears saying that the redirection limit has been exceeded.

   Is it possible that your database does not allow connections from the webserver host? Verify your pg_hba.conf file is configured. Also verify that you started postgres with the -i option. If that doesn't work, go into common/include/database.php and remove the @ sign from `$conn=@pg_pconnect` in db_connect() function call. This will print debug output for you.

   If that's not the problem, ensure that your php.ini file contains the entry `register_globals=on`.

2. I'm just get a blank screen when going to the front page.

   Be sure that php-pgsql is installed on your system.

3. On my RH 8.0 server the downloads don't work

   This is because download.php uses the slash as parameter. To make it work, modify the

       /etc/httpd/conf.d/php.conf:

       <Files *.php>
       SetOutputFilter PHP
       SetInputFilter PHP
       AcceptPathInfo On
       LimitRequestBody 5524288
       </Files>

4. I installed GForge, but when connecting to the site, I receive the error message: cannot connect to database:

   Be sure that postgres is running with the -i option:

   To start the postmaster you should have something like the following in /etc/init.d/postgresql

   `su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -o '-i' -p /usr/bin/postmaster start > /var/log/pgsql_log 2>&1" < /dev/null`

   Note that the -i is very important since it allows connections by TCP/IP on port 5432 by default.

   If you're using Mandrake Linux, please read the database installation notes for that distribution here - http://gforge.org/docman/display_doc.php/8/installation.html.

5. On my RH 8.0, /projects and /users don't work.

   Be sure that your

       /etc/httpd/conf.d/php.conf

   contains the following instructions:

       <Files projects>
           SetOutputFilter PHP
           SetInputFilter PHP
       AcceptPathInfo on
       </Files>

       <Files users>
           SetOutputFilter PHP
           SetInputFilter PHP
       AcceptPathInfo on
       </Files>

6. Approving a project results in a blank page with no errors

   Disable the LDAP support - i.e., in local.inc, set `$sys_use_ldap=0`.

7. What's the relationship between a GForge user account and a regular Unix user account?

   A user creates a new account by filling out a form with a username, password, email address and so on. An MD5 hash of the password gets put into the database tables and also used as a hyperlink with which the user can confirm the email address. So, initially, there's no connection.

   However, there are several scripts - like new_parse.pl - which can be used to create users and groups from the GForge projects and users. new_parse.pl isn't working right now, so you'll have to either create Unix users by hand or fix the script. If you do the latter, please share the fix via a patch.

8. How do I get rid of "Code snippets" and "Project Tree" tabs on the main page?

   You'll need to edit some code - specifically, `www/include/Layout.class`. Open this file, scroll down until you get to the line `function outerTabs($params)`. Now start editing - comment out the stuff that has to do with the things you want to remove. So, for example, if you wanted to remove the "Code Snippets", you could change the function to look like this:

       	function outerTabs($params) {
       		global $Language;
       		$TABS_DIRS[]='/';
       		$TABS_DIRS[]='/my/';
       		$TABS_DIRS[]='/softwaremap/';
       		//$TABS_DIRS[]='/snippet/';				<<<----- comment out this line
       		$TABS_DIRS[]='/people/';
       		$TABS_TITLES[]=$Language->getText('menu','home');
       		$TABS_TITLES[]=$Language->getText('menu','mypage');
       		$TABS_TITLES[]=$Language->getText('menu','projectree');
       		//$TABS_TITLES[]=$Language->getText('menu','code_snippet');		<<<----- and this line
       		$TABS_TITLES[]=$Language->getText('menu','project_help_wanted');

       		if (user_ismember(1,'A')) {
       			$TABS_DIRS[]='/admin/';
       			$TABS_TITLES[]=$Language->getText('menu','admin');
       		}
       		if ($params['group']) {
       			// get group info using the common result set
       			$project =& group_get_object($params['group']);
       			if ($project->isError()) {

       			} elseif (!$project->isProject()) {

       			} else {
       				$TABS_DIRS[]='/projects/'.$project->getUnixName().'/';
       				$TABS_TITLES[]=$project->getPublicName();
       				$selected=count($TABS_DIRS)-1;
       			}
       		} elseif (strstr($GLOBALS['REQUEST_URI'],'/my/') || strstr($GLOBALS['REQUEST_URI'],'/account/')) {
       			$selected=array_search("/my/", $TABS_DIRS);
       		} elseif (strstr($GLOBALS['REQUEST_URI'],'softwaremap')) {
       			$selected=array_search("/softwaremap/", $TABS_DIRS);
       		//} elseif (strstr($GLOBALS['REQUEST_URI'],'/snippet/')) {		<<<----- and these 2 lines
       		//	$selected=array_search("/snippet/", $TABS_DIRS);		<<<----- and these 2 lines
       		} elseif (strstr($GLOBALS['REQUEST_URI'],'/people/')) {
       			$selected=array_search("/people/", $TABS_DIRS);
       		} elseif (strstr($GLOBALS['REQUEST_URI'],'/admin/') && user_ismember(1,'A')) {
       			$selected=(count($TABS_DIRS)-1);
       		} else {
       			$selected=0;
       		}
       		echo $this->tabGenerator($TABS_DIRS,$TABS_TITLES,false,$selected,'#E0E0E0','100%');
       	}

9. My Postgres database is getting pretty big - is there a way to make it smaller?

   Sure, run `vacuumdb -f -z`, like this:

       [root@hal data]# vacuumdb -f -z -U gforge gforge
       VACUUM
       [root@hal data]#

   This does "full vacuuming" whatever that is, and also updates optimizer hints.

   Another suggestion is to dump and restore the database. If you've done so and would like to provide a step by step guide, please post to the forums, thanks!

10. To quote from a user who saw this problem: "I've been verifying the functions of my gforge installation. I've been able to create projects, add users, and get cvsweb working. I've successfully added to the Forums, Lists, Surveys, and News. I have not been able to make any additions to any of the Tracker categories, i.e. Bugs, Support Requests, etc. I'm able to fill out the template, but the information doesn't seem to make it into the database. Searches for bugs that I just created turn up no records."

    Check your php.ini file - ensure file_uploads = On.

11. Will GForge work with QMail?

    Yup, it should, as long as `/usr/sbin/sendmail` is symbolically linked to `/var/qmail/bin/sendmail`, which is the way qmail is usually installed.

12. How do I add a new license?

    Go to the site admin page and click on "Add to the Trove Map". Then select "License" in the top drop-down box and type in the rest of the information on your license in the other boxes. Then you can go to a project and select "Admin" and "Trove Categorization::Edit" to change the project to the new license.

13. When I update a task with a comment I get the following error:

        update():: AddMessage():: ERROR: pg_aclcheck: class "project_messa_project_messa_seq" not found.

    In fact, poking around my database a bit, there seem to be a lot of sequences missing. What gives?

    Are you running an old version of Postgres - i.e. 7.1? Since then, the maximum size of a sequence changed from an int to a long (when?) and the GForge database creation script is set up to use the newer limits. So, edit `db/gforge3.sql` and do a search and replace of `9223372036854775807` with `2147483647`. Then rerun `db/gforge3.sql` and see if the sequences get created and the problems go away.

    Note that if there are already some entries in those tables you might need to reset the sequence like this:

        select setval('project_messa_project_messa_seq',max(project_message_id)) from project_messages;

14. How can I get xinetd to work with pserver when --allow-root will only work with one or two entries?

    Change your `/etc/xinetd.d/cvspserver` to look like this:

        service cvspserver
        {
        disable = no
        socket_type = stream
        protocol = tcp
        wait = no
        user = root
        server = /usr/bin/mypserver.sh
        server_args = -f
        }

    And then add this little gem in as `/usr/bin/mypserver.sh`:

        #!/bin/sh
        /usr/bin/cvs -f `ls -d /cvsroot/* | sed -e '1,$s/.*/--allow-root=&/'` pserver

15. I've set up GForge on Apache behind a ProxyPass and now I'm getting infinite redirects!

    Try setting the `ProxyPreserveHost` directive to `On`:

        <VirtualHost *>
        ServerAdmin webmaster@myhost.com
        ServerName forge.myhost.com
        ErrorLog logs/forge.myhost.com.log
        CustomLog logs/forge.myhost.com-access.log common
        ProxyPass / http://192.168.1.13/
        ProxyPassReverse / http://192.168.1.13/
        ProxyPreserveHost On
        </VirtualHost>

16. When I try to upload large documents I get various PHP errors. How can I increase the maximum file upload size?

    Bump up the following parameters in `php.ini` as high as you want:

        ; Maximum allowed size for uploaded files.
        upload_max_filesize = 10M

        ; Maximum size of POST data that PHP will accept.
        post_max_size = 10M

        ; Maximum amount of memory a script may consume
        memory_limit = 10M

    Note that if you have set the `LimitRequestBody` directive in your `httpd.conf` you'll also need to raise that to a correspondingly high number.

## Developers

1. How can I check out the GForge code?

   You can check it out by typing:

       cvs -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/gforge login

   and hitting [enter] when prompted for a password. Then type

       cvs -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/gforge co gforge

   to actually check out the code. You can browse the CVS repository here and read a bit more about how to do checkouts and such here.
2. Now that I've checked out the code, how do I initialize the database?

   First apply `gforge3.sql`:

       psql -U gforge -f gforge3.sql gforge < gforge3.sql

   Then apply any .sql files that have occurred since the most recent release. For example, if you checked out GForge on 07 Jan 2003, you would apply gforge3.sql, and then, since pre8 was released on 30 Dec 2002, you'd also apply 20030102-drops.sql, 20030102.sql, 20030105.sql, and 20030107.sql.

   If you make some database changes and want to submit them back to the project, include a dated sql file in your patch. If you want to, you can supply a new version of gforge3.sql by:

   1. Creating a new DB and running all the recent SQL updates
   2. Add your changes
   3. Dump the DB using `pg_dump -s | grep ^-- > new_gforge3.sql` which should give you the database schema without comments.
3. How do I use diff to create a patch?

   If you've checked out the code, go to the top of the CVS tree and type `cvs diff -u > mydiff.diff`. Or, if you're diffing against a release, you can go to the directory above the original code and your modified code and type `diff -uNr original-gforge-3.0pre7/ modified-GForge-3.0pre7/`. This will result in something like:

       [tom@shire foo]$ diff -Nur f1 f2
       diff -Nur f1/foo.txt f2/foo.txt
       --- f1/foo.txt  Fri Dec 20 16:21:07 2002
       +++ f2/foo.txt  Fri Dec 20 16:21:19 2002
       @@ -1 +1 @@
       -helo
       +helo workld
       [tom@shire foo]$

   which you can then submit using the patch manager.
4. Is there an IRC channel where developers hang out?

   Yup, sure is, it's on irc.freenode.net:6667 on the channel #gforge.

5. How do I create a new theme?

   There's a separate HOWTO on this topic now - right here.

6. I've modified the documentation; how do I generate the PDF files?

   GForge uses Maven to generate the documentation. To use it:

   1. Install the latest Maven release (b9 as of today).
   2. Set up an environmental variable `MAVEN_HOME` to whereever you checked out the Maven code
   3. Add `$MAVEN_HOME/bin` to your PATH
   4. Run the `build-bootstrap.xml` Ant build script, i.e., `ant -f build-bootstrap.xml`
   5. When that's done, run `gforge/docs/xdocs/generate_docs.sh`.
   6. Now you've got a PDF file and a zip file full of HTML in the `gforge/docs/xdocs/` directory. Yay!
7. How can I get GForge to store its data in a MySQL database?

   You could do it, but why bother? To quote Tim Perdue - "GForge could not be made to run on the primitive MySQL database without serious hacking, and I won't accept those kinds of changes back into the system. For the amount of work involved in such a project, you'd be better off taking an hour to learn postgres. It's a superior database in every way, with the only point of debate being speed on simple 'hello world' type applications".

   It'd be a lot of work because:

   1. GForge uses Postgres stored procedures, so you'd have to convert those into PHP functions
   2. GForge uses Postgres functions like pg_connect, so you'd have to replace those with the MySQL equivalents
   3. GForge uses subselects, so you'd have to rewrite those to use temporary tables or whatever (MySQL 4.1 supports subselects, so once it becomes production-ready, this won't be a barrier anymore)