[SOLVED] ... The action you attempted is not permitted

PH

Joined: 2005-05-23
Posts: 8
Posted: Mon, 2005-05-23 09:52

Updated to beta 3 the other day an all been working fine. This morning I thought I would try the button at the bottom of the page [XHTML 1.0] it said I needed to AllowSessionAccess in config.php I found the area in the config file and made false true, then checked my gallery to see what the results where.

On clicking refresh on my browser I was like :o as I see the following message on screen.

Error (ERROR_PERMISSION_DENIED)

* in main.php at line 134 (gallerystatus::error)
* in main.php at line 86
* in main.php at line 77

Putting it back to false, resulted in the same message arrrgghhh what have I done :(

----

Gallery URL (optional): http://perryheath.com
Gallery version: 2.0-beta-3
Webserver (with version): Apache/2.0.54 (Unix)
Datatabase (with version): mysql 3.23.58
PHP version (eg 4.2.1): 4.3.11 apache2handler
phpinfo URL (optional):
Graphics Toolkit(s): ImageMagick, NetPBM, Gd
Operating system: Linux
Web browser/version: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
G1 version (for migration bugs):

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-05-23 10:19

if you really just put true back to false, then I'd just clear the cookies in your browser. i don't see any reason why it should have changed anything else.

 
PH

Joined: 2005-05-23
Posts: 8
Posted: Mon, 2005-05-23 11:24

Hi,

I have jus doubled checked that the config.php is how it was and still showing the same message. :(

here is my config.php

<?php
/*
 * $RCSfile: config.php-template,v $
 *
 * Gallery - a web based photo album viewer and editor
 * Copyright (C) 2000-2005 Bharat Mediratta
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

/*
 * As a security precaution, we limit access to Gallery's test suite
 * to those people who know the password, below.  Example:
 *
 *  $gallery->setConfig('setup.password', 'A PASSWORD');
 *
 * Choose something random and enter it in plain text.  You don't have to
 * remember it because you can always refer to this file.  You'll only be asked
 * for this password when you run Gallery's lib/tools code.  We don't provide a
 * default password because we want you to choose one of your own (which
 * lessens the chance that you'll get hacked).
 */
$gallery->setConfig('setup.password', '***************************');

/*
 * In order for Gallery to manage your data, you must provide it with
 * a directory that it can write to.  Gallery is a webserver application,
 * so the directory that you create must be writeable by the
 * webserver, not just by you.
 *
 * Create an empty directory anywhere you please.  Gallery will fill this
 * directory with its own files (that you shouldn't mess with).  This directory
 * can be anywhere on your filesystem.  For security purposes, it's better
 * if the directory is not accessible via your webserver (ie, it should
 * not be in your DocumentRoot).  If you *do* make it available via your
 * web server then you probably won't have any security for your data files.
 *
 * Don't make this the same as your gallery directory!
 */
$gallery->setConfig('data.gallery.base', '/home/perryhea/perryheath.com/html/gallery2/g2data');

/*
 * Gallery can store its data in multiple different back ends.  Currently we
 * support MySQL, PostgreSQL and Oracle.  Enter the hostname where your
 * database lives, and the username and password you use to connect to it.
 *
 * You must specify the name of a database that already exists.  Gallery will
 * not create the database for you, because it's very difficult to do that in
 * a reliable, database-neutral fashion.  The user that you use should have
 * the following permissions:
 *
 *    SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER
 *
 * You must specify a table and column prefix.  This is a few characters that
 * is prepended to any table or column name to avoid conflicting with reserved
 * words in the database or other tables you have in the same database.  In
 * fact, it's fine to let Gallery uses the same database as other applications
 * (including other instances of Gallery itself); the prefix is enough
 * to distinguish Gallery's tables from other applications.
 *
 * We provide some reasonable default prefixes below.  If you modify these
 * after Gallery has created its various tables, it will stop working until
 * you modify it back.
 *
 * The possible database types are:
 *  mysql        Standard MySQL
 *  mysqlt       MySQL with transactions (3.23.34a and newer)
 *  postgres     PostgreSQL 6.x (not rigorously tested)
 *  postgres7    PostgreSQL 7.x
 *  oci8po       Oracle (9i and newer)
 */
$storeConfig['type'] = 'mysql';
$storeConfig['hostname'] = 'localhost';
$storeConfig['database'] = '*******************';
$storeConfig['username'] = '*******************';
$storeConfig['password'] = '*******************';
$storeConfig['tablePrefix'] = 'g2_';
$storeConfig['columnPrefix'] = 'g_';
$storeConfig['usePersistentConnections'] = false;
$gallery->setConfig('storage.config', $storeConfig);

/*
 * Put Gallery into debug mode.  Useful for tracking down problems with the
 * application.  Not a good idea to leave it this way, though.  Possible debug
 * choices are: 'buffered', 'logged', 'immediate' or false.  Don't forget to
 * use the quotes for any value but false!
 *
 * If you choose 'immediate', you'll see debugging information as soon as
 * Gallery generates it.  This can be useful at times, but it'll screw up some
 * parts of the application flow.
 *
 * If you choose 'buffered', Gallery will display debug information in a table
 * as part of the application.  You won't necessarily get *all* the debug
 * information but the application should work normally.
 *
 * If you choose 'logged', you must also specify:
 *    $gallery->setDebugLogFile('/path/to/writeable/file');
 * and all debug output will get printed into that file.  You'll get all the
 * debug output and the application will work normally.
 *
 * For best debugging output use this line:
 *
 * $gallery->setDebug('buffered');
 *
 */
$gallery->setDebug(false);

/*
 * Profiling mode.  You can enable profiling for different parts of G2 to get an
 * idea of what's fast and slow.  Right now the only options are to enable SQL
 * profiling:
 *
 * $gallery->setProfile(array('sql'));
 *
 */
$gallery->setProfile(false);

/*
 * Embedded mode.  You can disable direct access to main.php (standalone G2)
 * by setting this this flag to true.
 */
$gallery->setConfig('mode.embed.only', true);

/*
 * Allow a particular IP address to access the session (it still must know the
 * session id) even though it doesn't match the address/user agent that created
 * the session.  Put the address of validator.w3.org ('128.30.52.13') here to allow
 * validation of non-public Gallery pages from the links at the bottom of the page.
 */
$gallery->setConfig('allowSessionAccess', false);

/*
 * Used by the installer to distinguish multiple sites supported by one codebase.
 */
$gallery->setConfig('galleryId', 'www.perryheath.com/gallery2');
?>

Maybe its changed something more?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-05-23 11:53

$gallery->setConfig('mode.embed.only', true);

-> set this to false. it has to do with embedding and not with anything else. and even if you have G2 embedded, if you set this to true, you can't access G2 in standalone anymore.

 
PH

Joined: 2005-05-23
Posts: 8
Posted: Mon, 2005-05-23 13:53

Great all working again.

Thank you very much valiant!!!

 
cnmuranjan
cnmuranjan's picture

Joined: 2005-05-17
Posts: 39
Posted: Mon, 2005-05-23 13:54

Hi PH !

here we go:

Quote:
$gallery->setConfig('allowSessionAccess', '128.30.52.13');

Try this..
After successful validation, u may browse ur G2 from any xHTML 1.0 compatible browser (in my case, built in browser in N6230)

regards,

-- Chinmay