![]() |
Upload of file failed. (Avatars, Attachments, etc...)
I don't know why, but ever since I moved from a windows server to a linux server (Centos 6) I have had this problem.
When I try to upload an avatar or attachment, an error pops up and says - "Upload of file failed." Does anyone know why? |
My guess is that you forgot to chmod the directories to 777? (I assume you use filestorage?)
|
Quote:
|
AdminCP > Maintenance > Diagnostics > Upload test > what does it say?
|
Quote:
EDIT: Because I setup another small site a few months ago on the same server, its an Image Hosting site, I am using the CFImage Hosting script. And when I upload files/images on that site it works fine. Its hosted on the same server under one of my Sub Domains. Update: I have even tried creating a new directory to store all custom avatars and chmod it to 777, and updated vbulletin to use that directory, and moved all avatars to the new directory. vB shows all the avatars still, from the new directory, but I am still getting that Upload error. When I try to run an upload Diagnostic, it says "No errors occurred while opening the uploaded file for reading. ". |
When you used chmod did you use the -R option to make it recursive and apply to all subdirectories?
|
Quote:
|
What your php setting for the following two settings?
upload_max_filesize post_max_size You can look in your php.ini or bring up the php.ini in admincp. Are they bigger or smaller than the files you are trying to upload. |
Yeah, my guess is your server/php.ini settings as well. It could also be a file ownership issue depending on how you installed and set up the server and the site.
I ran into this a couple time with clients who uploaded everything through the admin user and then could not upload through vbulletin as it was under the domain user and not the admin. Hope this makes sense. :) |
The settings for upload_max_filesize and post_max_size are both set to 2GB.
I setup PHP myself. I can upload files fine in the AdminCP>Maintenance>Diagnostics> Upload, and it doesn't come up with any errors at all. Which is really weird if you ask me. Now I did move from a Windows 2008R2 Server, to a Linux CentOS Server. I backed up my entire user directory offsite, then I installed and configured CentOS on the server. Then installed the backup of my site. Everything seems to be working fine but these damn vB uploads (attachments, Avatars, etc...). |
Have you checked server logs?
|
The diagnostics upload tool uses the tmp directory to test the upload, it doesn't actually test it for the other folders vBulletin uses. My second guess is that your web-server or PHP doesn't have the right (group) permissions set to touch files in the document root.
You can refer to: http://serverfault.com/questions/644...u-14-04-1-ngin https://www.digitalocean.com/communi...s?answer=24893 |
Quote:
|
Yeah Dave, that is what I'm talking about, file ownership. The user for the site/domain has to have permissions for vbulletin to upload to the public directory.
Server logs would confirm this. |
Quote:
Update: There is no mention of any errors coming from vbulletin in the error log. |
Did you set up error logs for Vbulletin in the admincp? I am not sure if debugging would help but wouldn't hurt to try turning it on in the config for a few minutes.
|
Have you tried temporarily disabling the mods? Also in Linux have you set permissions for the directory that your site is in through the terminal? I know from my experience using Linux that sometimes if you try to do it anywhere else for some strange reason it will not take.
|
Yes, I have the vB logs write to a file. No logs to show. And yes, I disabled all mods in using the config file, and no luck there.
EDIT: I have tried everything I can think of right now. But I will fix it, some how, some way, eventually it will come to me, it always does. lol. Sorry for putting everyone through this, its just bugging me. I hate coming across a problem like this and not being able to fix it. I mean this is vBulletin, PHP, and Linux. How hard can it be? lol. I bet its nothing hard either, just a simple setting or configuration that is off (or on) that I overlooked. It always turns out that way with servers and web development. Its because there are so many settings and configs to keep track of, and all kinds of different services and scripts, and just one setting on any one of those could be the problem. I will have to look deep in the configs of my server and vB tomorrow. Oh and by the way, I own this server. Actually, my vB is running on multiple servers all at once. I have 5 servers setup, 1 for MySQL, 1 for Web Server (and other web related services), 1 for Network (Network Switch), 1 for Server Storage, and the last is for Offline Backup Storage. The backup storage server is not connected to the net, its just connected to the other servers locally. So if anyone have any ideas on how I can fix this problem with Uploading Avatars, Attachments, etc... That requires physical access to the server cabinet, let me know, because I do have physical access to the servers. And thank you, everyone that is trying there best to help me with this issue! |
You have your MySQL on a separate server from the web server where your files are stored? If so have you tried having the files & database on the same server. From past experience vBulletin does not usually play well when its split up between hosts or servers. So maybe, its a long shot, but that could be a potential problem unless you have some setup that caters to ensuring that it works separate.
|
Well a temporary fix would probably be to serve your attachments, etc from the database.
Strange that you are not showing anything in your logs. Maybe try to view your processes real time in the command console and try to upload at the same time. You just may catch the error there. |
If you do an ls- l what are the owner and group listed? What is the user for your webserver software?
|
Quote:
I am using CentOS Web Panel for my web control panel. And I tried to move all attachments, Avatars, etc.. to the database, and it still doesnt let me upload. But it still serves the Avatars though, I can see all users avatars just fine. But when you try to upload a new avatar, it comes up with that error (Upload of the file failed). I have also tried in combination with installing MySQL on the same server. But the database works either way. Just when I type in the host for MySQL in vB, I have to put the local IP of the server, instead of localhost. I dont know what could be the problem, I have checked all Permissions, and Ownership. CentOS Web Panel even has a built in option to fix all permissions and ownership for a user, just in case you transfer a file or folder using a root account, you can fix all permissions with a single click. |
I am wondering if this is a firewall issue? Strange that you are not seeing any logs.
|
You didn't answer what account your web software, presumable apache, runs on.
Run the command: Code:
ps aux | egrep '(apache|httpd)' For example, on standard ubuntu the web server software runs with the www-data account. If that account does not have write access to your forum folder you won't be able to upload into that folder. |
Quote:
|
Quote:
This is the output from that command: Code:
|
It was not by the problem on your server or some thing else that due to a config on your forum.
You forgot to change it when you moved to a new hosting. |
Quote:
|
All times are GMT. The time now is 08:18 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|