First release - LnBlog 0.1.0

As promised, I've uploaded the first release of LnBlog. You can download it here.

It's still a little rough around the edges, what with this being the first release and all. For one thing, you still have to manually edit the HTML template to change the menubar (where it says "Site map" under the banner) and there isn't yet any mechanism for adding articles to the sidebar. I was going to have all articles shown there automatically, but I'm not entirely sure if that's a good idea. Of course, these won't become real issues until I have some users. ;)

I spent some time tonight fixing a permissions problem. Through a stunning lack of foresight, I failed to account for the fact that the PHP mkdir() function uses the system umask when setting the permissions on new directories. For those who aren't well versed in the ways of UNIX, mkdir() is the function that creates new directories (also known as "folders" in the Windows world) and the umask is a value that essentially determines the default permissions for new files and directories.

On most systems, as on my web host, the standard umask is set to give the file's owner read and write permissions, but only write to anyone else. Well, this turns out to be a problem because LnBlog doesn't yet have a file upload function (that's coming in the next release), so I have to manually upload files via FTP. The catch is that when when LnBlog runs and creates the directories I need to put files in, it doesn't run as the same user account that I use for FTP - it runs as "apache," the web server account. Thus, I couldn't write files to the directories it created.

Fortunately, this was an easy fix. Just change the umask in the directory creation routine and hack together a quick script to change the permissions on the directories I've already created. However, as I was reading over the online PHP manual, I cam across a novel solution to the problem. Somebody suggested using the PHP FTP functions to create new directories. This would allow a script to use FTP-based mkdir() calls and so create directories under my FTP user account. Of course, it would require a little more user setup to make it work, but it sounds like it would be a neat feature to have. It would certainly be better than having a bunch of my data in world-writable directories that I don't own. I think I'll look into that a little further.

You can reply to this entry by leaving a comment below. This entry accepts Pingbacks from other blogs.

Add your comments #

A comment body is required. No HTML code allowed. URLs starting with http:// or ftp:// will be automatically converted to hyperlinks.