Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Can't stay Logged in to admin: Forbidden error: error saving page


Reply


42 Posts   8618 Views

Avatar
Yulia

Community Member, 26 Posts

11 March 2009 at 9:59am

same error...

Avatar
Double-A-Ron

Community Member, 604 Posts

11 March 2009 at 10:25am

Ok. That means that <Location sessions> is the problem. You are obviously on something different to Web Architect. So go back a bit and try this:

1. Add the save_path line back to your php.ini file so you are matching what Web Architect did.
2. Delete the entire <Location sessions> block from the htaccess file.
3. Try browsing to http://mysite.com/sessions you'll probably get something displayed. Also, the site should function fine.
4. Add another htaccess file inside the sessions directory itself with the following contents:

Order Deny,Allow
Deny from all

5. Try browsing to http://mysite.com/sessions again - you should get a forbidden error
6. Test the Silverstripe site for any issues

Aaron

Avatar
Yulia

Community Member, 26 Posts

11 March 2009 at 1:02pm

Amazing!

Thank you!!! :)

Avatar
Yulia

Community Member, 26 Posts

19 March 2009 at 5:55am

OK

I don't know if this has to do something with it. It seemed working fine for the past couple of days. And now it is throwing at me another error, when i am trying to log in.

Redirecting to /cms/code/LeftAndMain.php, line 1114

And then i am back to log in screen.

I wonder if that has to do something with sessions time out or something in that matter? I created my own php.ini file, as i don't have access to php.ini on the host.

register_argc_argv = on; (that seemed to fix other issue with php.ini on the host)
session.save_path = /.../sessions;

Any any ideas why does it happen? At least where should i even look?

Thank you!

Avatar
ryanwachtl

Community Member, 46 Posts

19 March 2009 at 6:11am

Hi Yulia,

Just wanted to get clarification on a couple of things.

1. Do you have your 'php.ini' file in your /cgi-bin folder?

2. What permissions do you have set for your 'sessions' folder?

I'd be happy to look at your php.ini file and .htaccess file and compare them to my own. You could attach them and edit anything out that you don't want to share or you could email them to me. studio.wachtl(at)gmail(dot com)

Avatar
Yulia

Community Member, 26 Posts

19 March 2009 at 6:34am

Edited: 19/03/2009 6:56am

OK

htaccess:

### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /silverstripe

RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$

RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
### SILVERSTRIPE END ###

php.ini

register_argc_argv = on;
session.save_path = /.../sessions;

As i mentioned... i think i mentioned. My client has sharing host on Network Solutions. And i don't have the access to php.ini. All i doing if i am doing something is rewriting.

Sessions permissions set 775 (as high as it can get, they said)

php.ini is in /cgi-bin folder

that would be great if you can help me with it.

Thank you

Oh, my email gallardiah(at)gmail(dot)com

Avatar
Yulia

Community Member, 26 Posts

19 March 2009 at 12:30pm

turned out to be Malware on server

scary...

Avatar
Double-A-Ron

Community Member, 604 Posts

19 March 2009 at 12:33pm

Inside the Silverstripe installation? Or elsewhere?

Aaron