OwnCloud v4 and 1&1 shared hosting

Ask all your questions regarding OC 5.x Please read the Support Forum Rules
Forum rules
ownCloud 5.x reached end of life and is officially unsupported. For details see Wiki page.

Please upgrade your ownCloud.
frinux
Newbie
Posts: 1
Joined: Tue May 22, 2012 11:48 am

OwnCloud v4 and 1&1 shared hosting

Postby frinux » Tue May 22, 2012 12:06 pm

Hi,
I'm trying to install OwnCloud v4 on a 1&1 shared hosting, but it seems it is not as simple as it seems.

First problem : PHP version. I had to add this in the .htaccess to use a php5.4 version :

Code: Select all

AddType x-mapp-php6 .php
AddHandler x-mapp-php6 .php


Now, I can install OwnCloud. Second problem : .htaccess has been overwritten. I re-edit the .htaccess, it is now OK

Third problem : Owncloud is running, but each page I try show lots of warning "headers already sent". It is a bug in the code, see this ticket: http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-719

I hope this message will help 1&1 OwnCloud users!

Kermit
Newbie
Posts: 2
Joined: Tue May 22, 2012 2:48 pm

Re: OwnCloud v4 and 1&1 shared hosting

Postby Kermit » Tue May 22, 2012 2:52 pm

Hi,

thanks for sharing your small howto.

I can add some information. To get carddav and caldav running you have to change remote.php

Code: Select all

<?php
$RUNTIME_NOSETUPFS = true;
$RUNTIME_NOAPPS = TRUE;
require_once('lib/base.php');
if (array_key_exists('PATH_INFO', $_SERVER)){
   $path_info = $_SERVER['PATH_INFO'];
}else{
   $path_info = substr($_SERVER['PHP_SELF'], strpos($_SERVER['PHP_SELF'], basename(__FILE__)) + strlen(basename(__FILE__)));
}

// begin modification
if (empty($path_info)){
   $path_info = str_replace($_SERVER['SCRIPT_NAME'],"",$_SERVER['REQUEST_URI']);
}
// end modification

if (!$pos = strpos($path_info, '/', 1)) {
   $pos = strlen($path_info);
}
$service=substr($path_info, 1, $pos-1);
$file = OCP\CONFIG::getAppValue('core', 'remote_' . $service);
if(is_null($file)){
   header('HTTP/1.0 404 Not Found');
   exit;
}

$parts=explode('/',$file);
$app=$parts[2];
OC_App::loadApp($app);

$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
require_once(OC::$APPSROOT . $file);


Greetz Kermit

pinion
Newbie
Posts: 9
Joined: Fri Apr 27, 2012 4:35 am

Re: OwnCloud v4 and 1&1 shared hosting

Postby pinion » Fri Jun 01, 2012 3:57 am

Between the two of you my life is much better! Thanks for rewriting that remote.php, I've been struggling for days to fine out the problem using it with 1and1. You guys rock!

marty
Starter
Posts: 72
Joined: Tue Mar 20, 2012 2:40 pm

Re: OwnCloud v4 and 1&1 shared hosting

Postby marty » Fri Jun 01, 2012 1:12 pm

@kermit: What problems did you have with remote.php? Perhaps that relates to one of my problems...

Guillaume
Newbie
Posts: 1
Joined: Tue Jun 05, 2012 11:06 am

Re: OwnCloud v4 and 1&1 shared hosting

Postby Guillaume » Tue Jul 17, 2012 11:36 am

Hi,

I've the same problem with my nginx 1.2.2 configuration and owncloud 4.0.4.

Log error appear when i'm trying to connect a caldav/carddav client :
*368 FastCGI sent in stderr: "PHP message: PHP Warning: strpos(): Offset not contained in string in /var/www/owncloud/remote.php on line 10" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: x.xx.tld, request: "PROPFIND /remote.php/caldav/calendars/<user>/<calendar_name>/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "x.xx.tld"

This modification of remote.php resolve my problem at all. Thanks a lot.

mididoc
Newbie
Posts: 5
Joined: Thu Jul 19, 2012 12:17 am

Re: OwnCloud v4 and 1&1 shared hosting

Postby mididoc » Thu Jul 19, 2012 12:25 am

Hi all,

I am a complete newbie, so any help would be appreciated. I have a shared hosting account with 1and1. I uploaded the decompressed owncloud folder to my root directory, and I thought I set permissions correctly. I was able to access the install page, but after I try to put my username and pass in, it gives me the following error page:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /homepages/32/d403152966/htdocs/owncloud/lib/app.php on line 578

Parse error: syntax error, unexpected T_STRING in /homepages/32/d403152966/htdocs/owncloud/lib/app.php on line 578


Does anyone know what I am doing wrong? Thanks!

Regards,
Mike

nathanbeach
Newbie
Posts: 4
Joined: Fri Jul 13, 2012 7:05 am

Re: OwnCloud v4 and 1&1 shared hosting

Postby nathanbeach » Thu Jul 19, 2012 5:03 pm

I also have 1&1 shared hosting and have had the exact same problems. It is because the ownCloud installer overwrites your .htaccess file (see what the first poster on this thread wrote). I just edited the .htaccess file and added back the php6 handler at the top and then everything worked (confusingly on 1&1, PHP6 is actually PHP5.4):

Code: Select all

AddType x-mapp-php6 .php
AddHandler x-mapp-php6 .php


One way to solve this might be to add the above php6 handler to an .htaccess file in a directory above your owncloud install folder, and then ownCloud won't ever overwrite it again. Keep in mind that after you do that, all your folders below that level will be handled by the PHP5.4.

Good luck,
NBB

mididoc
Newbie
Posts: 5
Joined: Thu Jul 19, 2012 12:17 am

Re: OwnCloud v4 and 1&1 shared hosting

Postby mididoc » Thu Jul 19, 2012 5:36 pm

Hi Nathan -

You officially rock. :D

I did not realize the .htaccess file would be overwritten. Adding those two lines of code worked great!

Thanks so much.

Regards,
Mike

bennebaer
Newbie
Posts: 3
Joined: Tue Jul 24, 2012 9:02 pm

Re: OwnCloud v4 and 1&1 shared hosting

Postby bennebaer » Tue Jul 24, 2012 9:06 pm

Hi All,

I'm also trying to install owncloud on 1&1.

I extracted the owncloud 4.05 archive. Then I entered the recommended changes at the top of the htaccess and copied everything to my webspace.

Then I opened the url and got the setup wizard. I entered all data (admin, MySql) and pressed FINISH installation.
Then the following error messages occure:
Parse error: syntax error, unexpected '.', expecting '(' in /homepages/18/.../htdocs/owncloud/index.php on line 32

Any idea what I need to do?

mididoc
Newbie
Posts: 5
Joined: Thu Jul 19, 2012 12:17 am

Re: OwnCloud v4 and 1&1 shared hosting

Postby mididoc » Tue Jul 24, 2012 10:27 pm

Hi,

After you installed the files to your webspace, did you re-open .htaccess and paste these two lines of code in again:

AddType x-mapp-php6 .php
AddHandler x-mapp-php6 .php

During the installation, the .htaccess file is overwritten, and the PHP version reverts back to < 5.3. That should fix your issue (I hope).

Good luck,
Mike


  • Similar Topics
    Replies
    Views
    Last post

Return to “ownCloud Community Edition 5.x and older”

Who is online

Users browsing this forum: No registered users and 2 guests