# phpBB import problem

**URL:** https://meta.discourse.org/t/phpbb-import-problem/397586
**Category:** Migration
**Tags:** phpbb
**Created:** [March 4, 2026, 1:58am UTC](https://meta.discourse.org/t/phpbb-import-problem/397586 "2026-03-04T01:58:28Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![shortmort37](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/shortmort37/32/538876_2.png) [@shortmort37](https://meta.discourse.org/u/shortmort37)
#### Post date: [March 4, 2026, 1:58am UTC](https://meta.discourse.org/t/phpbb-import-problem/397586/1 "2026-03-04T01:58:28Z")

</div>

It’s not uncommon for duplicate filenames to exist in uploads; every board has to account for that. But in phpBB, it’s possible to upload two attachments of different pictures, both with the same name, in the same _ **post** _. phpBB manages this by storing the actual filename as “real\_filename” in the attachment table, but the hashed name it generates as “physical\_filename”.

I have 46 posts converted from my phpBB forum that contain duplicate images, because the filenames are the same. In a few cases, it’s because the user inadvertently posted the same file twice. But in many, it’s not. I’m not sure how the user did it - but I have an example where they uploaded 11 different pictures in phpBB, each named “image.jpg” (a default filename when dragging a picture from an email to the desktop). The same picture appears 11 times in Discourse. It appears the converter identifies a phpBB attachment to upload by real\_filename - open to duplicates - rather than physical\_filename.

Fortunately, I have a ruby script that identifies posts in postgres that contain the same Discourse filename twice. It will be painful (particularly with the post with 11 duplicates!), but I can manually fix this since my phpBB board is still extant. But just to note as an important correction, since I anticipate many phpBB webmasters will be jumping ship as I plan to do.

Thanks  
Dan

---

_[View the full topic](https://meta.discourse.org/t/phpbb-import-problem/397586)._
