Non-MySQL blogging?

Discussion in 'Web Design and Development' started by design-is, Feb 21, 2008.

  1. design-is macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #1
    Hi all...

    I wondered if anyone knows of a way to set up a blog within my site which doesn't need MySQL.

    All options I can find require it, and my present hosting package doesn't support it, but it does support php 4 & 5. I know I can sign up to an external blogging option and just link out, but if possible would like to integrate it directly within my site.

    Thanks for reading, and in advance for any useful comments :)
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Well I'm currently working on a XML-based blogging system for my site that doesn't need a database. All the blog entries are stored in XML format and then I use PHP and XSL to retrieve the information and display it. I don't get a lot of time to work on it and won't be adding admin type controls, but would still be possible.

    I've also read about projects that setup XMLDB. You may be able to make use of one of those. There's likely other people working on this so if you do some searching you might turn up something. If you find something you like be sure to post back. I wouldn't mind hearing from people implementing such a system.
     
  3. CoreWeb macrumors 6502

    Joined:
    Mar 2, 2007
    Location:
    Edge of reason
    #3
    A simple method may be to use the filesystem to store blog posts... but a database is much nicer, in my opinion.

    If you were to write something which used the filesystem, it could use a folder in which files for each entry would be placed, and then use the file creation time to sort through... but performance might be a bit spotty. Alternatively, it could use a file xref-ing the files for each of the blog posts in the order which they should appear in the blog.

    To improve writing performance, the file could be appended to (rather than prepended to) but then you'd have to read the file backwards. If you make each file xref record have the same length, then you could actually seek to the end of the file minus 25 * (the length of a record) to get the last 25 blog posts, then reverse the order.

    For tagging, a similar method could be used: an xref file for each tag.

    The blog could, however, be rather inflexible, as it would be difficult to remove blog entires (unless you just blank out the lines) and extremely difficult to insert and reorder. A possible solution would be to use linked lists of entries rather than single entries - in such a solution, the xref file would start with an identifier (perhaps a byte offset) of the last entry, which would point to the second to last, and so on and so forth. However, performance would then degrade as more and more posts are processed; if you have 1000 posts and someone looks at post 1000, the server will have to process through 999 first.

    However, with a linked list, it would be trivial to create a page index which increments every time a post is added -- it would have records linking, for example, page 1 with the most recent post, page 2 with the 25th most recent post, and so on.

    To allow URLs like myblog.com/2008/02/23/mypost, you could put the entry files into that same structure: a folder for 2008, a sub-folder for 02, and a sub-sub-folder for 23. The xref files for both tags and the entire blog would include the path (ie: 2008/02/23/blogpost.xml)


    As for XML: large XML files can be unwieldy, which is why I recommend having many, separate files instead (whether you use XML or not).
     
  4. saltyzoo macrumors 65816

    saltyzoo

    Joined:
    Oct 4, 2007
    #4
    blogger allows you to customize your blog html completely to fit your look and feel. They also allow you to publish onto your site so it is transparent.
     
  5. design-is thread starter macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #5
    Thanks for all your input guys!

    I will continue to research this until I find something more solid.

    Feel free to continue discussion as I'm sure it will help. Or post solutions if you come across any :)

    I will have to look into this, thanks for the info!
     
  6. rufhausen macrumors regular

    Joined:
    Jul 5, 2007
    Location:
    Littleton, CO
    #6
    Sorry to point to the negative here, but I'd be a little leery of a host that supports php 4/5, but not MySQL. The two really go hand in hand.
    If you're not willing to move hosts, then the blogger solution mentioned by someone else is probably your best bet.

     
  7. design-is thread starter macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #7
    Its a good host... well, its served me well anyway.

    http://streamline.net/wh.php

    I just went for the home user when I registered because at the time thats all I was... Now I need a little more but am reluctant to pay more if I don't need to - obviously :)
     
  8. Stampyhead macrumors 68020

    Stampyhead

    Joined:
    Sep 3, 2004
    Location:
    London, UK
    #8
    Exactly. That's pretty much a standard these days. If you're not getting MySQL included, even with the cheapest package, then you're not getting your money's worth. Compare your current hosting with GoDaddy's $3.99/month (or $45/year, not much more than you're paying now) basic hosting that includes MySQL. Sorry, I know this is a bit off topic, but I hate hosting companies that try to cheat their customers. I say force them to be competitive or move on to someone better.
     
  9. ChrisA macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #9
    Grab "SQL Lite" and use that. It's free. SQl lite is a DBMS that does not use the client/server model. It is just a library that you link into your own code. It works as a layer above the file system.
     
  10. design-is thread starter macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #10
    Interesting... I'll look into this tonight. Thanks very much!
     
  11. ChrisA macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #11
    You should not have to look to far. SQLite ships as part of Mac OS X.
    there are man pages included. To get started open up terminal and type "man sqlite3"
     
  12. MegaMan1311 macrumors regular

    Joined:
    Jun 30, 2007
    Location:
    USA
    #12
    Use cutenews. It isn't very advanced, and it isn't developed anymore, but it does work, doesn't use mysql, and has a decent developer community.
     
  13. design-is thread starter macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #13
    Thanks again for all your help guys and girls :)

    It is much appreciated!

    -UPDATE- Just to update, cute news is working great for me :)
     

Share This Page