Home : Products : Gossamer Links : PHP Front End :

Products: Gossamer Links: PHP Front End: Re: [Riley] page.php? Can someone assist with this: Edit Log

Here is the list of edits for this post
Re: [Riley] page.php? Can someone assist with this
In Reply To:
Okay so should I be editing the file located at mint_php/globals.txt or the one at mint_php/local/globals.txt ??
It's best you don't edit the globals.txt (or language.txt) directly. You should do it in the admin. But if you do edit the directly, you should be changing the template/local/globals.txt. If you add/del/modify globals from the admin, they will be saved in the local directory (same with templates as well). This is so that when you upgrade, your templates that you've modified don't get overwritten.

In Reply To:
Note: The mint_php directory is is set to 777 , the local directory is set to 777 global.txt file in both directorys is set to 644...is this correct?
You need to have the permissions set so that the httpd user (usually nobody) can read and write to the files/directory. If you don't know what user it runs as, then the files in the template directory should be set to 777 as well.

In Reply To:
A fatal error has occured: GT::Config (24538): Unable to open '/home/www/docs/www.dr7.com/cgi-bin/links_SQL/admin/templates/mint_php/local/globals.txt' for writing: Permission denied. at /home/www/docs/www.dr7.com/cgi-bin/links_SQL/admin/Links/Tools.pm line 355.
The user that the httpd runs as doesn't have enough permissions to write to the file. You probably want to chmod 777 the globals.txt.

In Reply To:
Sorry I am very confused here and need a step by step to resolve this error, thanks Adrian
  • Fix the permission error by chmod 777 the files in the template directory (including local)
  • Then you should now be able to add globals in the admin.
    You'll want to type in:
    referrer
    in the Code field (the left one)
    Then:
    Code:
    create_function("", '
    global $HTTP_SERVER_VARS;
    return isset($HTTP_SERVER_VARS["HTTP_REFERER"]) ? $HTTP_SERVER_VARS["HTTP_REFERER"] : "nowhere";
    ');
    in the Description field (middle)
    Then Save changes.

    Remember that with the PHP templates, and the globals for these PHP templates, you can use any valid PHP code. You CAN'T use Perl code in the templates or the globals.

    Adrian
  • Last edited by:

    brewt: Feb 20, 2002, 12:00 AM

    Edit Log: