Jump to:

23001 Posts in 11854 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Can't stay Logged in to admin: Forbidden error: error saving page

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

Page: 1 2 3 4 5 6
Go to End
Author Topic: 7574 Views
  • Yulia
    Avatar
    Community Member
    26 Posts
  • Double-A-Ron
    Avatar
    Community Member
    603 Posts

    Re: Can't stay Logged in to admin: Forbidden error: error saving page Link to this post

    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

  • Yulia
    Avatar
    Community Member
    26 Posts

    Re: Can't stay Logged in to admin: Forbidden error: error saving page Link to this post

    Amazing!

    Thank you!!!

  • Yulia
    Avatar
    Community Member
    26 Posts

    Re: Can't stay Logged in to admin: Forbidden error: error saving page Link to this post

    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!

  • ryanwachtl
    Avatar
    Community Member
    46 Posts

    Re: Can't stay Logged in to admin: Forbidden error: error saving page Link to this post

    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)

  • Yulia
    Avatar
    Community Member
    26 Posts

    Re: Can't stay Logged in to admin: Forbidden error: error saving page Link to this post

    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

  • Yulia
    Avatar
    Community Member
    26 Posts

    Re: Can't stay Logged in to admin: Forbidden error: error saving page Link to this post

    turned out to be Malware on server

    scary...

  • Double-A-Ron
    Avatar
    Community Member
    603 Posts

    Re: Can't stay Logged in to admin: Forbidden error: error saving page Link to this post

    Inside the Silverstripe installation? Or elsewhere?

    Aaron

    7574 Views
Page: 1 2 3 4 5 6
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.