Support Forum

Error on Uploading Custom Avatars and seemingly with "plupload" plugin

RY Ryan
Ryan
Member

Hi,

It appears there is a problem with plupload and uploading  custom avatars on my website, I’m getting a bunch of error log entries coming from simple press as as seen below:

 

[30-Apr-2015 12:17:23 Europe/London] PHP Warning – scandir(/problem-with-post-edit-buttonome/account/public_html/wp-content/forum-image-uploads/USER88/): failed to open dir: No such file or directory – file: unt/public_html/wp-content/sp-resources/forum-plugins/plupload/ahah/sp-plupload-attachments-display.php – line: 28 – function: scandir

[30-Apr-2015 12:17:23 Europe/London] PHP Warning: scandir(/problem-with-post-edit-buttonome/account/public_html/wp-content/forum-image-uploads/USER88/): failed to open dir: No such file or directory in /problem-with-post-edit-buttonome/account/public_html/wp-content/sp-resources/forum-plugins/plupload/ahah/sp-plupload-attachments-display.php on line 28

[30-Apr-2015 12:17:23 Europe/London] PHP Warning – scandir(): (errno 2): No such file or directory – file: unt/public_html/wp-content/sp-resources/forum-plugins/plupload/ahah/sp-plupload-attachments-display.php – line: 28 – function: scandir

[30-Apr-2015 12:17:23 Europe/London] PHP Warning: scandir(): (errno 2): No such file or directory in /problem-with-post-edit-buttonome/account/public_html/wp-content/sp-resources/forum-plugins/plupload/ahah/sp-plupload-attachments-display.php on line 28

[30-Apr-2015 12:17:23 Europe/London] PHP Warning – Invalid argument supplied for foreach() – file: unt/public_html/wp-content/sp-resources/forum-plugins/plupload/ahah/sp-plupload-attachments-display.php – line: 32 – function: include_once

[30-Apr-2015 12:17:23 Europe/London] PHP Warning: Invalid argument supplied for foreach() in /problem-with-post-edit-buttonome/account/public_html/wp-content/sp-resources/forum-plugins/plupload/ahah/sp-plupload-attachments-display.php on line 32

 

It seems to be trimming my account name by 4 letters in some parts…

22 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Account name? Are you referring to the USER88 part? And what should the account name be? Any odd characters on it? Something the OS can not deal with? And does the folder with the full account name exist in the server at that location?

YS Yellow Swordfish
Yellow Swordfish
Member

Sorry – I should have also asked what this has to do with Avatars as those warnings bear no relation to Avatars…

RY Ryan
Ryan
Member

Yellow Swordfish said

Account name? Are you referring to the USER88 part? And what should the account name be? Any odd characters on it? Something the OS can not deal with? And does the folder with the full account name exist in the server at that location?

The following:

/problem-with-post-edit-buttonome/account/public_html/

Gets replaced with:

unt/public_html/

In several places for some reason, my account name for my hosting is plain English characters. The server is using a common webserver Linux distro of centos

 

As for Avatar I meant forum uploads, my bad.

YS Yellow Swordfish
Yellow Swordfish
Member

That is, I believe you will find, a red herring and has to do with a truncation issue in the error message handling. The warning is actually stating that this folder:

/problem-with-post-edit-buttonome/account/public_html/wp-content/forum-image-uploads/USER88/

does not exist.

So the question is still the same. Does it exist? If so – it may be the permission setting that is stopping it being read. Or – if it does not exist, it might be the permission stting that is stopping it being created. Can you find which it is?

RY Ryan
Ryan
Member

Yellow Swordfish said

That is, I believe you will find, a red herring and has to do with a truncation issue in the error message handling. The warning is actually stating that this folder:

/problem-with-post-edit-buttonome/account/public_html/wp-content/forum-image-uploads/USER88/

does not exist.

So the question is still the same. Does it exist? If so – it may be the permission setting that is stopping it being read. Or – if it does not exist, it might be the permission stting that is stopping it being created. Can you find which it is?

The forum image uploads exists but the individual username folders don’t exist, i don’t see why it can’t make them.

IK Ike
Ike
Member

What are the permissions on the forum-image-uploads folder?

RY Ryan
Ryan
Member

Ike said
What are the permissions on the forum-image-uploads folder?

Hi Ike,

Here are the current permissions.

MP Mr Papa
Mr Papa
Member

and for sp-resources? same?  also for both, what is the uid/gid?  again, compared to wp-content…

RY Ryan
Ryan
Member

Mr Papa said
and for sp-resources? same?  also for both, what is the uid/gid?  again, compared to wp-content…

sp-resources is 755, exactly the same as that last one.

I have no idea about uid/gid… where do I find that?

YS Yellow Swordfish
Yellow Swordfish
Member

To be honest if this were me I would ask my host support if they can see any reason why we would not be able to create the user folders needed. Probably get the quickest answer and, fingers crossed, maybe a solution..

RY Ryan
Ryan
Member

Hi,

My host would like to know what action triggers this bit of code to run as I and they can’t see what makes that part run.

YS Yellow Swordfish
Yellow Swordfish
Member

Which bit of code? Surely the only bit that matters is the code that attempts to create the folder that is missing. Would that be the bit you want?

RY Ryan
Ryan
Member

Yellow Swordfish said

Which bit of code? Surely the only bit that matters is the code that attempts to create the folder that is missing. Would that be the bit you want?

How do I recreate the scenario of simple-press trying to create a folder… like what is being done to make that folder? Is it avatar upload, an attachment… I can’t work out what it is.

My host thinks the problem is within the Simple Press Upload plugin because it’s trimming the directory incorrectly somehow.

[13-May-2015 12:01:09 Europe/London] PHP Warning – scandir(/problem-with-post-edit-buttonome/account1/public_html/wp-content/forum-image-uploads/mario3lia/): failed to open dir: No such file or directory – file: count1/public_html/wp-content/sp-resources/forum-plugins/plupload/ahah/sp-plupload-attachments-display.php – line: 28 – function: scandir

The folder is missing the first 2 letters of the hosting account name “account1” is named “count1”

EDIT: I found how to recreate it over and over (profile > attachments > click on the three directory trees)

YS Yellow Swordfish
Yellow Swordfish
Member

I covered this way back in the thread., It has nothing to do with the account name in the path. That is a red herring, The problem is in creating the final folder. Look at the actual text of the error:

scandir(/problem-with-post-edit-buttonome/account1/public_html/wp-content/forum-image-uploads/mario3lia/): failed to open dir: No such file or directory

There is nothing wrong with the path…

As to the question – what code is used to create the folder – then Simple:Press uses the core WordPress function wp_mkdir_p().