byorgey / BlogLiterately

Command-line tool for formatting and publishing blog posts.
GNU General Public License v3.0
19 stars 4 forks source link

switch to https doesn't work for older self-hosted wordpress #22

Closed eflister closed 8 years ago

eflister commented 9 years ago

i've been using BlogLiterately to update my self-hosted wordpress blog for a few years, prior to the https thing. i run all the updates on wordpress, but access via https times out. i don't see any settings within wordpress to turn it on.

after updating BlogLiterately to the latest and running like i always have: BlogLiterately --blog http://... gives connect: failed (Connection timed out (WSAETIMEDOUT)), even though i access the blog from a browser using http. using https instead gives the same timeout error in BlogLiterately, but in a browser gives ERR_CONNECTION_REFUSED.

i suppose i have to do something in apache to activate https, but could you just re-enable working with http when that's indicated in the url?

eflister commented 9 years ago

looks like enabling https on a self-hosted install isn't trivial, here's what i can find: https://levlaz.org/secure-your-self-hosted-wordpress/ https://make.wordpress.org/support/user-manual/web-publishing/https-for-wordpress/ http://ryan.boren.me/2008/07/14/ssl-and-cookies-in-wordpress-26/ http://www.wpbeginner.com/wp-tutorials/how-to-add-ssl-and-https-in-wordpress/

byorgey commented 9 years ago

Ah, very sorry about that, it should certainly be possible to make it still work with HTTP as well. I think I know what the problem is. Unfortunately I am in the midst of a cross-country move with some international travel in the mix, so I probably won't be able to get to this for a few weeks. Are you able to still use an older version in the meantime?

eflister commented 9 years ago

np, thanks for the fast response and detailed change log -- super helpful! version 0.8 seems to work fine. where are you moving? good luck and have fun! i just checked the 'about me' page on your blog and was interested to learn you're a jazz head -- wonder if you've ever combined music + haskell in a project? i've been on the lookout for music theory + math peeps to collaborate, tho i know you probably aren't in the market for more projects. :) the two projects i'm most excited about (languishing while i'm finishing a phd in neuroscience):

live coding in haskell: https://code.google.com/p/h1ccup/source/browse/trunk/theory/haskell/src/LiveCode.hs

deriving functional harmony in prolog: https://code.google.com/p/h1ccup/source/browse/trunk/theory/prolog/theory.pl a couple directions i want to take the latter - generalizing common practice harmony to jazz and microtonal contexts, and moving to clpfd constraints instead of straight logic.

ok - sorry for the off topic stalky stuff! ;)

byorgey commented 9 years ago

@eflister, hah, no worries about off topic talky stuff. =) I'm moving to Conway, Arkansas. I've never actually combined music + haskell, though it would be fun (& I have some potential ideas). I haven't played much jazz recently, I mostly just play classical these days.

byorgey commented 9 years ago

I just uploaded haxr-3000.11.1 which I think should fix this. Try rebuilding the latest release of BlogLiterately with haxr-3000.11.1 (you can guarantee it by passing --constraint='haxr >= 3000.11.1' to as a command-line argument to cabal). Let me know if it works!

eflister commented 8 years ago

whoops - BlogLiterately: Prelude.tail: empty list

eflister commented 8 years ago

the command i used was: BlogLiterately --blog http://<snip>.edu/blog/xmlrpc.php --user <snip> --password <snip> --publish --page --postid 999 --title "current" currentBehavior.md

eflister commented 8 years ago

i think this is the problem: https://github.com/akru/haxr/commit/c95025249ee339c4c06c8e74c194f334fcc22682#commitcomment-12267911

akru commented 8 years ago

Hey there!

Prelude U> let Just a = parseURI "http://localhost:3000"
Prelude U> uriAuthority a
Just (URIAuth {uriUserInfo = "", uriRegName = "localhost", uriPort = ":3000"})

tail is needed for correct port parsing with readMaybe.

Seems to look the solution is using tailSafe from https://hackage.haskell.org/package/safe-0.3.9, or create length checking addition.

byorgey commented 8 years ago

OK, this should now be fixed by the release of haxr-3000.11.1.1. Again, rebuilding BlogLiterately with the argument --constraint='haxr >= 3000.11.1.1' to cabal ought to do the trick.