GetSimple Support Forum

Full Version: strange problem when saving a page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello

I have a problem when I try to save a page I get the following error :mad:

Invalid Referer
-------
Invalid Referer: http://www.mywebsite.com.au/admin/edit.php?id=index

thanks in advance

Cheers
I've already raised this with Chris , i think it migght be the same problem i'm having...
I just did a fresh install and when I try to save pages I too get:

Invalid Referer

What am I doing wrong?
I don't know i have some website with getsimple and i dont have any problem.

I believe that it could be the server but im still looking for the solutions

What kind of server do u use ?

Cheers
Chris has already fixed this in the latest SVN.

Just tested and working fine.

If cannot get the latest SVN version and want to fix this now change lines 21-29 in changedata.php to the following.

Code:
// check form referrer - needs siteurl and edit.php in it.
if (isset($_SERVER['HTTP_REFERER'])) {
        if ( !(strpos(str_replace('http://www.', '', $SITEURL), $_SERVER['HTTP_REFERER']) === false) || !(strpos("edit.php", $_SERVER['HTTP_REFERER']) === false)) ){
                echo "<b>Invalid Referer</b><br />-------<br />";
                echo 'Invalid Referer: ' . $_SERVER['HTTP_REFERER'];
                die;
        }
}


Rgds,
Mike.
This worked perfectly. Thank you.

I think there is an extra ')' in the second if. Should read.

Code:
// check form referrer - needs siteurl and edit.php in it.
if (isset($_SERVER['HTTP_REFERER'])) {
        if ( !(strpos(str_replace('http://www.', '', $SITEURL), $_SERVER['HTTP_REFERER']) === false) || !(strpos("edit.php", $_SERVER['HTTP_REFERER']) === false)) {
                echo "<b>Invalid Referer</b><br />-------<br />";
                echo 'Invalid Referer: ' . $_SERVER['HTTP_REFERER'];
                die;
        }
}
I am also having the invalid referrer issue. I tried to change the code in changedata.php and my site went blank. Any thoughts?
tnyse Wrote:I am also having the invalid referrer issue. I tried to change the code in changedata.php and my site went blank. Any thoughts?

Sounds like you need to change the permissions to the file, to 777, then save the changes and then put the permissions back to what they were.
chefbyte Wrote:
tnyse Wrote:I am also having the invalid referrer issue. I tried to change the code in changedata.php and my site went blank. Any thoughts?

Sounds like you need to change the permissions to the file, to 777, then save the changes and then put the permissions back to what they were.

You were correct! Thank you sir!
Post 6 has the correct solution for this issue.
I just ran across it today.
This is fixed in the SVN now. Thanks!
Using 2.01 and ran into this problem. Used #6 and problem was solved

No problem in IE8, Fx3.6, Chrome 4.1 on Win7
Problem was on IE7 (I believe XP, didn't check)
Whenever I add a photo/URL and save the page, the "Opps! Page not found" text is displayed. I have made all three changes but nothing seems to fix it!
Seems to be working A-okay now.