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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Moved to different server, problems with media section. Uploading images etc


Go to End


1750 Views

Avatar
CodaGirl

4 Posts

19 September 2007 at 11:05pm

If someone would be so kind to help me out with this problem that would be great.

I recently moved my SS site from one server to another, i took a SQL dump of the database and set it up fine, and ftp'd an exact copy of the files to the new server. After a little tweaking with the .htaccess file, it all worked fine, other than the 'Files and Assets' section, and also any page that contained an image from that section. note: the assets folder is chmod'd to 775

I got a red box with FATAL ERROR: and whatever function that related to what i just did 'eg. ulpoad image or create folder'

So, i thought maybe an update to the latest build would cure my woes, but no, same problem still exists.

the error is along these lines (sorry for the large paste)

FATAL ERROR: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/php_upload/phpss2q2o) is not within the allowed path(s)
At line 155 in /home/el/ele/electiontracker.com.au/public/www/gmaps/cms/code/AssetAdmin.php

move_uploaded_file(/tmp/php_upload/phpss2q2o,/home/el/ele/electiontracker.com.au/public/www/gmaps/silverstripe-cache/_media014.jpg)
line 155 of AssetAdmin.php

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

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

Director::direct(/admin/assets/index/19)
line 101 of main.php
Context
Debug (Debug::showError() in line 147 of Debug.php)

* data =
o url =

/gmaps/admin/assets/index/19

o executeForm =

UploadForm

o ID =

19

o action_doUpload =

1

o MAX_FILE_SIZE =

31457280

o action_upload =

Upload Files Listed Below

o Files =
+ name =
# 1 =

# 0 =

_media014.jpg

+ type =
# 1 =

# 0 =

image/jpeg

+ tmp_name =
# 1 =

# 0 =

/tmp/php_upload/phpss2q2o

+ error =
# 1 =

4

# 0 =

0

+ size =
# 1 =

0

# 0 =

49174

* form =
Form
o HiddenFieldHiddenField (ID: : ) = 19
o HiddenFieldHiddenField (action_doUpload: : ) = 1
o FileFieldFileField (Files[0]: Choose file : ) =
o LiteralFieldLiteralField (UploadButton: UploadButton : ) =
o LiteralFieldLiteralField (MultifileCode: MultifileCode : ) =
* files =
o 1 =

0

o 0 =

49174

* param =

size

* value =

49174

* key =

0

* processedFiles =
o 1 =
+ name =

+ type =

+ tmp_name =

+ error =

4

+ size =

0

o 0 =
+ name =

_media014.jpg

+ type =

image/jpeg

+ tmp_name =

/tmp/php_upload/phpss2q2o

+ error =

0

+ size =

49174

* folder =
Database record: Folder
o ID :

19

o ClassName :

Folder

o Created :

2007-09-19 19:41:28

o LastEdited :

2007-09-19 19:41:28

o Name :

NewFolder

o Title :

NewFolder

o Filename :

assets/Uploads/NewFolder/

o Content :

o Sort :

0

o ParentID :

1

o OwnerID :

0

o RecordClassName :

Folder

* newFiles =
* fileSizeWarnings =

* uploadErrors =

* file =
o name =

_media014.jpg

o type =

image/jpeg

o tmp_name =

/tmp/php_upload/phpss2q2o

o error =

0

o size =

49174

* newtmp =

/home/el/ele/electiontracker.com.au/public/www/gmaps/silverstripe-cache/_media014.jpg

Please help, the client wants to go live soon and ive tried everything i can.

also, ive checked with the hosting company and they say that mod_rewrite is enabled and AllowOverride is set to all

thanks in advance