1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error when updating Style Properties

Discussion in 'Troubleshooting and Problems' started by xFalcon, Dec 8, 2010.

  1. xFalcon

    xFalcon Member

    On my clean install I made a copy of the default style and attempted to change some of the Style Properties. However when I try to change anything, I get the following message:

    Security error occurred. Please press back, refresh the page, and try again.

    I re-installed from scratch again just to double check.. however the same problem remains. Any ideas or anyone who has come across this before?

    Thanks guys.
  2. xFalcon

    xFalcon Member

    I've just realised my host is running PHP version 5.2.10. I will see if they can update it. Reckon this is the cause?

    The requirements.php script still says the requirements are met.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That is within the requirements (PHP 5.2.4 or higher).

    The error is likely the result of a stale security token. Was the page idle for a long time before you submitted the changes? That would explain the error.

    The error shouldn't persist. Try refreshing the page and making your changes again.
  4. xFalcon

    xFalcon Member

    Oh so it is! Sorry for the stupid moment.

    Anyway, the page definitely is not stale - it was only loaded about 10 seconds before I made changes and tried to change. Thanks for the suggestion though!
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Sorry I didn't see this part when I read your post.

    Can you provide instructions to reproduce the problem? Does it only happen on a particular style property page?

    I'm gonna take a guess too... does your PHP configuration have suhosin installed? Try uploading the phpinfo file I have attached. Load that file in your browser and search for 'suhosin' on the page.

    Attached Files:

  6. xFalcon

    xFalcon Member

    Bingo - "This server is protected with the Suhosin Extension 0.9.27"

    Is it incompatible?
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Sort of. It can truncate forms with lots of fields (like the style property forms). This is very likely causing your problem.

    You can ask your host to remove suhosin from the PHP configuration. Or try adjusting the configuration yourself by creating a '.htaccess' file in your forum directory with this code:

    php_value suhosin.request.max_vars 2048
    php_value suhosin.post.max_vars 2048
    Brogan likes this.
  8. xFalcon

    xFalcon Member

    Adding this .htaccess file in my forum directory seems to open a can of worms for me. My forum is installed in a subdirectory of a wordpress install.. after adding the .htaccess file, entering the forum URL triggers a Wordpress "Page not found" splash page.

    Anyway, this NEW problem isn't a XenForo issue as such so I will try sort that out and report back...
    What a palaver...
  9. xFalcon

    xFalcon Member

    Alright, wordpress situation sorted. However my next issue is - the standard .htaccess file has the following code in it after a fresh install

    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^(data|js|styles|install) - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    If I replace this file with a new.htaccess file, with the code you suggest, I just get a 500 Internal Server Error. Adding the new code on to the end of the existing code doesn't work either.
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You are talking about the suhosin code right? The 500 error might just mean your server doesn't allow you to change those settings via .htaccess. You may have to deal with your host. Ask them to get rid of suhosin. Or move to a new server without suhosin.
  11. xFalcon

    xFalcon Member

    Hmm.. I don't like my chances in asking them to remove it.. but I'll have a go...

    I am wondering if there is anything which could be changed with the forum code itself to get around this problem? I imagine Suhosin would be pretty common on shared hosting servers?
  12. xFalcon

    xFalcon Member

    Well they actually did what I asked! They disabled it and now it all works perfectly. Thanks a lot for the hot tips Jake! :)
    In my opinion there definitely should be a notice or information about Suhosin in the error code if possible.
  13. melbo

    melbo Well-Known Member

    Gotta love it when a host accommodates their customer.
  14. Jonathan Carl

    Jonathan Carl Active Member

    I ran into the same problem, and right before i contacted my host I found another way to Disable it.

    in the .htaccess file:

    <Files ".ht*">
    deny from all
    suPHP_ConfigPath /home/(yourusername)

    then create a php.ini in the root directory with:

    suhosin.simulation = On

    Worked perfectly for me.
    Jake Bunce likes this.

Share This Page