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

long Thread titles makes internal error 500

Discussion in 'Troubleshooting and Problems' started by zadow, Feb 12, 2013.

  1. zadow

    zadow Member

    Just installed xenforo today.
    version 1.1.3
    have this with or with out my addons hide links to guest.

    Having only one trouble.

    dont know what is wrong, but when i make an thread, thats longer than 40 letters.
    i get this.

    Also if press back, to edit and make an thread thats smaller than 40 letters, it makes the thread ok.
    then in the child forum, both threads are there, also the one that gave me the error.

    first i thought i was permissions, but they where ok.

    so contacted my isp.
    only thing in the log was this

    Premature end of script headers: index.php
    He said there cant be anything wrong in hes end.

    so must be an php problem.

    i ran file check all ok, also server error in admin nothing?

    using php version 5.4

  2. zadow

    zadow Member

    no one that can have an clue , what to do. (n)
  3. tenants

    tenants Well-Known Member

    Do you have debug/development turned on
    If so, see this: http://xenforo.com/community/threads/php-5-4-bug.29835/

    If not, a few things I would do:

    i) Is error logging for php turned on? (is there a file saved on the server named "error")
    ii) Do you have cpanel installed... if so, can you look at the cpanel error log (there are some times errors / warnings that go unnoticed until you look here)
    iii) What plugins do you have installed, have you tried turning ALL of them off to see if you still get this error

    Does this happen for particular pages (special characters in the title?), if so... do you have a link to one of those pages (eg, one of the ones with over 40 characters)
  4. zadow

    zadow Member

    i had this error before installing any plugins,

    i only have the error.php that came with the installation
    i have Pm you an link for the error

    i have cpanel installed nothing shows in the error log
    happends with any letters if its longer than 40 letters i get an error
    little update
    tried to add the following lines to htacces that came with the install

    php_flag log_errors on
    php_value error_log /var/www/html/php-error.log //with my real path
    got the internal 500 error just by clicking my site??
    permission 644 it have
  5. tenants

    tenants Well-Known Member

    More info on the apache error:


    1) Has there been a recent server upgrade to php5.4 (residual option in the httpd.conf)
    2) I don't think you will be hitting resource limits (a string limit, not a resource limit)
    3) Appche Error logs would be useful, can you ask your host to look for them, or turn on error logging?

    It's a real hassle when there are no logs at all

    I've tested this on my own envionement, php 5.4 (but it's Windows).. I didn't see this issue. I also dont see this issue on my Apache server, but I do see it on your site

    On your site, I've noticed:

    doesn't produce the error:

    does produces the Internal error:

    doesn't produce the error:

    so when index.php? is present, the url seems to be hitting a limit (29 + 65)
    Dropping the www made no difference, it seems to be a limit of the index.php args (over 64.. or 2^6)

    ... so the args for index.php (and others) are getting chopped in the header on your server... but why?

    Is this a 32 bit of 64 bit server?

    Could you also you try turning on friendlily urls (no index.php?)... I doubt this will help, but it's worth a try
    Jake Bunce likes this.
  6. zadow

    zadow Member

    cant say my isp didnt write about that.

    not sure how to turn friendly urls on.
    simply delete it ?
    Can you elaborate that.
  7. tenants

    tenants Well-Known Member

    It's one of the SEO options in ACP... like I say, I dont think this will help (but just give it a try)

    ACP >> Options >> SEO options >> Turn on friendly urls (you can give it a try then turn it back after)
    Jake Bunce and zadow like this.
  8. zadow

    zadow Member

    :cool: your the best, that fixed it .
  9. tenants

    tenants Well-Known Member


    It still sounds like a real bug, but not for all environments

    If you could get your environment details from your host (Apache version, PHP version, Operating System)
    Then report it here:

    (telling them that it goes away for threads when friendly urls are turned on / point to this thread)
  10. zadow

    zadow Member

    ill ask them for the details.
    maybe they can add a options in admin, in the next release to set max thread lenght.
  11. tenants

    tenants Well-Known Member

    That's hard coded in the datawriter (I think it's set to 100)... It would be nice to be able to set this in the ACP, so yes... I think this enhancement has been suggested before.

    But still, you shouldn't be getting this error when you go over 64 chars in a thread title (when friendly urls are turned off)
  12. zadow

    zadow Member

    true just tested , getting no errors with 64 chars.
    When on, hope i get some server answers
  13. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    This would be a server restriction of some kind. Probably some kind of hardener like suhosin or mod_security. The 500 error is returned by the web server itself, not XenForo. You will need to consult with your host or server person to examine the logs on the server to find the cause.
    tenants likes this.
  14. cclaerhout

    cclaerhout Well-Known Member

    If it's suhosin, try this addon and write down the values you get.
    My personal values:
    > suhosin.post.max_vars: 4252
    > suhosin.request.max_vars: 4252
    > suhosin.request.max_value_length: 66000
    > suhosin.get.max_value_length: 1024
    Jake Bunce and tenants like this.

Share This Page