# Uploading 17500 users and their avatars using PHP

**URL:** <https://meta.discourse.org/t/uploading-17500-users-and-their-avatars-using-php/71685>\
**Category:** Development\
**Created:** [10월 9, 2017, 2:39오후 UTC](https://meta.discourse.org/t/uploading-17500-users-and-their-avatars-using-php/71685 "2017-10-09T14:39:06Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Frank\_Bailey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frank_bailey/32/83927_2.png) [@Frank\_Bailey](https://meta.discourse.org/u/Frank_Bailey)\
**Post date:** [10월 9, 2017, 8:39오후 UTC](https://meta.discourse.org/t/uploading-17500-users-and-their-avatars-using-php/71685/9 "2017-10-09T20:39:55Z")

</div>

Okay thus far I have tried installing Discourse locallt using the Vagrant method mentioned in the howto. This wasn’t successful as I got stuck with a fatal error during the bundle install. The debug\_inspector failed to install and the bundle could not complete the build.

I then tried the Bitnami Discourse image, which worked great and I got into Discourse without much trouble. I then ran into a wall with the restore of a backup from the production server, where an error was encountered and the restore failed and was rolled back. The error was

```
[2017-10-09 22:31:14] EXCEPTION: failed to execute:
pg_dump -s -x -O -f /opt/bitnami/apps/discourse/htdocs/db/structure.sql bitnami_discourse

```

So I’m now in a quandary. I’ve already exceeded the hours I quoted my client to do this user import from Ning, and I’m no closer to the goal.

All I really need to get right is the avatar upload, as I can already add the users from the json export with the custom fields I’ve set up in Discourse. It’s just the avatars. There is no need for any other data except the user profiles and their pictures. Is there perhaps a way to load an image from disk in PHP and somehow get it into the \_FILES collection programmatically, or fake the \_FILES collection in PHP with an array, so as to be able to get the pictures in?

---

_[View the full topic](https://meta.discourse.org/t/uploading-17500-users-and-their-avatars-using-php/71685)._
