Dreaded Upload Bug

Permalink 1 user found helpful
Hello

I've recently decided to get in and do my own website for my photography business. Anyway I get the following error.

An unknown error occurred while uploading the file. Please check that file uploads are enabled, and that your file does not exceed the size of the post_max_size or upload_max_filesize variables.

File Uploads: 1
Max Upload File Size: 10M
Post Max Size: 10M

I've made the changed to the php.ini file ect but still no luck. I even done what the host suggested to do.

I'm not really a computer person. The whole purpose of doing this on my own was to see if I could do it. I'm familier with concrete5 because it is what my previous sites developer used and I find it quite useful in managing a site, making changes ect.

Other then this uploading problem everything appears to be working properly.

Suggestions?

Please bare in mind I don't work in IT, or am I a coder. My skill base is extremely limited and from my searching I've yet to come across a solution to the problem that is easily understood.

Many thanks.

 
mesuva replied on at Permalink Reply
mesuva
I'd first check to see if it is just the problem of uploading something too big, so I'd test with a small file - a very small image or text file.

If you can't upload ANYTHING, a possible reason for this could be the permissions of folders.

Briefly, permissions are settings that each file and folder in a webspace can have, to control whether it can be read, written to and by who.

To upload files, the folder /files and it's subfolders have to have the appropriate permissions set to allow files and folders to be written into them.

Normally when concrete5 is installed, the permissions are fine from the start, but some hosts need some extra work to get it right.

Since it sounds like you have a host that is prepared to help you, you could ask them to look at the /files folder and get them to check that the folder is writable by the webserver.

This might not be the problem, but it's worth checking. If they are very willing to help, you may be able to ask them to look at the error logs while you try a sample upload. They might be able to spot the problem. Sometimes it can be settings on their end as well
Minardiau replied on at Permalink Reply
Thanks mate

Yeah I can not upload anything. Large files, small files, multiple files.
Minardiau replied on at Permalink Reply
As for the error logs

This is what they contains

[Sun Jan 15 07:55:26 2012] [error] [client 65.52.104.90] File does not exist: /var/chroot/home/content/22/8822722/html/paris
[Sun Jan 15 07:55:26 2012] [error] [client 65.52.104.90] Directory index forbidden by Options directive: /var/chroot/home/content/22/8822722/html/
[Sun Jan 15 16:06:44 2012] [error] [client 101.161.1.217] File does not exist: /var/chroot/home/content/22/8822722/html/favicon.ico
[Sun Jan 15 16:06:44 2012] [error] [client 101.161.1.217] Directory index forbidden by Options directive: /var/chroot/home/content/22/8822722/html/
[Sun Jan 15 16:06:44 2012] [error] [client 101.161.1.217] File does not exist: /var/chroot/home/content/22/8822722/html/favicon.ico
[Sun Jan 15 16:06:44 2012] [error] [client 101.161.1.217] Directory index forbidden by Options directive: /var/chroot/home/content/22/8822722/html/

[Sun Jan 15 07:32:58 2012] [error] [client 65.52.104.90] File does not exist: /var/chroot/home/content/22/8822722/html/robots.txt
[Sun Jan 15 07:32:58 2012] [error] [client 65.52.104.90] Directory index forbidden by Options directive: /var/chroot/home/content/22/8822722/html/

[Sun Jan 15 07:49:48 2012] [error] [client 207.46.13.212] Directory index forbidden by Options directive: /var/chroot/home/content/22/8822722/html/
[Sun Jan 15 07:49:48 2012] [error] [client 207.46.13.212] File does not exist: /var/chroot/home/content/22/8822722/html/missing.html
[Sun Jan 15 14:53:09 2012] [error] [client 66.249.68.227] File does not exist: /var/chroot/home/content/22/8822722/html/ReMhW
[Sun Jan 15 14:53:09 2012] [error] [client 66.249.68.227] Directory index forbidden by Options directive: /var/chroot/home/content/22/8822722/html/
mkly replied on at Permalink Reply
mkly
What happens when you navigate in your browser to
http://www.example.com/files/index.html

replace example.com with your domain name.

You should get a blank white screen. If you get a Forbidden, Permission Denied or Not Found error then you might have a permissions issue on the /files folder.
Minardiau replied on at Permalink Reply
I get the blank screen

http://www.allan-duncan-photography.com/Concrete5/files/index.html...

p.s. I'm aware that concrete5 is not installed to the root director. It was kinda deliberate till I'm happy with the site. Then I'll change it over.
mkly replied on at Permalink Reply
mkly
Ok. Hmmm, just a couple things.
first would be if you're installation is set to safe mode
you can create a file called something like check.php with this
<?php
if(ini_set('safe_mode'))
  echo "In Safe Mode";
else
  echo "Not safe mode";
?>

and stick it in the web root and browse to it. If you get "In Safe Mode" then that might be the problem.

Another possibility
In your /config/site.php
What do you have for
define('BASE_URL', 'http://example.com');
define('DIR_REL', '/Concrete5');


But these are really just guesses.

The error you are getting is the default catch all error for file uploads. It typically rules out permission, file extension and token validation errors, but I don't know that for sure.

There is also a possibility that there is an issue finding or using the temporary directory although, this again seems unlikely with the error you are getting.
Minardiau replied on at Permalink Reply
define('BASE_URL', 'http://www.allan-duncan-photography.com');
define('DIR_REL', '/Concrete5');
Raksmey replied on at Permalink Reply
it can possibly due to page redirect!
for example, you have htaccess to redirect from none trailing slash to trailing slash url, as the form's action point to none trailing slash url, then it redirect to trailing slash url and coz the form's data be lost.
wormracer08 replied on at Permalink Reply
wormracer08
Thanks Raksmey, the slash/no-slash redirect code I had in my .htaccess was exactly the problem. WOW!