Jump to:

23451 Posts in 18899 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Image upload problem - v2.2.3

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 2
Go to End
Author Topic: 3131 Views
  • cappelmans
    Avatar
    Community Member
    6 Posts

    Image upload problem - v2.2.3 Link to this post

    Hi all,

    I recently installed Silverstripe on my laptop to figure it out, it all worked perfectly so i decided to use it for a website.

    Installation went great and everything seems to work allright. The only problem i am facing right now is the ability to upload images.

    When i select an image in the "Files and Images" tab, and click to upload i receive the following error:

    Error

    The website server has not been able to respond to your request.

    In my attempt to solve this problem I chmodded the assets folder to 777, and also the folders below this directory (uploads etc).

    I read alot of topics and solutions but i just cannot get it to work. Does anybody have a clue? I still think it has to do with user rights, considering it all worked fine on my laptop.

    My Silverstripe version: 2.2.3 and it runs on a Linux server.

    Thanks in advance,

    Jan-Willem

  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: Image upload problem - v2.2.3 Link to this post

    Hi , and welcome to Silverstripe...

    Hmmmm... odd.... Check your apache logs for errors...

    I bumped into a problem with the assets some time ago .... Don't think it is the same problem , but you never know...

    http://www.silverstripe.org/customising-the-cms/show/250920

  • cappelmans
    Avatar
    Community Member
    6 Posts

    Re: Image upload problem - v2.2.3 Link to this post

    Hello and thanks for your quick reply. I'm going to try to get a log from my host company.

    I checked your topic, but it seems to be a different problem. When i try to upload, it gives almost instantly the error message, it's not that ajax keeps loading forever.

    Thanks for the suggestion. I hope i can post the log soon.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Image upload problem - v2.2.3 Link to this post

    Find out what the error is by turning on error reporting in _config.php

    Debug::send_errors_to('myemail@address.com');

    Then post the error here.

  • cappelmans
    Avatar
    Community Member
    6 Posts

    Re: Image upload problem - v2.2.3 Link to this post

    Ok i received an error log, and i added the error reporting function, it gives some interesting errors. I will post them tonight, because i have to hurry now for an appointment. Thanks for the help sofar, much aprreciated.

  • cappelmans
    Avatar
    Community Member
    6 Posts

    Re: Image upload problem - v2.2.3 Link to this post

    Ok, here are the error messages i received, trying to figure them out atm:

    1:
    Warning: copy() [function.copy]: open_basedir restriction in effect. File(/var/www/vhosts/stijlgoed.nl/httpdocs/assets/error.jpg) is not within the allowed path(s): (/var/www/vhosts/stijlgoed.nl/httpdocs:/tmp)
    At line 232 in /home/vhosts/stijlgoed.nl/httpdocs/sapphire/filesystem/Folder.php

    copy(/tmp/silverstripe-cache-var-www-vhosts-domain.nl-httpdocs/error.jpg,/var/www/vhosts/stijlgoed.nl/httpdocs/assets/error.jpg)
    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

    2:
    Warning: copy(/var/www/vhosts/stijlgoed.nl/httpdocs/assets/error.jpg) [function.copy]: failed to open stream: Operation not permitted
    At line 232 in /home/vhosts/stijlgoed.nl/httpdocs/sapphire/filesystem/Folder.php

    copy(/tmp/silverstripe-cache-var-www-vhosts-stijlgoed.nl-httpdocs/error.jpg,/var/www/vhosts/stijlgoed.nl/httpdocs/assets/error.jpg)
    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

    3:
    Error: File::loadUploaded: Couldn't copy '/tmp/silverstripe-cache-var-www-vhosts-stijlgoed.nl-httpdocs/error.jpg' to 'assets/error.jpg'
    At line 236 in /home/vhosts/stijlgoed.nl/httpdocs/sapphire/filesystem/Folder.php

    user_error(File::loadUploaded: Couldn't copy '/tmp/silverstripe-cache-var-www-vhosts-stijlgoed.nl-httpdocs/error.jpg' to 'assets/error.jpg',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

    4:
    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/stijlgoed.nl/httpdocs/assets/error.jpg) is not within the allowed path(s): (/var/www/vhosts/stijlgoed.nl/httpdocs:/tmp)
    At line 225 in /home/vhosts/stijlgoed.nl/httpdocs/sapphire/filesystem/Folder.php

    file_exists(/var/www/vhosts/stijlgoed.nl/httpdocs/assets/error.jpg)
    line 225 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

  • UncleCheese
    Avatar
    4085 Posts

    Re: Image upload problem - v2.2.3 Link to this post

    Yikes. That's a server config issue. Send it to your hosting provider to get the open_basedir restriction lifted.

  • cappelmans
    Avatar
    Community Member
    6 Posts

    Re: Image upload problem - v2.2.3 Link to this post

    Thanks!

    I will and keep you up-to-date if it worked.

    3131 Views
Page: 1 2
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.