Laconica Web-Based Installer

Posted by JuanJose on Oct 3, 2008 in PHP Programming, Programming, laconica |

UPDATE:

I couldn’t sleep again, so I finally got around to getting a very very very badly done but working version of the web based installer finished. Grab a copy of the file below – throw it up wherever you want to install laconica and fill in the info. This should get the majority of people who meet the minimum requirements up with a very basic install.

The Installer

END UPDATE – Everything below is old news!

I was a little bored this morning (AKA “I Couldn’t Sleep Again”) and ended up starting work on a web based installer for laconica. This is something which is currently sorely lacking from the software and would make the lives of many people who are trying to get this working much easier (not just for those users on dreamhost like my shell script).

Anyhow I got as far as checking for all the system requirements, php modules, apache version (I’m trying to find a way to check for modules on all environments not just mod_php so I can test for mod_rewrite), and a check to see if the laconica files have been uploaded if not then it downloads the laconica tar ball (if Evan is reading… it’d be nice if there was a laconica-latest.tar.gz!).

I should get a decent bit further tomorrow or the day after, it’ll be nice to have a web based installer. You can see the current (very ugly looking and horribly coded script) in action here:

http://laconica.gimmesoda.com/install.php

Alright, enough talk – sleeping time!

*** Update ***

I did quite a bit of work on this (dead tired now). I’ve now completed testing for what I believe to be every requirement needed by Laconica, except for the external libraries as those should come with the package! I’m hoping soon, since this installer won’t really be able to pull off a complete install without them.

I have worked out the logic (very very messy) for the whole archive issue, so if your host allows you to use the ‘exec’ function and the ‘tar’ binary can be found on your server using the ‘which’ command then you’re in luck. The install will automatically do the following:

1) Detect that laconica files don’t exist yet
2) Download the archive
3) Extract the files
4) Move the extracted files to the working directory
5) Test to make sure the files were moved correctly

The installer will also test for your mysql version (even for those not using localhost) since it will connect to and query the server you will be using there is no confusion as to what version of MySQL you are really using. Finally – and this is the last thing I worked out, the installer will also check to see if the InnoDB storage engine is installed.

So, it’s definitely coming along, I should have something working very soon now.

http://laconica.gimmesoda.com/install.php

Of course I just dedicated a good four hours of what should have been my sleep to this and I do work tomorrow… or ummm later today… so off to sleep I go, with any luck the baby girl won’t wake up in an hour… like usual!

For anyone interested in the core logic for the laconica installer I’ve copied the current code to this:

http://laconica.gimmesoda.com/installer_class.txt

And no complaining! I did warn you all that it would be ugly, but overall it seems to be working decently atleast in my testing. I’ll release the whole installer package when I get the installer working on my end, but for now you can atleast see the functions I used to perform my testing.

*** Another Update ***

More code cleanup + the initial release of code – still doesn’t complete the install but it gives you an idea how I’m doing this so far and I’m definitely going to need people to look it over. Continues to be an ugly duckling.

GimmeInstaller Alpha

Tags: ,

10 Comments

  • Hey, this is great! Are you on the Laconica-dev list? Let’s get this into the core release ASAP.

  • JuanJose says:

    I am actually on the list BUT I haven’t checked in for awhile (much like the WP list!). Once I get the installer finished I’ll release the code for it. I do warn you though, it is UGLY! I was half asleep while writing it.

  • Greg Hirsch says:

    Hi,

    I would like to install a copy of Laconica on my website.

    I am willing to test the web install with you.

    Thanks,

    Greg

  • JuanJose says:

    Hey Greg – As soon as I get it to the point where it actually does do an install on my own setup I’ll release the code for people to test out. I’ll be happy to get any feedback/bug reports at that point.

  • Greg Hirsch says:

    OK Great – Please let me know.

  • Macc says:

    It`fantastic…..

    Any news on progress…

    I would love to have laconica on my server as well..

    Could you help?

  • JuanJose says:

    Hey Macc,

    Unfortunately not really much progress being made at the moment. With any luck I’ll get some time to continue work on it soon! I’d love to finish this up.

    What trouble are you having getting laconica installed on your server?

  • JuanJose says:

    It’s 5:13 in the morning (gonna start work in a few hours) but I was able to push out a somewhat working version of the installer and notified Laconica Dev list.

    Comments are appreciated.

  • chndsor says:

    I tried it on my root-server, because i didnt get the normal installation! :)
    I installed your install.php and the directory in a sub-directory of my root:
    http://33.33.33.33/laconica
    and typed the things in and started this result:

    Testing Requirements
    Checking for MySQL Extension: Passed
    Connecting to MySQL: Passed
    Selecting Database: Passed
    PHP Version: 5.2.8-0.dotdeb.1 Passed
    MySQL Version: Passed (Verion: 5.0.67-0.dotdeb.1)
    InnoDB MySQL Storage Engine:: Passed
    Checking for Curl Extension: Passed
    Checking for XMLWriter Extension: Passed
    Checking for GD Extension: Passed (Version: bundled (2.0.34 compatible))
    Checking for Memcache Class: Failed
    Checking for MailParse Extension: Failed
    Apache Version Check: Passed (Version: 2.2.3)
    Key File Check: Failed: Checking for options.
    Function ‘exec’ Test: Passed
    Looking for ‘tar’: Passed

    Warning: fopen(laconica-0.6.4.2.tar.gz) [function.fopen]: failed to open stream: Permission denied in /var/www/laconica/installer/code/laconica/installer_class.php on line 201

    Warning: curl_setopt(): supplied argument is not a valid File-Handle resource in /var/www/laconica/installer/code/laconica/installer_class.php on line 203
    ��z�WI����c����(�t�o^LVQ8��%����R���э� y �d�$�9�K�L�È,é7{B<жy�H��$��2&��x}yK���B�
    (…)
    qߕtk�qe^��X�’��7��’���9���������������������������������������������������������ek�PP�Downloading Laconica: Failed!
    You should download and extract the archive yourself. Sorry!
    Requirements Testing Failed!

  • varomix says:

    OH my gosh!! you are a damn genius man

    thank you

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.