Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Inline Images 1.3 (with ThickBox)
This discussion has been closed.
Comments
In checking my error logs, I found the following error:
[error] PHP Warning: readfile(/home/username/public_html/domain/tickets/uploads/Attachments/2007/03/1av-1517.gif) [function.readfile]: failed to open stream: No such file or directory in /home/username/public_html/domain/tickets/extensions/Attachments/default.php on line 377
Line 377 is:
readfile($FolderPath);
In my Attachments settings, I have the desired filepath for the attachments as follows:
/home/username/public_html/domain/tickets/uploads/Attachments/%year%/%month%/%userid%
Whenever I upload a file, it is correctly creating the necessary folders, down to and including the user ID folder. But, when the script is looking for the file, it stops looking when it reaches the month folder, and never makes it down to the user ID folder; hence the filepath issue.
Any ideas on a fix for this?
The Attachments extension is doing its job of creating all of the folders that I've specified in the settings, and putting the attachment where it's supposed to be.
The problem appears to be with the Inline Images extension not recursing all the way through the entire folder path to find the file and display it.
I've checked via FTP and all of the folders are there (Attachments->2007->3->1), and the uploaded images are in the '1' folder. The Inline Images extension stop recursing through folders at the month (3) folder when looking for the image, so the image comes up 404 and all I get is the text in the post.
On another note, I've tried downloading and saving both images that I've uploaded as a test. Both images are unable to be opened by any program (Windows Picture Viewer, Irfanview, Photoshop, etc.). All programs are complaining about being unable to read the header format of the file, or that it's an unknown file type. Both are .gif files and I can open the original versions just fine. Only the ones downloaded from my Vanilla install seem to be corrupt.
I remember reading a post yesterday about someone having the same type problem with an Excel file that had been attached to a post. Need to find that thread and see if there's a solution for this problem.
<br / > <b>Warning</b>: readfile(/home/username/public_html/domain/tickets/uploads/Attachments/2007/03/1GoneFishing2.gif) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: No such file or directory in <b>/home/username/public_html/domain/tickets/extensions/Attachments/default.php</b> on line <b>377</b><br />
I've changed the structure in my attachment settings to only 2 levels deep (year/userid), and have done another test post. The image shows up fine now, and the ThickBox works as well with it.
It sounds like the Attachments extension will create all of the folders (3 levels deep), but it and the Inline Images extension are only able to retrieve files from 2 levels deep. Perhaps a note should be included that it only works with a 2-level folder structure (year/month or year/id) so that others don't have this problem?
Just Attachment extension installed.
Store the jpg image to /%year%/%month%/%userid%/
Download the image, works perfect
Install Inline images and Thickbox
Works perfect.
Just as its suppose to
Can u check ur settings.php and check what do u have for this variable
$Configuration['ATTACHMENTS_UPLOAD_PATH']
So in short we are NOT able to replicate your problem and such we cannot help you with it.
Look at the error ur getting
readfile(/home/username/public_html/domain/tickets/uploads/Attachments/2007/03/1GoneFishing2.gif
its missing a forwardslash after the user ID. if the forwardslash is there it WILL work.
clear ur cache, check ur $Configuration['ATTACHMENTS_UPLOAD_PATH'] and make sure it has the forward slash
Posted: Thursday, 8 March 2007 at 10:11AM (AEDT)