Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Error 500 in discussion

Hello guys I new use vanilla (in fact today download it!), I cant install and configured all, its very easy, but when I create a new discussion I get a error 500

I use a Centos 7 Server, with Apache 2.4.6 and vanilla 2.2 all other features works well, but I cant see a discussion, including that comes by default.

In other post I read about debugger, I activate Debugger By Mark O'Sullivan and download Kpr - Krumo Print Debugger By Debra Venckus, but I do not know how to see the error in the log

Tagged:

Comments

  • The URL is index.php?p=/discussion/3/hello

  • @jasilva

    Welcome to the community.

    With debug turned on, when you try to visit a forum page, Vanilla will show you details of the error it encountered.

    I don't think a 500 error is a Vanilla issue.

    You need to look at your web server error logs.

    If you don't know how to do that, contact your web host for help.

  • @whu606 said:
    @jasilva

    Welcome to the community.

    With debug turned on, when you try to visit a forum page, Vanilla will show you details of the error it encountered.

    I don't think a 500 error is a Vanilla issue.

    You need to look at your web server error logs.

    If you don't know how to do that, contact your web host for help.

    Thanks for your reply.

    When I visit any page a can see the log in the bottom of the page like:

    Debug Information
    Canonical Url: http://192.168.122.1/vanilla/index.php?p=/categories
    8 queries in 0.038735866546631s
    

    But In discussion I get a Blank Page in Firefox, and error 500 in Chrome, for example when I visit this URL

    /vanilla/index.php?p=/discussion/4/test?new=1
    
  • Please post the contents of your htacess file

  • The file is in this position

    /var/www/html/vanilla/.htaccess
    

    And contains

    # Original
    # If you modify this file then change the above line to: # Modified
    <IfModule mod_rewrite.c>
       RewriteEngine On
       # Certain hosts may require the following line.
       # If vanilla is in a subfolder then you need to specify it after the /.
       # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
       # RewriteBase /
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    
  • jasilvajasilva New
    edited February 2016

    @vrijvlinder said:
    Please post the contents of your htacess file

    I did not touch the file. I might miss activate an Apache module

    I post it in another comment (I could not find the edit button)

  • edited February 2016

    Change the file to this, and then check config.php for this line, report after what happened.

    $Configuration['Garden']['RewriteUrls']= TRUE;

    # Modified
    # If you modify this file then change the above line to: # Modified
    <IfModule mod_rewrite.c>
       RewriteEngine On
       # Certain hosts may require the following line.
       # If vanilla is in a subfolder then you need to specify it after the /.
       # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum or the name of subdirectory)
        RewriteBase /vanilla
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    
  • @vrijvlinder said:
    Change the file to this, and then check config.php for this line, report after what happened.

    $Configuration['Garden']['RewriteUrls']= TRUE;

    # Modified
    # If you modify this file then change the above line to: # Modified
    <IfModule mod_rewrite.c>
       RewriteEngine On
       # Certain hosts may require the following line.
       # If vanilla is in a subfolder then you need to specify it after the /.
       # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum or the name of subdirectory)
        RewriteBase /vanilla
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    

    Ok I change the .htacces file, and conf/config.php file $Configuration['Garden']['RewriteUrls']= TRUE; no exist so I add and restart the apache server. But I get other error

    Not Found

    The requested URL /vanilla/discussion/1/bam-you-ve-got-a-sweet-forum was not found on this server.

    I test other url,

    vanilla/activity
    vanilla/discussions
    vanilla/entry/register?Target=discussions
    vanilla/categories/general
    

    Present same error Not found

  • Look inside the CGI logs from the server to look at the errors…

    You must have some kind of misconfiguration in the the database or something like that.

  • @vrijvlinder said:
    Change the file to this, and then check config.php for this line, report after what happened.

    $Configuration['Garden']['RewriteUrls']= TRUE;

    # Modified
    # If you modify this file then change the above line to: # Modified
    <IfModule mod_rewrite.c>
       RewriteEngine On
       # Certain hosts may require the following line.
       # If vanilla is in a subfolder then you need to specify it after the /.
       # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum or the name of subdirectory)
        RewriteBase /vanilla
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    

    I found new information:

    When entering discussions url Centos send me an SELinux Alert:

    The source process /usr/sbin/httpd
    Attemted this acces: getattr
    On this file index.php 
    

    In the alert are many different files, for example

    The source process /usr/sbin/httpd
    Attemted this acces: read
    On this file localise.xml 
    
    The source process /usr/sbin/httpd
    Attemted this acces: write
    On this file a_dashboard_library_map.ini
    
    The source process /usr/sbin/httpd
    Attemted this acces: write
    On this directory /var/www/html/vanilla/cache
    
    The source process /usr/sbin/httpd
    Attemted this acces: remove_name
    On this directory 70211851556c23d787d976.tmp 
    

    What happen? I apply the permissions to folders in the tutorial

  • @vrijvlinder said:
    Is your forum located in /vanilla ?

    Yes

  • @vrijvlinder said:
    Is your forum located in /vanilla ?

    Ok I see this

    PHP Fatal error: Call to undefined function mb_detect_encoding() in /var/www/html/vanilla/library/vendors/simplehtmldom/simple_html_dom.php on line 988, referer: http://192.168.122.1/vanilla/index.php?p=/post/discussion

  • Try to delete the .ini files from the cache and turn debug mode off

  • @vrijvlinder said:
    Try to delete the .ini files from the cache and turn debug mode off

    Thanks I check it, I'll check at the time revive my site T_T. I killed him again

    I killed him again

    https://vanillaforums.org/discussion/31714/flagging-crash-the-site#latest

Sign In or Register to comment.