Jump to:

23001 Posts in 11854 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Fatal Error when attempting to upload

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

Page: 1
Go to End
Author Topic: 1156 Views
  • Bryce
    Avatar
    Community Member
    2 Posts

    Fatal Error when attempting to upload Link to this post

    Migrated site form local development machine, to webhost (quadrahost.com.au - suggested webhost) and am unable to upload files using asset admin. Ive checked the permissions on assets folder (and subfolders) and they allow the correct permissions. Turned on dev mode which reports the following error:

    FATAL ERROR: copy(/hsphere/local/home/over50/overfifty.com.au/assets/SilverStripeLogo.png): failed to open stream: Permission denied
    At line 232 in /hsphere/local/home/over50/overfifty.com.au/sapphire/filesystem/Folder.php

    copy(/var/tmp//silverstripe-cache-hsphere-local-home-over50-overfifty.com.au/SilverStripeLogo.png,/hsphere/local/home/over50/overfifty.com.au/assets/SilverStripeLogo.png)
    line 232 of Folder.php

    Folder->addUploadToFolder(Array)
    line 200 of AssetAdmin.php

    AssetAdmin->doUpload(Array,Form)
    line 238 of Controller.php

    Controller->run(Array)
    line 104 of Director.php

    Director::direct(admin/assets/index/0)
    line 158 of main.php

    Context
    Debug (Debug::showError() in line 180 of Debug.php)

    tmpFile =
    name = SilverStripeLogo.png
    type = image/png
    tmp_name = /var/tmp//silverstripe-cache-hsphere-local-home-over50-overfifty.com.au/SilverStripeLogo.png
    error = 0
    size = 12162
    base = /hsphere/local/home/over50/overfifty.com.au
    file = assets/SilverStripeLogo.png

    FATAL ERROR: File::loadUploaded: Couldn't copy '/var/tmp//silverstripe-cache-hsphere-local-home-over50-overfifty.com.au/SilverStripeLogo.png' to 'assets/SilverStripeLogo.png'
    At line 236 in /hsphere/local/home/over50/overfifty.com.au/sapphire/filesystem/Folder.php

    user_error(File::loadUploaded: Couldn't copy '/var/tmp//silverstripe-cache-hsphere-local-home-over50-overfifty.com.au/SilverStripeLogo.png' to 'assets/SilverStripeLogo.png',256)
    line 236 of Folder.php

    Folder->addUploadToFolder(Array)
    line 200 of AssetAdmin.php

    AssetAdmin->doUpload(Array,Form)
    line 238 of Controller.php

    Controller->run(Array)
    line 104 of Director.php

    Director::direct(admin/assets/index/0)
    line 158 of main.php

    Context
    Debug (Debug::showError() in line 180 of Debug.php)

    tmpFile =
    name = SilverStripeLogo.png
    type = image/png
    tmp_name = /var/tmp//silverstripe-cache-hsphere-local-home-over50-overfifty.com.au/SilverStripeLogo.png
    error = 0
    size = 12162
    base = /hsphere/local/home/over50/overfifty.com.au
    file = assets/SilverStripeLogo.png

  • Terminator4
    Avatar
    Community Member
    81 Posts

    Re: Fatal Error when attempting to upload Link to this post

    Give permissions to the folder (chmod 777) and make sure the main user on the web server has owner privileges

    1156 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.