Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Upload file fails


Reply


3 Posts   948 Views

Avatar
Jigar

Community Member, 1 Post

27 September 2012 at 11:16am

Hello All,

We have latest version of Silverstripe on our CentOS server.

---
[root@server ~]# cat /etc/redhat-release
CentOS release 5.8 (Final)

[root@server ~]# php -v
PHP 5.3.3 (cli) (built: Jun 27 2012 12:25:48)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v4.0.7, Copyright (c) 2002-2011, by ionCube Ltd.

[root@server ~]# cat /etc/php.ini | grep memory_limit
memory_limit = 128M
---

While trying to upload files, it fails and displays red progress bar with error: "Filesize is zero bytes." (Attached snapshot)

I have checked apache access and error logs without much success. Can someone direct where to start debugging the issue?

Thank you.
Jigar

Attached Files
Avatar
3dkiwi

Community Member, 17 Posts

8 October 2012 at 11:13pm

Same issue here running on SLES 11 SP2. I also do not see any errors in log files.

Modified php.ini in /etc/php5/apache2 directory to turn on logging, but nothing reported when upload fails.

Made sure the assets directory is writable by the apache user. But doing a bit of a readup and there is a mention that PHP uploads to a temporary directory before then transferring to final destination. Does SS do this? Where is this temp dir?

Cheers
Jim

Avatar
neilos

Community Member, 19 Posts

15 March 2013 at 4:32am

Make sure the /assets directory is writeable.
I had this problem and changing the permissions fixed it.