Attachment Images Not Showing

Need help with your forum? Ask away. Remember though that there's always http://www.phpbb.com/community

Moderator: Experts

Post Reply
chughes
Posts: 4
Joined: Tue Aug 04, 2009 4:35 am

Attachment Images Not Showing

Post by chughes »

Hi,

I can see from browsing the internet that this is a common problem. But so far none of the solutions that I have found for other people have worked for me. I have just recently created a personal phpBB3 forum at http://hughespage.net/forum for my family. You might not be able to access it since I am still working on it and dont always expose the port to the internet. On my home local network, I can access the forum and everything works fine accept the jpg images that I try to attach. I just end up with a post that displays the name of the image file.jpg and that's it, not the actual picture.

I am using Windows Server 2008, IIS 7.0, MySQL 5.0.84, and phpBB 3.0.5. The image files that I try to upload from inside the forum post do show up in the default phpBB3 files folder for attachments where they should on the web server. Although the name has been changed to a long string of letters. I do have ImageMagick installed and I can open each file that has been uploaded onto the server from windows. I have played around with permissions with no luck. The attachments option in the ACP is enabled.

From inside the post, once I have browsed to the image file that I want to upload and click Add File, it shows a link of the file's name that I can even click on. But then I get an error message: The selected attachment does not exist anymore, even though it clearly shows the correct directory and file name that is on the server in the error message.

I was hoping you might have some ideas on how to help,

Chris
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Attachment Images Not Showing

Post by DavidIQ »

I would suspect there is something amiss with permissions. Should be read/write for the files directory.
chughes
Posts: 4
Joined: Tue Aug 04, 2009 4:35 am

Re: Attachment Images Not Showing

Post by chughes »

Thanks for your response.

Since I am using Windows Server 2008, I tried to change the folder's security settings in the GUI. I added the group Everyone and gave that group Read + Execute, List folder contents, Read, and Write permissions for the files folder. But I noticed that once I upload an image to a post and then look into the attachments folder on the server, the new image file is not inheriting those permissions from the folder. So I went back to the Windows security GIU for the folder, clicked advanced under the security tab, clicked Edit and clicked the box that says "Replace all existing inheritable permissions on all descendants with inheritable permissions from this object." Then I tried uploading another attachment, but the new attachment is still not being giving the security permissions for Everyone from the folder. This is annoying for me since I took a technology class on Windows Server about a year ago and I thought I knew how to do this.

If you can think of a better way to do this, please let me know :)

Thanks,

Chris
chughes
Posts: 4
Joined: Tue Aug 04, 2009 4:35 am

Re: Attachment Images Not Showing

Post by chughes »

Ok I have found that when I copy any file in Windows and paste it into this attachments folder on the server, the file does inherit the read/write permissions for Everyone like it should. Its only when I upload the attachment from the forum that the uploaded file does not inherit these permissions for some reason..
chughes
Posts: 4
Joined: Tue Aug 04, 2009 4:35 am

Problem Solved

Post by chughes »

Hi,

I am happy to say that I can now upload image files in phpBB.

I found an article on the internet that said that php stores uploads in two places. The first is a temp folder and any files uploaded to it will inherit the settings of that folder, regardless of what the second uploads folder permissions are set to.

So I created a new folder and changed its permissions to read/write for everyone. Then in the php.ini file, I found the upload_tmp_dir = setting and set it to that folder. And now everything is working.

Thanks much,

Chris
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Attachment Images Not Showing

Post by DavidIQ »

Glad I could at least point you in the right direction 8-)
Post Reply