Koozali.org: home of the SME Server

Gallery2 uploading issues

Offline Yoink2285

  • 2
  • +0/-0
Gallery2 uploading issues
« on: July 22, 2008, 04:55:24 PM »
The problem I'm having is with the Gallery2 contrib and that I can't upload anything with it. I login to the gallery and go to "add a photo" and I do it under the "from a web browser" tab. I pick the file(s) I want to upload and then go to "add items" and it seems like it works, but then I go to the album and it says nothing is in there. I checked Gallery2's FAQ section (http://codex.gallery2.org/Gallery2:Troubleshooting#Adding_Items_.2F_Albums_.2F_Upload) and found my exact problem. It says "If you consult your webserver's error log, you might see 'PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0'. In that case, upload_tmp_dir is either not defined or the webserver doesn't have access to write a file in that directory." and that is the exact error I'm getting in my logs. Problem is...I don't know what/where that is or how to fix it.  Any ideas on how to fix this?

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Gallery2 uploading issues
« Reply #1 on: July 22, 2008, 05:05:39 PM »
Yoink2285

see php section here

http://wiki.contribs.org/Useful_Commands

PS Please read all the Howtos and the FAQ, you will learn a lot
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Yoink2285

  • 2
  • +0/-0
Re: Gallery2 uploading issues
« Reply #2 on: July 22, 2008, 05:52:47 PM »
Mary, I tried I a few things on that list and still no success. I am fairly new to linux so I appologize for not knowing too much about this.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Gallery2 uploading issues
« Reply #3 on: July 22, 2008, 07:18:06 PM »
Mary, I tried I a few things on that list and still no success. I am fairly new to linux so I appologize for not knowing too much about this.
Please try and analyze your log files and provide as much detail on what you did as you do not give us much to start with. Saying you did several things from that list does not tell us waht you did, not what the results of those actions were.

I would seriuously recommend looking through your log files and see if you find any clues there, the first to look at ar /var/log/messages, /var/log/httpd/access_log and /var/log/httpd/error_log.

 My first guesses are a PHPBaseDir restriction, which has a section in the FAQ in the wiki, I believe. You can also temporarily enable the display error function so errors are posted on screen (although I am not sure if this goes for gallery2 as well). All I can tell you is that I have gallery2 running for a few years without problems, so it should be possible. I even have it integrated with a wordpress blog, all from the time before they were packaged in contribs.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Gallery2 uploading issues
« Reply #4 on: July 23, 2008, 06:24:25 AM »
Yoink2285

This one, change the ibayname to suit

db accounts setprop ibayname PHPBaseDir /home/e-smith/files/ibays/ibayname:/tmp
signal-event ibay-modify ibayname
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Gallery2 uploading issues
« Reply #5 on: July 23, 2008, 07:28:34 AM »
Yoink2285

This one, change the ibayname to suit

db accounts setprop ibayname PHPBaseDir /home/e-smith/files/ibays/ibayname:/tmp
signal-event ibay-modify ibayname

I would love to see his logfiles first, before concluding that as I never had to set the /tmp folder as a part of the PHPBaseDir setting to allow for file uploading.

Min looks like this:
Code: [Select]
PHPBaseDir=/home/e-smith/files/ibays/Primary/html/:/opt/gallery2/:/home/e-smith/files/ibays/Primary/files/
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Gallery2 uploading issues
« Reply #6 on: July 23, 2008, 07:41:21 AM »
cactus & Yoink 2285

Yes of course it is ALWAYS best to see what the log files are saying.
Far better to read the "real" error message & implement the correct fix, rather than guessing.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline okepc

  • ***
  • 118
  • +0/-0
    • http://www.okepc.nl
Re: Gallery2 uploading issues
« Reply #7 on: July 23, 2008, 03:04:26 PM »
I had exactly the same problem fixed it like this:

db configuration setprop php MemoryLimit 64M
expand-template /etc/php.ini
/etc/init.d/httpd-e-smith restart

The problem is that php runs out of memory
The default is 32M and we set it to 64M

Try it

Dirk

Offline okepc

  • ***
  • 118
  • +0/-0
    • http://www.okepc.nl
Re: Gallery2 uploading issues
« Reply #8 on: July 25, 2008, 09:41:46 AM »
did you solve it?

Offline christian

  • *
  • 369
  • +0/-0
    • http://www.szpilfogel.com
Re: Gallery2 uploading issues
« Reply #9 on: July 31, 2008, 03:36:01 AM »
I never had to set the /tmp folder as a part of the PHPBaseDir setting to allow for file uploading.

Min looks like this:
Code: [Select]
PHPBaseDir=/home/e-smith/files/ibays/Primary/html/:/opt/gallery2/:/home/e-smith/files/ibays/Primary/files/

Interesting. I did have to set /tmp as well and I have also added pear as well (though I can no longer remember why and likely not for upload). My gallery is in an ibay as opposed to /opt. the extra mediaibayname is where I drop the photos in batch and then use an upload from local server which is efficient for me.

Mine looks like this:
Code: [Select]
PHPBaseDir=/home/e-smith/files/ibays/galleryibayname/:/home/e-smith/files/ibays/mediaibayname/:\
/usr/share/pear/:/usr/share/pear-addons/:/tmp/
SME since 2003