EasyInstall of Laconica on DreamHost!

Posted by JuanJose on Jul 5, 2008 in Programming, bored, laconica |

Yet another update! Check out:

Another Laconica Easy Install Script Update

Old Update:

Scripts for the install are finished and are located here:

http://www.gimmesoda.com/2008/07/13/laconica-easy-ish-install-scripts-finished/

——————–

I’ve got most things worked out for the autoinstall – all I basically need to do now is have the scripts do the config and run the mysql command. The second of the two is simple, the first well there are a few little hacks to the code that need to be done but I should be done with it tomorrow.

You can find the current bash scripts here: http://laconica2.gimmesoda.com/

—————————–

So yeah… I’m working on a script that should help setup a Laconia install on DH without any problems. Still writing it and hopefully should have it done soon. I’ll keep all you crazy people up to date on this post!

Don’t forget to check out: http://laconi.ca/

—-

After a bit of work it looks like it’s going to take few mods to the config file and a custom PEAR install on the DreamHost account that is going to be running this. I should hopefully have a script for this finished soon! Give me a day or two (hopefully before my baby girl is born!) and I’ll have it done – otherwise you’ll have to wait until things calm down with the new baby around.

For those who are interested I’m using the instructions found here as the base of my script:

http://decafbad.com/blog/2008/07/03/getting-laconica-up-and-running

You can also find my test install of Laconica here: http://laconica.gimmesoda.com

—-

In order to use sockets it looks like we need a custom install of PHP on DreamHost. Not a bid deal and something I prefer actually, it gives you more control over the php.ini file and you can compile in any extra things you need – such as IMAP support. If you need it.

—-

I may have mentioned this before but it is becoming all the more evident – get that PEAR repository installed on your DH account! It can be a pain to setup sometimes, especially if you aren’t used to working on the shell command, but it’s worth it:

http://wiki.dreamhost.com/PEAR

—-

Another update. I’m actually at the hospital right now watching my wife and baby girl sleep so I decided to get a little more work done. I’ve finished up the initial PEAR install script, which creates a nice clean PEAR repository setup and sets PHP5 as the PHP version used by PEAR and testing it out it works pretty smoothly!

You can grab a copy of this at: http://laconica2.gimmesoda.com/install_pear.sh I’ve tried to make this as safe as possible in case you need to run it multiple times BUT no guarantees your account isn’t going to meltdown! ;)

Make sure to modify the second line and use your own user:

export CURUSER=”puretest”

Oh and for anyone interested, her name is Ileana Sarai Galvez.

-JJ

31 Comments

  • Douglas says:

    I’m nervous that a custom install of PHP will break my recently released WordPress WicketPixie theme. Will Laconica work under the PHP 5.2 that DreamHost provides?

  • JuanJose says:

    I was able to get it to work with the base PHP install, but just so you know there won’t be any way to get the jabber integration working (I don’t think it’s working now anyhow) without customizing PHP.

    Also, if you install on a sub-domain you can easily enable the custom PHP for the sub-domain and not your WP install, they basically get treated like separate sites. Anyhow, you’d have to modify the .htaccess for your WP in order to get it to use the custom PHP – so you’d be safe anyhow.

  • Neal Locke says:

    Awesome! I’ve been getting frustrated trying to get laconica up on dreamhost, but I’m kind of in over my head php-wise, so I’m looking forward to your script.

    I’m getting the following error messages:

    Warning: require_once(DB/DataObject.php) [function.require-once]: failed to open stream: No such file or directory in /home/.matuxa/iraneal/opensourcefaith.org/lib/common.php on line 32

    And:

    Fatal error: require_once() [function.require]: Failed opening required ‘DB/DataObject.php’ (include_path=’.:/usr/local/php5/lib/php:/usr/local/lib/php’) in /home/.matuxa/iraneal/opensourcefaith.org/lib/common.php on line 32

    Is it worth slogging through with some help, or do I need to just wait for your script?

  • JuanJose says:

    Slog away!

    My guess here is that you don’t have a custom PEAR install setup at DH. That’s another script I’m working on in order to get this installed easily. You can find the instructions needed for this install over at the DH wiki:

    http://wiki.dreamhost.com/PEAR

    Other then that, you’ll need to add this line to your config file:

    ini_set(‘include_path’,ini_get( ‘include_path’ ) . PATH_SEPARATOR . “/home//pear/php”);

    That way it knows where to find your pear repository.

  • Neal Locke says:

    No, it’s not that. I did install PEAR using the instructions from the dreamhost wiki, and I did modify the config file to point to the pear repository. There was some discussion on 0xDECAFBAD’s how-to guide about whether or not it was necessary to modify dataobject.ini — did you do that? (I did.)

    Also, I put /extlib in the same folder as the laconica install — should it have been in my home directory? (can’t imagine why this would matter as long as I pointed to it correctly in config file, though).

    I think there’s a very distinct possibility that I’m somehow referring incorrectly to my mysql database in one of the config files. Either that or some other rookie php mistake…

    If you’re still bored, I can send you a copy of my config and dataobject.ini files…

  • JuanJose says:

    Actually if you just send me the location you’re trying to get this installed on I’ll take a quick look.

    I actually work tech support over at DH so I’ll go ahead and help you out.

    As for PEAR: Even if you did the install for PEAR it looks like your include path is missing:

    include_path=’.:/usr/local/php5/lib/php:/usr/local/lib/php’

    The directory that should hold the pear files isn’t listed.

  • Neal Locke says:

    Great — the location is http://opensourcefaith.org

    And I love Dream Host. You guys are about as opensource as it gets (which is also why I really want laconica to succeed). I sumbitted a “suggestion” for a laconica one-click-install today…

  • JuanJose says:

    I moved the line into the common.php file and it seems that does the trick. Problem here is that the application should be setup to read the config before including files – at least that’s the way I would have done it – having to hack files about like this is never fun.

    Anyhow it brings you one step closer!

    Enjoy!

  • Neal Locke says:

    Thanks! New error, new day…hopefully I can figure it out from here, but if I get stuck again, I’ll probably come running ;-)

  • JuanJose says:

    That’s not the worst error actually, head over to your classes/ directory and copy the stoica.ini file and name it:

    yourdbname.ini

    Also, make sure you have all your database information correct in the config file!

  • Neal Locke says:

    I had the stoica.ini file changed to my database name, but then changed it back (and have now again switched it back to my database name).

    So that leaves the database information in the config file.

    According to the pear website, I think it should read like this:

    $config['db']['database'] = ‘mysql://iraneal:*******@mysql.opensourcefaith.org/laconica27′;
    $config['db']['ini_laconica27'] = $config['db']['schema_location'].’/laconica27.ini’;

    where ‘*******’ is my password.

    Still getting the error message, and wondering if there’s a somewhere that shouldn’t be there?

    Or, if my changes to the dataobject.ini file are the problem?

  • JuanJose says:

    You’re all set. It looks like you hadn’t run the sql file in the db/ folder. I did it for you. I also re-commented the debug line in the config file.

    Enjoy!

    Now wouldn’t a script have just been easier!?

  • Neal Locke says:

    Ummm….hell yeah, a script would have been easier (since obviously I couldn’t quite get it on my own). But that’s the beauty of the opensource community. Thanks, man. I definitely owe you a soda.

  • Neal Locke says:

    Ok, now I’m trying to play with the remote subscribe thing. Works on your install, but not mine. Per OxDECAFBAD instructions, I need to:

    sudo chown -R www-data avatar
    sudo chmod -R ug+rw avatar/

    Of course, I can’t do sudo on DH, but the chmod seems to work fine without it. The chown, on the other hand, is giving me an ‘Operation Not Permitted’ message. Do I need to use a different user than “www-data?”

    Looks like I might need to send you a whole six pack…

  • JuanJose says:

    Actually on DreamHost all your websites and php processes are run under your specific user and the default permissions are enough to allow you to write to the avatar/ folder. So you shouldn’t have to change the permissions or folder owner.

    As for the remote subscribe thing, we’re talking jabber here right? I opened up the ability to use sockets() in php by compiling a copy of it myself.

    http://wiki.dreamhost.com/Installing_PHP5

    It’s fun stuff.

  • I’m hoping to get an install of Laconica up on my DH account soon, and your in-progress script will make things much easier!

    One thing I’ve noticed, though, is that when using IE6 (I’m forced to at work) every single one of the ‘federated’ laconica installs (gimmesoda, decafbad, opensourcefaith, etc.) the browser tried to download the php rather than display it – something screwy in the headers, perhaps?

    (identi.ca seems fine, btw)

  • JuanJose says:

    Wow IE6, I’ll have to do a plain install of XP on a virtual machine so I can test that out. That’s really odd!

  • JuanJose says:

    I just ran a test using:

    Internet Explorer 6 SP1b Update

    No problems displaying any of these installs so far. Any more details you can give me Colin?

    Thanks!
    JJ

  • congratulations on the baby, and thanks for the script.

    I was following the the dreamhost wiki method of installing PEAR (at least, i thought i was !!), but couldn’t get the DB module to install properly – I was getting the error:
    Failed opening required ‘DB/DataObject.php’
    that everyone else got, becuase while the PEAR directory had a DB directory, there was no DataObject.php file in there.

    Anyway, I’m gunna have a go with your script (after I cleanup last nights efforts).

    BTW, Thanks for your efforts on our behalf.

  • OK status update (2:45 AM here )

    0) Already had the source and DB installed, so I ran the install_pear script followed by the instructions in http://wiki.dreamhost.com/PHP.ini. I modified the include_path string in my 2bgods.com/laconica/cgi-bin/php.ini to include the pear libraries created by your script

    1) I was having problems with a call to markdown.php – I couldn’t find (i’m using the 4.2 source), so I commented that line out

    2) I was having problems with a call to markdown.php – I couldn’t find (i’m using the 4.2 source), so I commented that line out

    3) I had problems with the DB connec. That was simple to sort out (had some typos).

    4) now connecting OK, but requires the markdown.php file

    I’ll see if I can get this file … probably should be in the */lib or */classes directories…

  • checked both laconica-0.4.1.tar.gz and laconica-0.4.2.tar.gz and there appears to be no markdown.php file..

    Then I RTFM (i.e the doco you refer to above). I hadn’t downloaded / installed the non PEAR dependencies.

    D’OH !!! Anyway, these are in a library at the $HOME level, same as pear, and are referenced by use of the include_path variable in the $HOME/2bgods.com/cgi-bin/php.ini.

    So all working, at laconica4.2 level at
    http://2bgods.com/laconica

  • [...] laconi.ca is successfully installed at 2bgods.com, thanks to the combined documentation of decafbad and jj galvez. [...]

  • JuanJose says:

    Congrats on getting this working Martin! Once you actually find all the needed steps it isn’t as difficult, of course we’re just concentrating on the DreamHost setup – which obviously isn’t as common as say cPanel – still I’m glad my scripts are being used and hopefully I’ll get enough done tonight to call it a working version 1!

  • Dan Brickley says:

    Excellent, seems you’re much more up with PHP and DH issues than me. I’ve been collecting tips in http://laconi.ca/Main/LaconicaOnDreamhost … but was reluctant to go the route of a custom php.

    Where are sockets needed? just xmpp daemon?

  • Neal Locke says:

    Congratulations! Sarai is a lovely name. Of course, you realize the programming language for “Gerl Script” is the most complicated one of them all to learn, right? ;-)

  • JuanJose says:

    @Dan: Yeah as far as I can tell the XMPP daemon needs it, other then that I haven’t seen it used anywhere else in laconica, but then again I haven’t a good amount of time to really review the code.

    @Neal: Thanks! Complicated or not I’m glad to have the need for it. :)

  • BuBz says:

    Hi!
    How can i change default language. I change language configuration in config.php – it doesn`t work!

    Thanks!!

  • BuBz says:

    Anyone ?

  • JuanJose says:

    Check the laconica README file:

    Translations in Laconica use the gettext system (http://www.gnu.org/software/gettext/).
    Theoretically, you can add your own sub-directory to the locale/
    subdirectory to add a new language to your system. You’ll need to
    compile the “.po” files into “.mo” files, however.

Leave a Reply

XHTML: You can use these tags:' <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2006-2010 Gimme Soda All rights reserved.
Desk Mess Mirrored v1.4.6 theme from BuyNowShop.com.