Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade 0.27 -> 0.3.1 #464

Closed
perlbo opened this issue Feb 20, 2016 · 35 comments
Closed

upgrade 0.27 -> 0.3.1 #464

perlbo opened this issue Feb 20, 2016 · 35 comments
Labels

Comments

@perlbo
Copy link

perlbo commented Feb 20, 2016

Hi,

i try to upgrade discriped here http://sabre.io/baikal/upgrade/.

But when i call admin page, the page remain empty ?

@evert
Copy link
Member

evert commented Feb 20, 2016

Is it completely white? Is there anything in your error log? What PHP version are you on?

@evert evert added the question label Feb 20, 2016
@perlbo
Copy link
Author

perlbo commented Feb 20, 2016

hi ,, tried again .. play with user right ... now i got this. even with 0.3.3

Errors Uncaught exception during upgrade: exception 'PDOException' with message 'SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'synctoken'' in /share/MD0_DATA/Web/baikal/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php:165 Stack trace: #0 /share/MD0_DATA/Web/baikal/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php(165): PDO->exec('ALTER TABLE cal...') #1 /share/MD0_DATA/Web/baikal/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php(60): BaikalAdmin\Controller\Install\VersionUpgrade->upgrade('0.2.7', '0.3.1') #2 /share/MD0_DATA/Web/baikal/Core/Frameworks/Flake/Core/Render/Container.php(70): BaikalAdmin\Controller\Install\VersionUpgrade->render() #3 /share/MD0_DATA/Web/baikal/Core/Frameworks/Flake/Controller/Page.php(84): Flake\Core\Render\Container->renderBlocks() #4 /share/MD0_DATA/Web/baikal/admin/install/index.php(84): Flake\Controller\Page->render() #5 {main}

PHP 5.5.27 on Qnap 459 Pro II. 0.27 runs fine. revert to 0.27 with Backup works.

@evert
Copy link
Member

evert commented Feb 20, 2016

This implies that the migration to 0.3.3 partially succeeded. The synctoken column is there. It's hard to know where it failed. Make sure that when you upgrade you go straight from 0.2.7 to 0.3.3. No in-between versions. There were some problems with those.

@perlbo
Copy link
Author

perlbo commented Feb 20, 2016

Try 0.27 to 0.3.3 .. same Error. Clean Install 0.3.3 runs fine. Butte need the old Data :-) ?!?

@perlbo
Copy link
Author

perlbo commented Feb 20, 2016

Ok ,, try to configure 0.3.3 new and import calendar and adressbook (only 2 User). When i try to activate use MySql check button this error occour .

exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1102 Incorrect database name ''' in /share/MD0_DATA/Web/baikal/Core/Frameworks/Flake/Core/Database.php:179 Stack trace: #0 /share/MD0_DATA/Web/baikal/Core/Frameworks/Flake/Core/Database.php(179): PDO->query('SHOW TABLES FRO...') #1 /share/MD0_DATA/Web/baikal/Core/Frameworks/Flake/Core/Database/Mysql.php(58): Flake\Core\Database->query('SHOW TABLES FRO...') #2 /share/MD0_DATA/Web/baikal/Core/Frameworks/Baikal/Core/Tools.php(121): Flake\Core\Database\Mysql->tables() #3 /share/MD0_DATA/Web/baikal/Core/Frameworks/BaikalAdmin/Controller/Settings/System.php(108): Baikal\Core\Tools::isDBStructurallyComplete(Object(Flake\Core\Database\Mysql)) #4 [internal function]: BaikalAdmin\Controller\Settings\System->validationHook(Object(Formal\Form), Object(Formal\Form\Morphology)) #5 /share/MD0_DATA/Web/baikal/Core/Frameworks/Formal/Form.php(201): call_user_func(Array, Object(Formal\Form), Object(Formal\Form\Morphology)) #6 /share/MD0_DATA/Web/baikal/Core/Frameworks/BaikalAdmin/Controller/Settings/System.php(46): Formal\Form->execute() #7 /share/MD0_DATA/Web/baikal/Core/Frameworks/Flake/Core/Render/Container.php(62): BaikalAdmin\Controller\Settings\System->execute() #8 /share/MD0_DATA/Web/baikal/Core/Frameworks/Flake/Controller/Page.php(82): Flake\Core\Render\Container->execute() #9 /share/MD0_DATA/Web/baikal/html/admin/index.php(81): Flake\Controller\Page->render() #10 {main}

@perlbo
Copy link
Author

perlbo commented Feb 20, 2016

the Problem seems definitv the mysql option under settings. My old 0.27 has mysql database. If i run 0.3.3 clean and check mysql box under settings every time the error above occour. :-(((

What can i do ?

@perlbo
Copy link
Author

perlbo commented Feb 20, 2016

Hi again. i got it Work. Install from 0.31 and upgrade to 0.3.2 and then 0.3.3 this work ... don´t know why but it work. After i check mysql no error and my data is back again.

But one problem still exist .. sync with iPhone and el Capitan don´t work (with 0.2.7 flat version) was all fine

here my rewrite rule:

RewriteRule ^/.well-known/carddav /baikal/html/dav.php [R=301,L] (cal.php?)
RewriteRule ^/.well-known/caldav /baikal/html/dav.php [R=301,L] (card.php?)
OLD VERSION WAS
RewriteRule ^/.well-known/carddav /baikal/cal.php [R=301,L]

config manual on el capitan/ iphone

https://ip-adress/baikal/html/cal.php/principals/user/
https://ip-adress/baikal/html/dav.php/principals/user/ also don´t work.
OLD VERSION was
https://ip-adress/baikal/cal.php/principals/user/

what is is my fault ?
the only difference between flat install ist the /html/ directory ?

my httaccess file in html directory:

`

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
RewriteCond %{HTTPS} !=on
RewriteCond %{ENV:HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

Redirect 301 /.well-known/carddav /baikal/html/dav.php
Redirect 301 /.well-known/caldav /baikal/html/dav.php
ExpiresActive Off `

@evert
Copy link
Member

evert commented Feb 20, 2016

Before there was indeed a flat installation package, but I've gotten rid of that in the latest version. I felt like it didn't make a lot of sense to have two different packages, so I rather create one that works for everyone.

But you are absolutely right, it does mean that the url structure has changed a little bit. I didn't consider this and will add this to the upgrade instructions.

The difference with this package is that you only need to expose the html/ directory to your webserver.

@evert
Copy link
Member

evert commented Feb 20, 2016

I also updated the docs here a bit:

http://sabre.io/baikal/upgrade/

As for not being able to select mysql, I think you can only do this during the initial install. There's no switching afterwards. On top of that, I think I borked the zip package again so I'll be generating 0.3.4 (but this is only relevant for you if you want to do another fresh install, with mysql)

@perlbo
Copy link
Author

perlbo commented Feb 20, 2016

Ok thank you for you information ... but when i try just to add the /html and change cal.php/card.php to dav.php the sync does not work ... ? Any ideas ?

@evert
Copy link
Member

evert commented Feb 20, 2016

Not without more information. Try opening dav.php in your browser. What do you see there?

@perlbo
Copy link
Author

perlbo commented Feb 20, 2016

if i open the url entered in ios configuration
https:/myip/baikal/html/dav.php/principals/user/ i see a web page in Browser.

sabre/dav3.1.1
Principals/user
go to parent/plugins ...
Nodes
Properties
and so on

seems all fine ...but sync with ios don´t run. on configuration page when the url username etc are checked there comes an error SSL connection not possible. cannot connect

if i go back to 0.2.7 remove /html in redirect (httacces) and change dav.php to cal.php/card.php connection is successfull.

@evert
Copy link
Member

evert commented Feb 20, 2016

  • Are you using ssl?
  • What information (urls) are you using to connect?
  • Make sure that the well-known redirects work from the "root" of your domain. They are 100% pointless in a subdirectory.

@perlbo
Copy link
Author

perlbo commented Feb 20, 2016

Are you using ssl?
Yes, work fine with 0.27.

What information (urls) are you using to connect?
?? Don´t unterstand, what do you mean with information urls

Make sure that the well-known redirects work from the "root" of your domain. They are 100% pointless in a subdirectory.

i know. i use the same redirection file in same root, i use, when i switch so baikal 0.27.

RewriteRule ^.well-known/carddav /baikal/html/dav.php [R=301,L]
RewriteRule ^.well-known/caldav /baikal/html/dav.php [R=301,L]

@evert
Copy link
Member

evert commented Feb 20, 2016

Well, when you setup iOS, what url do you use to tell iOS where to connect?

@perlbo
Copy link
Author

perlbo commented Feb 20, 2016

@evert
Copy link
Member

evert commented Feb 20, 2016

Try using just myip for setting up, nothing more. If your "well-known" redirects are indeed working, that should be all iOS needs.

@perlbo
Copy link
Author

perlbo commented Feb 20, 2016

it does not work :-( ... here ist the htaccess file

http://pastebin.com/CfnVgtJJ

@staabm
Copy link
Member

staabm commented Feb 21, 2016

Because of rule RewriteRule ^\.well-known/carddav /remote.php/carddav/ [R=301,L] the baikal rule will not be reached for carddav

@untitaker
Copy link
Member

There are a lot of rules there that apply for ownCloud, not Baikal. All that redirect to remote.php, essentially.

@evert
Copy link
Member

evert commented Feb 21, 2016

and <ifmodule is in 99% of the cases a bad idea. When you don't have a certain module, you want apache to tell you and give you an error message, not silently ignore it.

@perlbo
Copy link
Author

perlbo commented Feb 21, 2016

changed it this way http://pastebin.com/kTFhSJeu ... does not work :-( ... i am not very advanced with httacces. What should i write instead of IFmodule ?

(And thanks for all your help.. :-)

@evert
Copy link
Member

evert commented Feb 21, 2016

You should delete the entire .htaccess file and create a new one that just contains this:

RewriteEngine On
RewriteRule ^\.well-known/carddav /baikal/html/dav.php [R=301,L]
RewriteRule ^\.well-known/caldav /baikal/html/dav.php [R=301,L]

After that, make sure that your changes were successful by going to:

https://yourserver.example.org/.well-known/caldav 

And make sure it redirected to

https://yourserver.example.org/baikal/html/dav.php

On that url, confirm that you can log in with a username and password. After that, try setting up iOS again, and this time only use yourserver.example.org for the server field. Replace yourserver.example.org with whatever your domain is ofcourse.

@perlbo
Copy link
Author

perlbo commented Feb 22, 2016

Redirection works. The URL will be redirected now in the Browser to https://yourserver.example.org/baikal/html/dav.php and asks me for user and Password.

But Sync with ios/Macosx does not work. No connection possible.
Tried:
yourserver.example.org
https://yourserver.example.org/
https://yourserver.example.org

@evert
Copy link
Member

evert commented Feb 22, 2016

We just had another ticket of someone that also had problems syncing, and this was due to the fact that they didn't have the XMLWriter extension here #468.

Would you be able to share your phpinfo() somewhere, so we can look at a list of installed php extensions? This error should also show up in your php error log, but if you don't have access to that it might be a bit harder.

Worth checking at least.

@perlbo
Copy link
Author

perlbo commented Feb 22, 2016

http://pastebin.com/nkhES8dY hope it help.

short:

xmlwriter
XMLWriter enabled

@evert
Copy link
Member

evert commented Feb 22, 2016

All the required extensions are indeed there, including mbstring. And there's nothing in your error log either that would indicate a problem?

Then the last thing I can think off is, could you create an account for me on your server so I'm able to test OS X myself?

@perlbo
Copy link
Author

perlbo commented Feb 23, 2016

me@evertpot.com for Login informations ? Don´t want post it public :-)

@evert
Copy link
Member

evert commented Feb 23, 2016

Yep that works!

@evert
Copy link
Member

evert commented Feb 23, 2016

I just took a look at your server, and I'm greated with firefox's 'Insecure connection' message. This doesn't bode well, but I'm trying it out with OS X nevertheless.

@perlbo
Copy link
Author

perlbo commented Feb 23, 2016

I think that comes from the "non" official SSL certificate of qnap

@evert
Copy link
Member

evert commented Feb 23, 2016

Yea I'm definitely blaming it on that for the moment. I enabled more debugging information and my console is mainly talking about ssl errors. I'd recommend getting a domain and a real ssl certificate. They're free these days: https://letsencrypt.org/

@perlbo
Copy link
Author

perlbo commented Feb 23, 2016

i will look the next days ... but do you thonk that this will be the Problem ? Baikal 0.2.7 flat runs fine with that ssl.

@evert
Copy link
Member

evert commented Feb 23, 2016

For the moment you can also try disabling ssl altogether and using http to connect, just to validate that it's really related to ssl. However, you can't setup OS X calendar if there's still something running on port 443, so it really has to be off.

Hope that works, and if that's not an answer to your problem come back here and I'll reopen this ticket.

@evert
Copy link
Member

evert commented Feb 23, 2016

It's hard to be a 100% sure. I'm hoping I'm right. Not sure why baikal 0.2.7 would work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants