MyBB Community Forums

Full Version: Problem with attachment.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello dear !!

MyBB version : (1.6.15)
Site URL : www.dotainternational.com

Problem :
I am facing a strange tye of error whose cause is out of my understanding. My error.txt file increases to a size of about 1,866,915,981 Bytes (1.8 GB Approx) in just 2-3 days. When I open that text file here is the error I get.

<error>
	<dateline>1408713476</dateline>
	<script>attachment.php</script>
	<line>162</line>
	<type>2</type>
	<friendly_type>Warning</friendly_type>
	<message>fopen(./uploads/201308/post_5_1377955282_f72deeec0712de70c8ae685ec37b677c.attach) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory</message>
</error>

<error>
	<dateline>1408713476</dateline>
	<script>attachment.php</script>
	<line>163</line>
	<type>2</type>
	<friendly_type>Warning</friendly_type>
	<message>feof(): supplied argument is not a valid stream resource</message>
</error>

<error>
	<dateline>1408713476</dateline>
	<script>attachment.php</script>
	<line>165</line>
	<type>2</type>
	<friendly_type>Warning</friendly_type>
	<message>fread(): supplied argument is not a valid stream resource</message>
</error>

<error>
	<dateline>1408713476</dateline>
	<script>attachment.php</script>
	<line>163</line>
	<type>2</type>
	<friendly_type>Warning</friendly_type>
	<message>feof(): supplied argument is not a valid stream resource</message>
</error>

<error>
	<dateline>1408713476</dateline>
	<script>attachment.php</script>
	<line>165</line>
	<type>2</type>
	<friendly_type>Warning</friendly_type>
	<message>fread(): supplied argument is not a valid stream resource</message>
</error>

<error>
	<dateline>1408713476</dateline>
	<script>attachment.php</script>
	<line>163</line>
	<type>2</type>
	<friendly_type>Warning</friendly_type>
	<message>feof(): supplied argument is not a valid stream resource</message>
</error>

<error>
	<dateline>1408713476</dateline>
	<script>attachment.php</script>
	<line>165</line>
	<type>2</type>
	<friendly_type>Warning</friendly_type>
	<message>fread(): supplied argument is not a valid stream resource</message>
</error>


This error is spread all over in error.txt file in my ftp account. I have to manually delete it from FTP after each 2-3 days. Can anyone help me getting rid of this issue ?
Does your uploads folder have the correct permissions?  The uploads directory should be chmodded to 777.  You can check this using your FTP account. [docs]1.8/install[/docs]
No it was 755. I have set it to 777 now. I hope now it will get fine ?
Also The link you gave is about 1.8 ???
I am using 1.6 latest version... Will this solution work for 1.6.15 ????
^ that documentation is also applicable to earlier versions of MyBB (eg. 1.6.15)
Try searching for orphan attachments in your ACP. It will delete attachments that are broken somehow.
I've updated all the permissions. I've got the point that they are searching for orphan attachments in documents, What I do not understand is, how can this stop attachments from searching orphan attachment.

I'll look again in next 1-2 days and see if this issue is gone.

Bro, still I am getting this error. The same error stated above. Same code same text. I have checked it in detail and all the folder permissions are set, as it was described in above document. But still error persists....
Have you removed the orphan attachments successfully?
(2014-08-29, 08:09 AM)StefanT Wrote: [ -> ]Have you removed the orphan attachments successfully?

No I did not, how can I remove those ?


Edit : I just removed those in Forum &Posts >> Attachments >> Find orphaned attachments >> Delete all orphaned attachments. Now I am waiting to see if this removes the problem. Because I just check it before deleting orphaned attachments earlier and it was not fixed.
Thanks. Issue has been solved by removing orphaned attachments.