21288 Posts in 5733 Topics by 2602 members
| Go to End | Next > | |
| Author | Topic: | 2695 Views |
-
Image upload problem - v2.2.3

20 January 2009 at 2:48am
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
-
Re: Image upload problem - v2.2.3

20 January 2009 at 3:13am
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...
-
Re: Image upload problem - v2.2.3

20 January 2009 at 3:38am
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.
-
Re: Image upload problem - v2.2.3

20 January 2009 at 4:01am
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.
-
Re: Image upload problem - v2.2.3

20 January 2009 at 4:18am
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.
-
Re: Image upload problem - v2.2.3

20 January 2009 at 9:56am
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.phpcopy(/tmp/silverstripe-cache-var-www-vhosts-domain.nl-httpdocs/error.jpg,/var/www/vhosts/stijlgoed.nl/httpdocs/assets/error.jpg)
line 232 of Folder.phpFolder->addUploadToFolder(Array)
line 200 of AssetAdmin.phpAssetAdmin->doUpload(Array,Form)
line 238 of Controller.phpController->run(Array)
line 104 of Director.phpDirector::direct(admin/assets/index/0)
line 158 of main.php2:
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.phpcopy(/tmp/silverstripe-cache-var-www-vhosts-stijlgoed.nl-httpdocs/error.jpg,/var/www/vhosts/stijlgoed.nl/httpdocs/assets/error.jpg)
line 232 of Folder.phpFolder->addUploadToFolder(Array)
line 200 of AssetAdmin.phpAssetAdmin->doUpload(Array,Form)
line 238 of Controller.phpController->run(Array)
line 104 of Director.phpDirector::direct(admin/assets/index/0)
line 158 of main.php3:
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.phpuser_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.phpFolder->addUploadToFolder(Array)
line 200 of AssetAdmin.phpAssetAdmin->doUpload(Array,Form)
line 238 of Controller.phpController->run(Array)
line 104 of Director.phpDirector::direct(admin/assets/index/0)
line 158 of main.php4:
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.phpfile_exists(/var/www/vhosts/stijlgoed.nl/httpdocs/assets/error.jpg)
line 225 of Folder.phpFolder->addUploadToFolder(Array)
line 200 of AssetAdmin.phpAssetAdmin->doUpload(Array,Form)
line 238 of Controller.phpController->run(Array)
line 104 of Director.phpDirector::direct(admin/assets/index/0)
line 158 of main.php -
Re: Image upload problem - v2.2.3

20 January 2009 at 10:41am
Yikes. That's a server config issue. Send it to your hosting provider to get the open_basedir restriction lifted.
-
Re: Image upload problem - v2.2.3

20 January 2009 at 10:48am
Thanks!
I will and keep you up-to-date if it worked.
| 2695 Views | ||
| Go to Top | Next > |


