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.

Hosting Requirements /

What you need to consider when choosing a hosting provider and plan.

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

Orange Business Service = Bad


Go to End


2484 Views

Avatar
Mauve

Community Member, 5 Posts

15 December 2011 at 4:06am

Edited: 15/12/2011 12:47pm

For some reasons, I'm trying to install silverstripe on a shared host from orange business service in France.

And it's a bumpy road.

The service is as basic as can be : 5Gb static storage, 20Mb mysql DB, ftp access only.

Installing itself is eventless. Ftp the silverstripe tree, run php installer and it's set.

Almost. Because once you're there, you can't log into the CMS without adding ?isDev=1 to the url, you can't upload pictures (well, you can upload them actually, but you won't see them), and certainly other oddities I haven't spotted yet.

[edit]I dug into this a bit, and I solved the behavior I had by chmod'ing js files in assets/_combined to 666 ; this solved the admin access issue.[/edit]

I've read countless docs, and I think the main issue is files are owned by the ftp account (uid ftp, gid ftp) while apache certainly runs under its own uid/gid. When you want to create folders or upload files to the cms, they end up with rwxr_x___ attributes (0750), and when you want to access them from the site, you get a 403 forbidden error.

So far, I managed to sloppily hack this issue - nearly. I modified saphire/filesystem/Folder.php addUploadToFolder function circa line 249 like this :

...
if (move_uploaded_file($tmpFile['tmp_name'], "$base/$file$ext")) {
//
$oldumask = umask(0);
chmod("$base/$file$ext", Filesystem::$file_create_mask);
umask($oldumask);
//
// Update with the new image
return $this->constructChild(basename($file . $ext));
} else {
...

and Filesystem.php (line 26) like this :

static function makeFolder($folder) {
if(!file_exists($base = dirname($folder))) self::makeFolder($base);
if(!file_exists($folder)) {
$oldumask = umask(0);
mkdir($folder, Filesystem::$folder_create_mask);
umask($oldumask);
}
}

...

It sort of works ; folders are created with 775 rights, but files end up with a weird rwx-rwS-r_x permission set. As there is little risk someone will upload executable files, this works enough for me.

Does anyone have better clues on how to install silverstripe on this kind of config ?

Cheers,