vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Upload of file failed. (Avatars, Attachments, etc...) (https://vborg.vbsupport.ru/showthread.php?t=321692)

thetechgenius 02-02-2016 06:17 PM

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?

Dave 02-02-2016 06:21 PM

My guess is that you forgot to chmod the directories to 777? (I assume you use filestorage?)

thetechgenius 02-02-2016 06:25 PM

Quote:

Originally Posted by Dave (Post 2564077)
My guess is that you forgot to chmod the directories to 777? (I assume you use filestorage?)

I have already chmod the customavatars directory to 777, and nothing changed, I still get the game error.

Dave 02-02-2016 06:26 PM

AdminCP > Maintenance > Diagnostics > Upload test > what does it say?

thetechgenius 02-02-2016 06:34 PM

Quote:

Originally Posted by Dave (Post 2564079)
AdminCP > Maintenance > Diagnostics > Upload test > what does it say?

I tried that too, when I run a Diagnostic on the Uploads, it says it found no errors when uploading the file. Its weird. I think it may be a setting in vBulletin and not the server configuration.

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. ".

squidsk 02-02-2016 08:53 PM

When you used chmod did you use the -R option to make it recursive and apply to all subdirectories?

thetechgenius 02-04-2016 07:04 PM

Quote:

Originally Posted by squidsk (Post 2564093)
When you used chmod did you use the -R option to make it recursive and apply to all subdirectories?

Yes I did.

squidsk 02-04-2016 08:39 PM

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.

RichieBoy67 02-05-2016 08:32 AM

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. :)

thetechgenius 02-05-2016 09:07 PM

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...).

RichieBoy67 02-05-2016 09:12 PM

Have you checked server logs?

Dave 02-05-2016 09:21 PM

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

thetechgenius 02-05-2016 09:54 PM

Quote:

Originally Posted by Dave (Post 2564298)
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

I updated all files and folders with the correct owner, and its still not working. It must be something with PHP. I am looking through the configs now.

RichieBoy67 02-05-2016 10:22 PM

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.

thetechgenius 02-05-2016 10:34 PM

Quote:

Originally Posted by RichieBoy67 (Post 2564302)
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.

I am downloading the server log now. Its a very big log file. But I will post the most up-to-date part of the file when its done.

Update: There is no mention of any errors coming from vbulletin in the error log.

RichieBoy67 02-05-2016 11:30 PM

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.

HM666 02-05-2016 11:54 PM

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.

thetechgenius 02-06-2016 01:53 AM

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!

HM666 02-06-2016 02:26 AM

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.

RichieBoy67 02-06-2016 06:02 AM

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.

squidsk 02-07-2016 12:59 AM

If you do an ls- l what are the owner and group listed? What is the user for your webserver software?

thetechgenius 02-07-2016 04:51 PM

Quote:

Originally Posted by squidsk (Post 2564362)
If you do an ls- l what are the owner and group listed? What is the user for your webserver software?

The owner and group for my website folder (public_html) is Root/Nobody, and the directories and files inside public_html are owned by my web user "ttg001".

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.

RichieBoy67 02-08-2016 05:54 AM

I am wondering if this is a firewall issue? Strange that you are not seeing any logs.

squidsk 02-08-2016 06:46 PM

You didn't answer what account your web software, presumable apache, runs on.

Run the command:
Code:

ps aux | egrep '(apache|httpd)'
The account associated with that process needs to be the one that has write access to your web files or uploads won't work.

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.

RichieBoy67 02-08-2016 09:36 PM

Quote:

Originally Posted by squidsk (Post 2564476)
You didn't answer what account your web software, presumable apache, runs on.

Run the command:
Code:

ps aux | egrep '(apache|httpd)'
The account associated with that process needs to be the one that has write access to your web files or uploads won't work.

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.

That is exactly what I was trying to say before only you said it much better. :) :up:

thetechgenius 02-17-2016 01:57 AM

Quote:

Originally Posted by squidsk (Post 2564476)
You didn't answer what account your web software, presumable apache, runs on.

Run the command:
Code:

ps aux | egrep '(apache|httpd)'
The account associated with that process needs to be the one that has write access to your web files or uploads won't work.

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.


This is the output from that command:

Code:



nobody  19550  0.0  0.0  61452  3512 ?        S    14:53  0:02 /usr/local/apache/bin/httpd

nobody  24232  0.0  0.0  61452  3448 ?        S    15:57  0:01 /usr/local/apache/bin/httpd

root    25895  0.0  0.0  59248  3276 ?        Ss  Feb05  0:55 /usr/local/apache/bin/httpd

nobody  29629  0.0  0.0  61452  3468 ?        S    17:32  0:00 /usr/local/apache/bin/httpd

nobody  29772  0.0  0.0  61460  3404 ?        S    17:35  0:00 /usr/local/apache/bin/httpd

nobody  29781  0.0  0.0  61456  3408 ?        S    17:35  0:00 /usr/local/apache/bin/httpd

nobody  29785  0.0  0.0  61596  3484 ?        S    17:35  0:00 /usr/local/apache/bin/httpd

nobody  29907  0.0  0.0  61560  3476 ?        S    17:38  0:00 /usr/local/apache/bin/httpd

nobody  29909  0.0  0.0  61456  3400 ?        S    17:38  0:00 /usr/local/apache/bin/httpd

nobody  29910  0.0  0.0  61540  3436 ?        S    17:38  0:00 /usr/local/apache/bin/httpd

nobody  29923  0.0  0.0  61452  3308 ?        S    17:38  0:00 /usr/local/apache/bin/httpd

root    30792  0.0  0.0 103312  880 pts/1    S+  17:55  0:00 egrep (apache|httpd)

It seems that Root is running Apache/HTTPD. But the way that CentOS Web Panel installs, it installs everything for you.

webmastersun 02-17-2016 05:08 AM

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.

thetechgenius 04-23-2016 03:12 PM

Quote:

Originally Posted by webmastersun (Post 2565088)
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.

What do you mean? What else can I try to fix it?


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
  • Page Generation 0.01350 seconds
  • Memory Usage 1,812KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (28)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete