Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
strange problem when saving a page
#1
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
Reply
#2
I've already raised this with Chris , i think it migght be the same problem i'm having...
My Github Repos: Github
Website: DigiMute
Reply
#3
I just did a fresh install and when I try to save pages I too get:

Invalid Referer

What am I doing wrong?
Reply
#4
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
Reply
#5
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.
My Github Repos: Github
Website: DigiMute
Reply
#6
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;
        }
}
Reply
#7
I am also having the invalid referrer issue. I tried to change the code in changedata.php and my site went blank. Any thoughts?
Reply
#8
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.
Pete

Chefbyte Services
Reply
#9
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!
Reply
#10
Post 6 has the correct solution for this issue.
I just ran across it today.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#11
This is fixed in the SVN now. Thanks!
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#12
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)
Reply
#13
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!
Reply
#14
Seems to be working A-okay now.
Reply




Users browsing this thread: 1 Guest(s)