Using GH File Upload Action getting error 1

luxhodge 19 Feb, 2014
This question is specifically about the GH File Upload Action.

I am using Chronoforms v4.0.4 with Joomla! 3.1.5. The form is pretty simple. I just have the user search for an order number. Then they go to the next page and browse to the file and then upload the file. When they are done, I say thanks for uploading and give them a button to go back to their homepage. Here are my settings in the upload action:

Files: file1:pdf
Upload Path: /home/mydomain/public_html/uploadFolder/
File Name: (empty - use default)
Make file name safe: URL Encode
Max Size in KB: 10000
Min Size in KB: 10
Errors - left as default.

That's it.

The user doesn't get an error, so they think the file upload worked. Not sure why that is either. However, I put a debugger on the form and got the error shown below.

File post array: Array ( [name] => 3721 Heron Ave SW Wyoming.pdf [type] => [tmp_name] => [error] => 1 [size] => 0 )
PHP returned this error for file upload by: file1
1

Other things I have looked at:
- My max file size or the system for uploads is set to 20M. I thought that was the problem, but it doesn't seem to be.

Any thoughts Bob? Any help would be appreciated. Thanks!
GreyHead 19 Feb, 2014
Hi luxhodge,

Here's what the PHP Manual says:
UPLOAD_ERR_INI_SIZE
Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini
.

I'd check the setting on the Site Admin | System Info | PHP Info page to make sure that it really is set to 20MB

Bob

PS I also see that there are spaces in the file name - I have a recollection that can cause problems with Windows servers??
luxhodge 20 Feb, 2014
Answer
Thanks for the response Bob!

It was indeed a file size problem. The thing that was messing me up was that it was showing 20M for a max in my CPanel. I ended up contacting the hosting provider. They pointed me straight to the root directory where an extra php.ini file was located. That file did not have a max upload size specified, so it was causing the site to default back to 2M. Lowest spec wins I guess. Anyway, that file was put there by my RSFirewall component on a system check. It did a "fix" to secure the site. I didn't realize that was part of the fix. It is all good now. I removed the extra file and it works fine. Thanks again for your response!

Erik
GreyHead 20 Feb, 2014
Hi Erik,

I've learned that it is always worth checking the PHP settings in use from the Joomla! Site Admin - it seems that more and more often they are different to the CPanel or main PHP.ini settings because of some local over-ride.

Bob
This topic is locked and no more replies can be posted.