[solved] "File could not be uploaded" error

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
cnymike
Power Poster
Power Poster
Posts: 446
Joined: Sun Jan 22, 2006 3:24 am

[solved] "File could not be uploaded" error

Post by cnymike »

CMSMS v1.1.4.1

Using the File Manager, I have been unable to upload a 6MB .mp3 file. I get the error "File could not be uploaded. This could be a permissions or safe mode problem"

SafeMode is off and permissions are set to 777. Furthermore, I have been able to upload smaller files using File Manager without getting this error so I am only able to assume that this in fact is NOT a permissions or a Safe Mode Problem. Instead it seems to be a file size issue.

I have changed the config.php upload limit to 10000000bytes and this has not helped. I have also placed in .htaccess the code that increases the php upload size up to 10MB. But I was still not able to upload the 6MB file.

I have had to resort to ftp'ing the file into the uploads directory.

Any ideas about a workaround to enable me to upload large files via the File Manager?
Last edited by cnymike on Thu Oct 25, 2007 1:56 am, edited 1 time in total.
palan
Forum Members
Forum Members
Posts: 12
Joined: Wed Oct 03, 2007 1:43 pm

Re: "File could not be uploaded" error

Post by palan »

Might be a similar problem to what I had.

Here: http://forum.cmsmadesimple.org/index.ph ... l#msg78487

Hope this helps..
Last edited by palan on Mon Oct 15, 2007 3:46 pm, edited 1 time in total.
cnymike
Power Poster
Power Poster
Posts: 446
Joined: Sun Jan 22, 2006 3:24 am

Re: "File could not be uploaded" error

Post by cnymike »

Alan,

I read your thread before I posted my problem.

I don't see any similarity whatsoever.

In your situation, you were not able to upload any files.

I do not have that problem at all. I am only not able to upload large files.

Michael
cnymike
Power Poster
Power Poster
Posts: 446
Joined: Sun Jan 22, 2006 3:24 am

Re: "File could not be uploaded" error

Post by cnymike »

Anyone?

Other than the config.php file and the php maximum upload file size are there other places that could limit the file size from being uploaded?
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: "File could not be uploaded" error

Post by kermit »

cnymike wrote:
I have changed the config.php upload limit to 10000000bytes and this has not helped. I have also placed in .htaccess the code that increases the php upload size up to 10MB. But I was still not able to upload the 6MB file.
just because you made the changes to allow a large upload does not mean the host permits you to change that particular setting. check a phpinfo output to see what the server is set at; and if your changes don't change it, then you have to live with what the host provides (or ask/beg/bribe/plead for them to change the server-wide setting)

phpinfo: http://us3.php.net/phpinfo
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
cnymike
Power Poster
Power Poster
Posts: 446
Joined: Sun Jan 22, 2006 3:24 am

Re: "File could not be uploaded" error

Post by cnymike »

phpinfo say maximum upload file size is 4194304

So that's 4.19MB right?

And I might be able to up that with a directive in .htaccess if the host will allow it?
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: "File could not be uploaded" error

Post by kermit »

cnymike wrote: phpinfo say maximum upload file size is 4194304

So that's 4.19MB right?

And I might be able to up that with a directive in .htaccess if the host will allow it?
4194304 / 1024 (get kb) / 1024 (get mb) = 4.0 megabytes

if you've change the setting but phpinfo doesn't reflect YOUR value; then no, the server configuration won't allow you to change it yourself (you'll have to ask the host to allow such overrides or to change the server-wide default).
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
cnymike
Power Poster
Power Poster
Posts: 446
Joined: Sun Jan 22, 2006 3:24 am

Re: "File could not be uploaded" error

Post by cnymike »

Apparently it is because I am using php-cgiwrap

Still communicating with the webhost to find out if there is a solution to this dilemma.
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: "File could not be uploaded" error

Post by kermit »

cnymike wrote: Apparently it is because I am using php-cgiwrap

Still communicating with the webhost to find out if there is a solution to this dilemma.

changing php configuration via .htaccess only works with php running as an apache module.  if your host is offering both php4 and php5, it is possible that one or the other is running in that fashion and you might be able to change the value via .htaccess

OR... you will either need to ask/beg/bribe your host to upping the server-wide value, or use a custom php.ini file (you'll have to ask your host if they support them).

of course, you can always change hosts if yours is uncooperative and you *have to have* a higher limit.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
cnymike
Power Poster
Power Poster
Posts: 446
Joined: Sun Jan 22, 2006 3:24 am

Re: "File could not be uploaded" error

Post by cnymike »

Yup... I contacted my host and was able to run php4 and php5 from cgi-bin instead of cgi-sys and I was also able to have my own php.ini. I upped the upload limit and all is well.
Pierre M.

Re: "File could not be uploaded" error

Post by Pierre M. »

The webserver may limit the size of the HTTP request before it reaches PHP... ask your hosting provider.

Pierre M.
cnymike
Power Poster
Power Poster
Posts: 446
Joined: Sun Jan 22, 2006 3:24 am

Re: "File could not be uploaded" error

Post by cnymike »

Pierre, I don't know a thing about the size of a HTTP request, but I did discover that the php maximum upload size was set at a value that was less than the size of the file I was trying to upload and increasing that value via the php.ini suddenly allowed me to upload the file. So I'm assuming that it was the PHP parameter that was limiting factor and not the HTTP request size, even though I have no idea what that is ???
Pierre M.

Re: "File could not be uploaded" error

Post by Pierre M. »

oops, I'd misread your last post.
So it is time to mark it [solved] ?

Pierre
cnymike
Power Poster
Power Poster
Posts: 446
Joined: Sun Jan 22, 2006 3:24 am

Re: "File could not be uploaded" error

Post by cnymike »

..so it is.
Post Reply

Return to “CMSMS Core”