Web based family history software

Question Error uploading media

  • csolon
  • Topic Author
  • Visitor
  • Visitor
9 years 3 weeks ago #1 by csolon
Error uploading media was created by csolon
I've just installed webtrees. I did not convert from PhpGedView, but I uploaded my gedcom from PhpGedView and then uploaded my media files from my PhpGedView to the webtrees data/media directory and they all appeared in webtrees without me doing anything else, which was really nice! Not what I was expecting. But now I don't know how to add new media files. When I try to do that I am getting a message:

There was an error uploading your file.
Missing PHP temporary directory

I added a tmp directory to the root, but obviously that must not be what I'm supposed to do. Can anyone help me, please?

Please Log in or Create an account to join the conversation.

More
9 years 3 weeks ago #2 by fisharebest
Replied by fisharebest on topic Error uploading media
From the admin pages, there is a "PHP Information" link.

Do you have an entry "upload_tmp_dir". If so, it must exist and be writable.

If not, do you have an entry "sys_temp_dir". If so, it must exist and be writable.

If neither of these are set to a writable folder, PHP will use the system temporary directory.

You said you "added a tmp directory to the root". Where exactly? Is this a Unix or Windows based system? If unix, then I would expect "/tmp" to already exist.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • csolon
  • Topic Author
  • Visitor
  • Visitor
9 years 3 weeks ago #3 by csolon
Replied by csolon on topic Error uploading media
I really don't understand most of this. I am a step below novice. I have an entry "upload_tmp_dir". It says "no value" under both the Local Value and Master Value columns. Does that mean it doesn't exist? If so, how do I get it to exist, and how do I get it to be writeable?

I have webtrees installed on a Linux system. I added a tmp directory to the domain folder where I installed webtrees. When I use my server's File Manager, I don't see a tmp folder. When I use Filezilla, I see three folders -- log, tmp, and webspace. Under webspace, I have an httpdocs folder that has a folder with the domain name, which is where I installed webtrees. The only tmp folder I see is that one I see when I first connect, and either it doesn't exist or I don't have access to it. I get this message:

Status: Retrieving directory listing of "/tmp"...
Command: CWD tmp
Response: 550 tmp: No such file or directory
Error: Failed to retrieve directory listing

The Folder Attributes are 750 and I cannot change it. Apparently this is something controlled by the hosting company.

The domain I've installed webtrees on is a subdomain of a domain that is installed on a Windows based system, but this subdomain is installed on the Linux. I don't know if that has any bearing on this problem. Everything else seems to be working, including getting all the media hooked back up without having to individually do each file, which I thought I would have to do, but I honestly had no clue what I was doing there. That was a hit or miss thing where I luckily did something that made it work. Perhaps whatever I did there messed things up? I put my media files in the data/media/media folder. I'm pretty sure I didn't upload the thumbnails, so it must have generated thumbnails for everything I added to that folder. But now when I try to add a new media item to that folder, it doesn't show up in the list of media items, so obviously the procedure I used to put back all the media files I had in PhpGedView isn't working to add new media files.

That's about all I know. I get an error trying to add media within webtrees, and just throwing a media file in the folder where I put the other media files doesn't work either to get it added. I appreciate any help you can give me.

Please Log in or Create an account to join the conversation.

More
9 years 3 weeks ago #4 by fisharebest
Replied by fisharebest on topic Error uploading media

I have an entry "upload_tmp_dir". It says "no value" under both the Local Value and Master Value columns.


You didn't answer the second half of the question (about the sys_temp_dir setting), but I'll assume that is also set to "No value".

The simple answer is that this is a server configuration error, and needs to be fixed by whoever maintains your server. Perhaps raise a support ticket with your hosting provider?

The longer answer is that you need to tell your webserver where to put store temporary file uploads. You then need to make sure that this folder has permissions that allow the webserver to write to it.

You make these configuration change (to "upload_tmp_dir", etc.) in a "php.ini" file. You may or may not have permission to do this on your server.
On some servers, you might also make them in a ".htaccess" file. Again, you may or may not have permission to do this on your server.

One final note. Although your are seeing "/tmp", "/log" and "/webspace", these probably aren't the full paths. They are more likely to be "/users/csolon/tmp", "/users/csolon/log" and "/users/csolon/webspace". The first part of the path is often hidden when you connect via FTP.
You may therefore need to discover and specify this full path when you update your php.ini or .htaccess.

You could try googling "Missing PHP temporary directory" together with the name of your hosting provider.

But if this all sounds like gibberish, send the following email to the tech support of your hosting provider:

Dear Support,

I'm trying to use PHP file uploads on my account. These are failing with the error
"Missing PHP temporary directory"

I see that the "upload_tmp_dir" setting is not defined in my PHP configuration,
which probably the cause of this problem.

Can you update my PHP configuration to point to a suitable temporary folder?

Thanks!

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • csolon
  • Topic Author
  • Visitor
  • Visitor
9 years 1 week ago #5 by csolon
Replied by csolon on topic Error uploading media
Thank you so much! That fixed my problem.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}