Author Topic: "Error uploading file "file.png": Error moving file." when uploading avatar  (Read 15310 times)

0 Members and 1 Guest are viewing this topic.

spidey

  • Jr. Member
  • **
  • Posts: 1
There seems to be an issue when I try uploading an avatar on my Mibew Messenger 1.6.4.

I think it's because of CHMOD, if so, can you please tell me which files/directories need to be set to which level of CHMOD?
if not, can you tell me what the problem is?

If you require more information, please let me know!

Thanks!

faf

  • Mibew Staff Member
  • Native
  • *****
  • Posts: 951
    • Mibew Messenger
There seems to be an issue when I try uploading an avatar on my Mibew Messenger 1.6.4.

I think it's because of CHMOD, if so, can you please tell me which files/directories need to be set to which level of CHMOD?
if not, can you tell me what the problem is?

If you require more information, please let me know!

Thanks!

Yes, it's permissions issue. Avatars are stored in the images/avatar directory. So the webserver should be able to write there. There are a number of ways to do so, depending on webserver's OS and environment settings.

Quick, dirty, and wrong way is to change access mode to that directory to something like 0777 without changing ownership.

tezza

  • Jr. Member
  • **
  • Posts: 1
Same problem here, same error message.

I did CHMOD to 0777 on avatar directory, and images directory for good measure but still will not upload the image.  Is it possible to upload the image manually outside of the Mibew control panel?

faf

  • Mibew Staff Member
  • Native
  • *****
  • Posts: 951
    • Mibew Messenger
Well, everything is possible.  :)

But in this case you will also have to manually set the relative path to that avatar in the database (field vcavatar in table <prefix>chatoperator).

As for the error you've got... I'd recommend you to check all settings of your webserver related to file uploading and manipulation. I presume that it's something on that level.

Technobrarygeek

  • Jr. Member
  • **
  • Posts: 1
I am also having this issue.  I have full access to a VPS and cannot use the program to upload an avatar.  It seems the program can't upload an image (I have a number of other sites where "site" file uploading is not an issue) and the only way to manually add an avatar is to edit the database. Before I go stomping around in the database, I would like to know what needs to be changed in the database specifically.

Thanks

faf

  • Mibew Staff Member
  • Native
  • *****
  • Posts: 951
    • Mibew Messenger
It seems the program can't upload an image (I have a number of other sites where "site" file uploading is not an issue) and the only way to manually add an avatar is to edit the database.

Mibew uses standard move_uploaded_file function to handle uploaded avatar. Maybe there are some reasons why uploaded avatar cannot be moved...  ???

Probably you can try to change @move_uploaded_file with the move_uploaded_file and check out any warnings that could occur.

Before I go stomping around in the database, I would like to know what needs to be changed in the database specifically.

As it was written above, there is a table <prefix>chatoperator that contains all operators' data. The field vcavatar stands for avatar image. So, if you know the location of the avatar you could set the value of that field manually.

For example, if the URL of the avatar is http:// <your domain>/<path to your Mibew>/images/avatar/1.jpg, the value of vcavatar field should be /<path to your Mibew>/images/avatar/1.jpg