Unable to add files.

i cant seem to add files. i have set permissions to 777 and nothing. i suspect it might be an imagemagik issue but i do not know

these are the contents of my error log file.

2013-03-27T08:07:39-07:00 WARN (4): Omeka_Storage_Adapter_Filesystem: Tried to delete missing file 'original/607e95143180f61588ad9047168145db.jpg'.
2013-03-27T08:07:39-07:00 ERR (3): exception 'Omeka_File_Derivative_Exception' with message 'ImageMagick is not properly configured: invalid directory given for the ImageMagick command!' in /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Omeka/File/Derivative/Image/Creator.php:44
Stack trace:
#0 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Omeka/File/Derivative/Image/Creator.php(26): Omeka_File_Derivative_Image_Creator->setImageMagickDirPath('/usr/bin')
#1 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/models/File.php(362): Omeka_File_Derivative_Image_Creator->__construct('/usr/bin')
#2 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/models/Job/FileProcessUpload.php(22): File->createDerivatives()
#3 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Omeka/Job/Dispatcher/Adapter/Synchronous.php(25): Job_FileProcessUpload->perform()
#4 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Omeka/Job/Dispatcher/Default.php(136): Omeka_Job_Dispatcher_Adapter_Synchronous->send('{"className":"J...', Array)
#5 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/models/File.php(209): Omeka_Job_Dispatcher_Default->send('Job_FileProcess...', Array)
#6 [internal function]: File->afterSave(Array)
#7 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Omeka/Record/AbstractRecord.php(277): call_user_func(Array, Array)
#8 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Omeka/Record/AbstractRecord.php(550): Omeka_Record_AbstractRecord->runCallbacks('afterSave', Array)
#9 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/models/Item.php(322): Omeka_Record_AbstractRecord->save()
#10 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/models/Builder/Item.php(204): Item->saveFiles()
#11 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/globals.php(554): Builder_Item->addFiles('Upload', 'file', Array)
#12 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/models/Item.php(307): insert_files_for_item(Object(Item), 'Upload', 'file', Array)
#13 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/models/Item.php(217): Item->_uploadFiles()
#14 [internal function]: Item->beforeSave(Array)
#15 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Omeka/Record/AbstractRecord.php(277): call_user_func(Array, Array)
#16 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Omeka/Record/AbstractRecord.php(531): Omeka_Record_AbstractRecord->runCallbacks('beforeSave', Array)
#17 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Omeka/Controller/AbstractActionController.php(175): Omeka_Record_AbstractRecord->save(false)
#18 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/controllers/ItemsController.php(88): Omeka_Controller_AbstractActionController->editAction()
#19 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Zend/Controller/Action.php(516): ItemsController->editAction()
#20 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('editAction')
#21 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#22 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#23 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#24 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#25 /nfs/c05/h05/mnt/159064/domains/leandroduque.com/html/omeka/admin/index.php(28): Omeka_Application->run()
#26 {main}

sorry to repost. I neglected to tick the notify box.

I have created a simple test for the imgmagik here eandroduque.com/omeka/imagemagick.php.

oddly enough it seems that disabling the mod rewrite rules in omeka's .htaccess file causes imagemagik to work (of course it beaks the rest of the site)

MediaTemple uses open_basedir restrictions by default.

They have an article on how to change or loosen them.

Your open_basedir probably needs to include at least /usr/bin and /tmp for Omeka to be happy. Mod_rewrite doesn't really have anything to do with this, it's just that you generally can't drop php files into an Omeka install and have them work without turning it off.

tried adding both
open_basedir = "/nfs:/tmp:/usr/local:/etc/apache2/gs-bin::/usr/bin:/usr/bin/convert"

or

open_basedir = "nfs:/tmp:/usr/local:/etc/apache2/gs-bin::/usr/bin:/usr/bin/convert

neither of which produced the desired results. i still get an error when i attempt to add items.

ps. sorry for cross posting i thought they were different communities of people.

Judging from the documentation, the setting should be something like:

open_basedir = /nfs:/tmp:/usr/local:/etc/apache2/gs-bin:/usr/bin

But it also seems like that may be overridden by htaccess settings? I'm not familiar with MediaTemple's setup.

Tried, still nothing. the most specific (and only) .htaccess that i have is sitting on the omeka folder

# Omeka .htaccess: Apache configuration file
# This file is required for Omeka to function correctly.

# --------------- #
# Error Reporting #
# --------------- #

# Uncomment the SetEnv line below to turn on detailed on-screen error
# reporting.
#
# Note: This should only be enabled for development or debugging. Keep this
# line commented for production sites.
#

# SetEnv APPLICATION_ENV development

# ------------- #
# Rewrite Rules #
# ------------- #

RewriteEngine on

# If you know mod_rewrite is enabled, but you are still getting mod_rewrite
# errors, uncomment the line below and replace "/" with your base directory.
#
# RewriteBase /

# Allow direct access to files (except PHP files)
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule !\.php$ - [C]
RewriteRule .* - [L]

RewriteRule ^install/.*$ install/install.php [L]
RewriteRule ^admin/.*$ admin/index.php [L]
RewriteRule .* index.php

# -------------- #
# Access Control #
# -------------- #

#Block access to all .ini files.
<FilesMatch "\.ini$">
Order Allow,Deny
Deny from all
</FilesMatch>

# --------#
# Caching #
# --------#

# Uncomment the lines below in order to enable caching of some files
# (after a finished site has gone live)
#
# <IfModule mod_expires.c>
# <FilesMatch "\.(js|ico|gif|jpg|png|css)$">
# ExpiresActive on
# ExpiresDefault "access plus 10 day"
# </FilesMatch>
# </IfModule>

# ------------ #
# PHP Settings #
# ------------ #

<IfModule mod_php5.c>
php_flag register_globals off
php_flag magic_quotes_gpc off
</IfModule>

Hmm. Is your php.ini that you're editing in the "right" place? Maybe you're editing the "sample" file without changing the name?

As a separate thing, you may be able to check your PHP/Apache logs to see what's happening. There's an article for that, also.

yup php.ini is the right file. spent a couple of hours with a very confused support dev. but will definitely check on the php logs and post findings here.

oh boy it a huge file. not even sure what id be looking for in it.

http://leandroduque.com/log

i really cant begin to imagine what is wrong. and i really want this to work. it is for a project with a small local museum. if i cant get omeka to play nice for me i might have to build the whole thing on wp with custom post types and it all just seeems sily when omega is s perfect for it.

ps. these are the contents of the php.ini

; Rename this file to php.ini and uncomment or add directives.
; For a complete list of valid directives, visit:
; http://us2.php.net/manual/en/ini.php

[PHP]
; We highly recommend that you leave this options enabled
cgi.fix_pathinfo=1

; Increase maximum post size
;post_max_size = 20M

; Increase execution time
;max_execution_time = 300

; pull in EGPCS [Environment, GET, POST, Cookie, Server] variables as globals
;register_globals = true

; For performance reasons, (mt) does not load all of the modules that are available
; into PHP. You may uncomment any one of the following "extension" lines to enable
; the desired module

; Salblotron XSLT
;extension=xslt.so

; save in local tmp
session.save_path=/home/159064/data/tmp

memory_limit = 64M
upload_max_filesize = 24M
post_max_size = 32M

;enable ImageMagik fro all sites

open_basedir = /nfs:/tmp:/usr/local:/etc/apache2/gs-bin:/usr/bin

The log you posted looks like the access_log.

Instead, you want the error_log. That's where PHP errors and warnings would often show up.

If you want to see if the open_basedir setting is being respected at all, or is the problem, you could try setting it to just open_basedir = /, at least temporarily.

yeah i had tried the open_basedir all earlier and it made no difference. i should have mentioned it. all the error log is showing is a missing favicon...

do people generally just have a lot of trouble getting omeka to run smoothly on MT hosts? or am i just made of mistakes...

would it make a difference if omeka was in the home folder as opposed to a subfolder ?

We haven't gotten any large amount of feedback from MediaTemple users, but there may just not be that many who've tried on that host.

Using Omeka in a subfolder shouldn't make any difference whatsoever.

You're sure you don't have an .htacess in the parent directory? I'm fairly sure its some PHP/server configuration problem that's biting you here, since you seem to have the right ImageMagick path configured.

folder above it has a wordpress but i renamed the .htaccess to 0.ht...thus removing it from the equation. above that there is nothing else for the domain. and above that the next thing to take control is my host's php.ini

I have a similar problem. When I try to load certain items, the metadata loads but the image does not and I have a message of the type 'Error output from ImageMagick:identify: Empty input file `/tmp/84993e4.jpg' @ error/jpeg.c/EmitMessage/237.'
I haven't found anyone else reporting the same error. I tried turning the debugging option on in .htaccess but it doesn't give any more information.

There, ImageMagick is saying that the input file is empty, zero bytes long.

We've seen that happen sometimes if there's no disk space left for /tmp to use, or at least not enough to store the file there. Some servers set size limits for how big /tmp can grow, and if you've got a lot of old stuff piling up in there you could be hitting the limit and getting "empty" files.