Save configuration - keeps resetting to default

Hi guys, thanks for viewing this topic…

This issue is really starting to stress me out. I have a configuration page on my website, in which i have to log-in to. Once i enter my configuration settings and click on “save configuration”, it sends me back to my admin log-in page and doesn’t store my new settings.

Here is the code:

[php]> [/php]

The code looks right to me, i don’t think the issue is here. I think it is somewhere else in my script. I was hoping that somebody might be able to suggest a place to look or a term to search in my script to find the part that keeps sending me back.

If you need to see certain part of code, i will post it here if i have.

Thanks for all replies,

Andy

“Hairline receding an inch every day” - LOL :slight_smile:

to stay logged in, you need to accept cookies. check your browser configuration.

Hey, thanks for the reply.

My browser does accept cookies and just to be sure, i put my website into the exceptions menu and put ‘allow’.

Unfortunately, this did not solve my problem. I am 100% sure it has something to do with my script. Maybe a Save_session or something?

Could there be something wrong in the database?

Field | Type | Collation | Attributes | Null | Default | Extra
submit | datetime | | | Yes | NULL |

try this in top of your page which displays the form.

// Change the session timeout value to 30 minutes // 86060 = 8 hours
ini_set(’session.gc_maxlifetime’, 30*60);

if the script redirect you to the login page time after time this is absolute a session problem.

I found the problem… i think?

[php]// session_start();

/*
* Change default settings if the appropriate values has been set via
* Settings' RE API
*/

$re_set_list = array(

‘re_set_avail_paths’, ‘re_set_total_size’, ‘re_set_can_upload’,
‘re_set_max_size’, ‘re_set_allow_override’, ‘re_set_avail_files’,
‘re_set_not_avail_files’, ‘re_set_avail_images’, ‘re_set_not_avail_images’,
‘re_set_max_image_size’, ‘re_set_max_flash_size’, ‘re_set_can_create_dir’,
‘re_set_can_rename_dir’, ‘re_set_can_delete_dir’, ‘re_set_can_rename_file’,
‘re_set_can_delete_file’

);

foreach ($re_set_list as $re_set_item) {
	if (isset($_SESSION[$re_set_item.'_sess']) &&
		$_SESSION[$re_set_item.'_sess'] != 'default') {
		$$re_set_item = $_SESSION[$re_set_item.'_sess'];
	}
}

?>[/php]

By the looks of things, the above code is set to put things back to default. What do i put in replace to the reset item = default?

Thanks,

Andy

This is the full file:

[php]<?php
/*

Check here if users have permission to uploading/renaming/deleting files/folders
Eg you can check here a session var, or records in your DB. It depends on
security policy on your sites or in your web applications

Example:

session_start();
if (!$_SESSION['user_authorized']) {
	echo 'You are not allowed to work with files';
	echo ' on server using the WYSIWYG editor!';
	exit;
}

*/

/*
* Rich Editor settings defining permissions to files/dirs on server
*
* You can change their values manually or read them from DB or/and
* session variables to make them changable in your applications
*/


/*
* Common
*/

/*
* defines paths available for performing any actions (upload, rename, etc)
* The actions are permitted in folders which paths start with one of them
* If not set then any path is available
* Eg: array('/user_files/john/'); //this path is relative to site root
*  or array('../user_files/john/'); //this path is relative to folder class
*/
$re_set_avail_paths = array();

/*
* defines max size (in bytes) available for all files in folder for uploading
* including subfolders
* No restriction if set to 0
*/
$re_set_total_size = 0;

/*
* Common
*/


/*
* Uploading
*/

/*
* user is permitted to upload files on server
* (the rest of uploading settings is applied if this one set to true only)
*/
$re_set_can_upload = true;

/*
* set max size (in bytes) of uploaded file available (-1 if no restrictions)
*/
$re_set_max_size = -1;

/*
* set permission to upload if file with the same name exists yet
*/
$re_set_allow_override = true;

/*
* file extensions available for uploading and renaming (all if not set)
* Eg: $re_set_avail_files = array ('zip', 'txt');
*/
$re_set_avail_files = array();

/*
* file extensions not available for uploading and renaming
* (no restrictions if not set). Higher priority then $re_set_avail_files!
* Eg: $re_set_not_avail_files = array ('php', 'pl');
*/
$re_set_not_avail_files = array();

/*
* types of images available for uploading and renaming (all if not set)
* possible values: 'jpg', 'gif', 'png', 'bmp'
* Eg: $re_set_avail_images = array ('jpg', 'gif', 'png');
*/
$re_set_avail_images = array();

/*
* types of images not available for uploading and renaming
* (no restrictions if not set). Higher priority then $re_set_avail_images!
* possible values: 'jpg', 'gif', 'png', 'bmp'
* Eg: $re_set_not_avail_images = array ('bmp', 'gif');
*/
$re_set_not_avail_images = array();

/*
* max size of images available for uploading (0s if no restrictions)
* set as array (width, height)
*/
$re_set_max_image_size = array(0, 0);

/*
* max size of flash files available for uploading (0s if no restrictions)
* set as array (width, height)
*/
$re_set_max_flash_size = array(0, 0);

/*
* Uploading
*/


/*
* File browser
*/

/*
* set permission to create folders
*/
$re_set_can_create_dir = true;

/*
* set permission to rename folders
*/
$re_set_can_rename_dir = true;

/*
* set permission to delete folders
*/
$re_set_can_delete_dir = true;

/*
* set permission to rename files
*/
$re_set_can_rename_file = true;

/*
* set permission to delete files
*/
$re_set_can_delete_file = true;

/*
* File browser
*/


/*
* uncomment the following line if you need to use not only these default
* settings, but Settings' RE API as well, as it requires sessions
* Or you can uncomment it for all cases if you always use sessions
*
* Initially commented as sessions are not required by RE, but if
* sessions are not configured correctly on your server a warning will be
* printed by PHP every time session_start() is called
*/

// session_start();

/*
* Change default settings if the appropriate values has been set via
* Settings' RE API
*/

$re_set_list = array(

‘re_set_avail_paths’, ‘re_set_total_size’, ‘re_set_can_upload’,
‘re_set_max_size’, ‘re_set_allow_override’, ‘re_set_avail_files’,
‘re_set_not_avail_files’, ‘re_set_avail_images’, ‘re_set_not_avail_images’,
‘re_set_max_image_size’, ‘re_set_max_flash_size’, ‘re_set_can_create_dir’,
‘re_set_can_rename_dir’, ‘re_set_can_delete_dir’, ‘re_set_can_rename_file’,
‘re_set_can_delete_file’

);

foreach ($re_set_list as $re_set_item) {
	if (isset($_SESSION[$re_set_item.'_sess']) &&
		$_SESSION[$re_set_item.'_sess'] != 'default') {
		$$re_set_item = $_SESSION[$re_set_item.'_sess'];
	}
}

?>[/php]

My browser does accept cookies and just to be sure, i put my website into the exceptions menu and put ‘allow’

problem solved, it seems all of the issues was on Godaddy’s side. I have changed hosting companies and all is working.

Thanks for the help though,

Andy

Sponsor our Newsletter | Privacy Policy | Terms of Service