Cannot upload file through contact form on D7 - Help for File Upload on 10.04 LTS

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
spessex's picture

Hi everyone

I cannot appear to get the file upload to work on the following link:

http://www.cerebraluk.com/contact_us

I upload the file and get:

Notice: Undefined index: #field_name in file_managed_file_save_upload() (line 637 of /srv/www/domain.com/public_html/modules/file/file.module).
The file could not be uploaded.

It doesn't appear to be anything to with roles/permissions as even when I'm logged in as admin it still won't upload and I still get the same message.

I think it has something to do with the file permissions on my server which is Ubuntu 10.04 LTS but I'm not sure what to do. Can anyone advise?

Thank you

Stephen

Comments

Does the comment on this page

ghazlewood's picture

Does the comment on this page help?

http://drupal.org/node/1373046

No

spessex's picture

Not at the moment unfortunately. I had found this but have had no luck yet with the prescribed solutions.

Solution

spessex's picture

Found solution.

In terminal (on Ubuntu)

/srv/www/thedomainnamefoldername/public_html/sites/default/

then type:

chown -R www-data:www-data files

this sorted it! thanks to siliconmeadow

United Kingdom

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week