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.

Uploading avatar shows white screen (forum/profile/picture?)

edited January 2017 in Vanilla 2.0 - 2.8

Hey everyone,

I decided to try and set up a Vanilla forum for my website today but I'm running into a problem. I've managed to set up pretty much everything, but when I try to upload an avatar I just get a white screen.

Steps:

I enabled debug mode, no errors show up. Seems like a PHP syntax error. All permissions are set correctly and recursively on the uploads, conf and cache folders. I'm running PHP 5.6.24.

Any ideas?

Comments

  • hgtonighthgtonight ∞ · New Moderator

    What is the response code in your browser? White screens tend to be a 500 error which would be logged on your server error log.

    I would start there.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Post you htaccess file, give real link to your site, inform us what theme and plugins you have enabled. You should be able to see the exact error from the server error console where you host your files.

  • edited January 2017

    Ah thanks for the tips, the error log displays this:

    [27-Jan-2017 13:52:37 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 14000 bytes) in /home/lepel/public_html/forum/library/core/class.uploadimage.php on line 242

    Which is a bit weird, it has an allowed memory size of 33554432 bytes and failed while trying to allocate 14000 bytes.

    Link to my forum: https://www.lepel.tv/forum/
    Theme: Embed-friendly (but modified to display my own header and footer)
    Plugins: Advanced Editor, All Viewed, Emoji Sets, Gravatar, Profile Extender, Quotes, Split/Merge, Stop Forum Spam

    .htacces (added a redirect to "https://www", not in code block because it bugged out):

    Modified

    If you modify this file then change the above line to: # Modified


    RewriteEngine On

    RewriteCond %{HTTPS} off
    # First rewrite to HTTPS:
    # Don't put www. here. If it is already there it will be included, if not
    # the subsequent rule will catch it.
    RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    # Now, rewrite any request to the wrong domain to use www.
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
    # 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 /forum
    
    RewriteCond %{QUERY_STRING} ^p=/?([^&]+)(&([^?]+))?$
    RewriteRule ^index\.php %1?%3 [E=X_REWRITE:1,L]
    
    # The basic rewrite rule.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,E=X_REWRITE:1,E=X_PATH_INFO:/$1,L]
    
    # Add the proper X_REWRITE server variable for rewritten requests.
    RewriteCond %{ENV:REDIRECT_X_REWRITE} .+
    RewriteCond %{ENV:REDIRECT_X_PATH_INFO} (.+)
    RewriteRule ^index\.php - [QSA,E=X_REWRITE:1,E=!REDIRECT_X_REWRITE,E=X_PATH_INFO:%1,E=!REDIRECT_X_PATH_INFO,L]
    
    # 301 redirect urls that start with index.php
    #RewriteCond %{REQUEST_METHOD} GET [NC]
    #RewriteCond %{REQUEST_URI} ^(.*?)/index\.php(.*)$
    #RewriteRule ^index\.php /%1%2 [QSA,R,L]
    
    RewriteRule ^.well-known(.*)$ - [L,NC]
    



    Header set Cache-Control "max-age=315360000"
    Header set Expires "31 December 2037 23:59:59 GMT"

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    OK make me a test account called test-user and send me the login info and I will take a look when I get a chance

  • hgtonighthgtonight ∞ · New Moderator

    @lepelchannel said:
    Ah thanks for the tips, the error log displays this:

    [27-Jan-2017 13:52:37 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 14000 bytes) in /home/lepel/public_html/forum/library/core/class.uploadimage.php on line 242

    Which is a bit weird, it has an allowed memory size of 33554432 bytes and failed while trying to allocate 14000 bytes.

    That line just means it went over the limit when it tried to allocate 14000 bytes. 33554432 bytes is 32 megabytes which is a little low. Try increasing that.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • @hgtonight said:

    @lepelchannel said:
    Ah thanks for the tips, the error log displays this:

    [27-Jan-2017 13:52:37 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 14000 bytes) in /home/lepel/public_html/forum/library/core/class.uploadimage.php on line 242

    Which is a bit weird, it has an allowed memory size of 33554432 bytes and failed while trying to allocate 14000 bytes.

    That line just means it went over the limit when it tried to allocate 14000 bytes. 33554432 bytes is 32 megabytes which is a little low. Try increasing that.

    Thanks hgtonight, I increased it from 32M to 128M just to be sure, and that fixed it! I have a pretty decent server so the higher limit shouldn't cause problems.

    Vrijvlinder ook bedankt voor de geboden hulp, gelukkig is het opgelost!

  • @hgtonight said:

    That line just means it went over the limit when it tried to allocate 14000 bytes. 33554432 bytes is 32 megabytes which is a little low. Try increasing that.

    Hi all! I've been trying to troubleshoot files failing to upload, but I don't know how to increase my memory limit.

    Is there some place in specific I would be able to find that?

    Thanks in advance :)

  • R_JR_J Ex-Fanboy Munich Admin

    How you can do that in the end depends a little bit on the way you are hosting your forum. Normally you do that by changing you php.ini

    https://www.ecosia.org/search?q=php+increase+memory+size

Sign In or Register to comment.