I just installed MyBB 1.8 on my new webhost, so it's a fresh installation.
Everything else seems to check out fine, no errors in the "Tools & Maintenance"-area (all green) and posting and using the forum is fine.
But adding image-attachments to any post is impossible, I've tried both jpg and png. But pdf works and I suppose other file formats do too, that aren't images.
When I click the add attachment-button this is the screen I am greeted with:
When I reload that page I come to a page that says: "Can not upload file - Too large for php post_max_size directive. Please press the back button."
But I've checked the related php values and 50 MB is the max size of post and upload, so I find it hard to believe that is the actual problem.
When I check the uploads folder on the server it seems the file is uploaded with the extension .attach, so file uploading may actually work but something else is faltering?
2014-10-16, 12:43 PM (This post was last modified: 2014-10-16, 12:44 PM by Darth Apple.)
Hmm... interesting. What webhost are you using, or are you using a self configured server?
I'm not sure if you're greeted with an actual PHP error or just a MyBB message when the page is reloaded. Blank pages generally indicate that PHP error displaying is disabled. If that's the case, you can enable MyBB to display errors temporarily by editing global.php and adding this to the top. It's not going to solve your problem, but might help disclose more information as to what's causing the issue.
2014-10-16, 06:33 PM (This post was last modified: 2014-10-16, 06:43 PM by silverkors.
Edit Reason: forgott to mention the module when writing about htaccess
)
Big thanks Destroy666!
But it doesn't work, I've had the myBB htaccess-file turned on all of the time. I even installed it on another domain at the same host and it didn't work even before I did any customizations (the included htaccess turns that module off).
The thing that bugs me is that my wordpress-installation kan upload the pictures with it's ajax uploader without any problem.
I will contact the hosts support to see if they have any ideas on what to do. Thank you again!
Another interesting thing I found out is that all the images I've tried to upload are there, in the "uploads/201410" folder, so they are actually uploaded but then something gets stuck!
2014-10-16, 08:02 PM (This post was last modified: 2014-10-16, 08:14 PM by Destroy666.)
(2014-10-16, 06:33 PM)silverkors Wrote: But it doesn't work, I've had the myBB htaccess-file turned on all of the time. I even installed it on another domain at the same host and it didn't work even before I did any customizations (the included htaccess turns that module off).
What do you mean by 'turned on'? Are you sure you're using the default MyBB .htaccess file (no extension, dot at the beginning)? Asking because as I can see you still have the .txt file: http://bitkoine.se/htaccess.txt which does basically nothing.
If yes, please provide a temporary account with ACP access in PM.
2014-10-16, 08:21 PM (This post was last modified: 2014-10-16, 08:35 PM by Destroy666.)
I renamed the htaccess back to a txt-file again when I was about to add the options you suggested to the htaccess-file and discovered that the htaccess (provided with the installation) already had those options disabled.
I have put the .htaccess back once more and I will send you ACP details.
To be really clear about what I have as an .htaccess right, it is this:
Options -MultiViews +FollowSymlinks -Indexes
#
# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
# MediaTemple, it is known to cause random Internal Server
# errors. For MediaTemple, please remove the block below
#
<IfModule mod_security.c>
# Turn off mod_security filtering.
SecFilterEngine Off
# The below probably isn't needed, but better safe than sorry.
SecFilterScanPOST Off
</IfModule>
#
# MyBB "search engine friendly" URL rewrites
# - Note, for these to work with MyBB please make sure you have
# the setting enabled in the Admin CP and you have this file
# named .htaccess
#
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]
RewriteRule ^thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
RewriteRule ^thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
RewriteRule ^thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
RewriteRule ^thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
RewriteRule ^thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
RewriteRule ^thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
RewriteRule ^thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]
RewriteRule ^post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]
RewriteRule ^announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]
RewriteRule ^user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]
RewriteRule ^calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]
RewriteRule ^event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]
<IfModule mod_env.c>
SetEnv SEO_SUPPORT 1
</IfModule>
</IfModule>
#
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
#
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript text/css text/html text/xml
</IfModule>
2014-10-16, 08:46 PM (This post was last modified: 2014-10-16, 08:47 PM by Destroy666.)
Please put long code between [code] tags (edited your post).
Anyways, so far I can see you got other problems as well:
- ACP -> Tools & Maintenance -> Recount & Rebuild -> Rebuild Attachment Thumbnails = blank page
- ACP -> Tools & Maintenance -> Optimise Database -> Select All = 403 error
I'd also like to see the most recent content of your error.log file.
2014-10-18, 07:26 AM (This post was last modified: 2014-10-18, 08:53 AM by silverkors.
Edit Reason: Added the info about my ugly IM hack
)
Thanks for editing my post with edit-blocks.
I can't access the error.log by myself so I have sent and e-mail to the hosts support, but they haven't responded yet.
So I started playing the "commenting out code to find the problem"-game.
If I comment out one line in "functions_image.php" the attachments-process works but I get no thumbnail.
It works if I comment out this line in the function "check_thumbnail_memory":
@ini_set("memory_limit", $memory_limit);
It is at the very end nested in the if statement that checks if the thumbnail_memory is larger than free_memory.
But I don't know enough PHP to have any idea why this is.
---
Update: I did an ugly ImageMagick-hack so right now thumbnail-generation works (and also the regeneration button in the Tools-section). But If would rather use the real MyBB way of doing it.