Errors

Posted on August 21, 2010

During the past week this website has been down for a database problem. It turns out some of the tables crucial to the running of WordPress required “repair”. Apparently, there is even a “REPAIR TABLE” command in MySQL. I’d never had to use it before, so I didn’t know it existed. Pretty handy thing to have. The tables are repaired and the blog is working again. I’m still not sure why it happened, but if it happens again, I’ll know what to do.

Now I have to clean out the spam queue.

Filed Under Code, Journal, LAMP, WordPress | Leave a Comment
Tagged with: , , ,

MediaWiki and image gallery columns – mini-tutorial

Posted on March 16, 2009

I’m mainly noting this for posterity, because I couldn’t find a quick answer online and finally figured it out after a day or two.

Last year I setup a MediaWiki site for work to take the place of a site one of the resident’s had setup. The site’s overall look-and-feel has to comply with standards from the School of Medicine, and this year they’ve redesigned everything. I like the school’s new design concept, since the old one was starting to feel dated. Still, it takes work to convert a site from one theme to another.

The previous design took up almost the entire width of the browser window, which means MediaWiki could easily accommodate 6 columns of image thumbnails. The downside is it’s hard coded into the MediaWiki code. It’s a variable, but not one that’s documented. Normally, variables that are meant to be changed in MediaWiki are meant to be included in the LocalSettings.php file or the includes/DefaultSettings.php file. However, in the includes/ImageGallery.php file is $mPerRow = x; near the beginning of the file, where x is the number of columns. It can be set to whatever is appropriate, so I set it to 4 for the new layout.

The moral of the tutorial is that it pays to look in unusual places if you are hunting for some hidden variable.

Filed Under Code, LAMP, MediaWiki, Net, Open Source, Work | Comments Off
Tagged with: , , , ,

It’s a small world after all

Posted on June 2, 2008

Two things: first, I’m reworking the site a bit and trying to develop a look that will work with both MediaWiki and WordPress. I have the WP version started, but not yet finished, which can be seen over here. Given the architectures of MW and WP, the overall look will have to be coded separately for each piece of software. It still has a way to go yet, and there is a glitch in viewing it in Firefox 3 RC1, though it seems to look okay in Firefox 2, Opera, and Safari.

[edit: it's finished now and looks fine in Firefox 3 RC1]

Second, coming in this morning I saw bicycle commuter coming in a door I was passing by. However, what caught my eye was the bike jersey he was wearing. I saw the logo of Bristol Brewing’s Laughing Lab Scottish Ale and did a double take. I’ve never seen Bristol beers here in Indy, so it was strange to see the jersey. I stopped and talked with the guy for a few minutes, and it turns out his brother works for Bristol Brewing as a QA person (what a job that must be :-D)

Filed Under Code, Indy, LAMP, MediaWiki, Net, Society, WordPress | Comments Off

Senile computing

Posted on February 17, 2008

A week ago I did an upgrade of the site to the latest version of WordPress, but I kept getting an error Fatal Error: PHP Allowed Memory Size Exhausted then it would give the name of a script and a line number. Browsing around the net, I was able to figure out the problem and find some solutions.

The problem is an issue with the default setup of PHP, where is has a memory limit of 8 MB. This isn’t necessarily a big issue, but some more sophisticated scripts require more memory of the server, and since PHP is limiting how much memory is allocated, it returns a fatal error if a script wants too much.

The first solution is to change the memory_limit section of the php.ini file on the server. However, since this site is hosted, I don’t have access to that for security reasons. Also, most hosts are not inclined to change those setting for fear they will break other sites they host. Makes sense.

The second solution is to add the line php_value memory_limit 32M to the .htaccess file in the root directory of my site. I did this and it didn’t work. I tried it with different memory values with no success. I tried using M, MB, and Mb, also with no success. This was really frustrating because the FAQ for my hosting service said to change values in the .htaccess file as an alternative to making changes to the php.ini file.

The third solution is to add ini_set(‘memory_limit’, ’32M’); to the top of each script that might require extra memory. Depending on how your scripts are setup, you might be able to get away with adding this to a header file or template file. It didn’t seem to work for me, until I added it to the upgrade.php file for WordPress. It’s not a very elegant solution, but it works. I actually added 64MB because I was frustrated.

I still don’t know why the second solution didn’t work, unless the server is ignoring that portion of the .htaccess file. I can’t say I’m 100% pleased about it, but if it happens in the future I will know what to do.

Filed Under LAMP, Net, Open Source, WordPress | Comments Off

PHP 5 and WP 2.2.2

Posted on September 2, 2007

As I’m prone to do, I decided to give myself a project this weekend. It involves the Lingo/Giraf thing I was working on months ago. My coding skills aren’t quite that good, so I figured I would see if MediaWiki 1.10.1 could be adapted for use in that project. It looks like it works okay on my PC, but with the site on the PC, I can’t check it with the Palm T|X.

Long story short, I upgraded the whole website to PHP 5. As suspected, it broke some things, namely WordPress. I upgraded WordPress to 2.2.2 to see if that helped, and it didn’t really. What I had to do was remove the SpamKarma2 plugin along with the wp-contact-form. The contact form isn’t a big loss. SpamKarma2 was a mixed bag. Ever since installing it, I would get all kinds of fatal errors relating to memory (e.g. tried to allocate …). Plus, I found myself logging in less often because I knew SK2 would take care of the spam. I got lazy.

Anyway, WordPress seems to be back to normal more-or-less, minus a couple of plugins. I’ll probably have to sort out problems as they occur.

Filed Under Code, Journal, LAMP, Net, Open Source, TESOL, WordPress | Comments Off

Version control

Posted on June 3, 2007

A lot of coding projects, but not all, use some type of version control. For years CVS was the big thing, though it apparently had some shortcomings. A few years ago, Subversion came out to address some of those problems. I don’t know what the problems were. I’m just going by what I’ve read. Sourceforge offers CVS and Subversion for projects to use. Projects don’t have to use them at all. They can just release the files and packages if they want. However, if a project has multiple developers or users who want to be on the bleeding edge, then version control is good idea.

Since CVS is supposed to have problems, I figured I would try out Subversion. I spent most of the wee hours trying to figure it out and failing. Over the past hour or so, I think I got it. I started the project on my PC at home. With svn (actually with RapidSVN – a GUI Subversion client for Gnome), I imported the files from giraf-wc/ into the Sourceforge repository. The problem I had was if I created or altered a file in giraf-wc/ I couldn’t get svn to update the repository. What I had to do was checkout the repository into a new directory on my PC called giraf-co/. I probably could have cheked it out to the giraf-wc/ directory, but I didn’t want to take the chance of losing any files.

Anyway, now I have svn working fairly smoothly. RapidSVN is a great tool once I figured it out. I would hate to have to do all this via the comand line. Maybe a tool like that would change Linus’ opinion.

Filed Under Code, Journal, LAMP, Net, Open Source | Comments Off

Hooray

Posted on June 2, 2007

Yay! After spending some time with it, I was finally able to get Apache working with PHP on my PC again. While it had no problem with plain HTML files, for PHP, my browser would ask if I wanted to download the file and open it in a text editor. HTML would open like a normal webpage. Since my browser had no problem with PHP on other sites, it was apparent it was my setup was the problem. It turns out it was a matter of enabling the php5 module for Apache. One issue solved. Now it will be easier for me to work on development of Giraf/Lingo.

In other important news (to me, at least), I sent in a registration for Giraf with Sourceforge on Friday, and today it looks like they accepted it. You can check it out here. I guess this makes it somewhat official (even if it is ranked 21,017 at sourceforge). I also guess I better get working on it.

As a sidebar, the Sourceforge registration process isn’t what I expected. I figured it would be automatic after filling out a form, but it isn’t. They want to know about the project and what the developer hopes to accomplish. Kind of interesting. On the other hand, I don’t know what kind of decision process they go through. It might just be a matter of making sure everything is filled out correctly.

Filed Under Code, Journal, LAMP, Net, Open Source, TESOL | Comments Off

Moodle is as Moodle does

Posted on May 31, 2007

I’ve been fooling around with Moodle and decided it probably isn’t the best for me and what I want to do. It seems very versatile and has a bunch of modules teachers can us, but it also seems a bit crufty. I’m not that inclined to get into the code to work on it.

I think it maybe it’s trying to be too many things to too many people. I’m also reminded of the old idea that you write a speech or essay to the intelligence level of your audience. I think Moodle is trying to make things simple for educators who aren’t inclined to learn UNIX commands, system administration, or computer programming. I can understand the reasoning behind that, however, I’m often frustrated by things that are “dumbed down” in my opinion. This applies to a lot of programs, not just Moodle.

If I am presented with a set of choices, I am limited to those choices. If I want to accomplish something not on that list, I have to give up doing what I want or I have to do it myself. If I have to do it myself, why bother with another program in the first place. So, I’ll probably start on Lingo again.

I did learn some of the issues of programming for the mobile web. Not all mobile browsers will accept cookies. Also, not all of them will read CSS. I can see myself working a bit more with HTTP_USER_AGENT to work through some issues. It still doesn’t help me with Unicode and the Palm Pilot, but I can at least use the T|X to view the site and figure out how the site works on a mobile platform.

Filed Under Code, Journal, LAMP, Net, TESOL | Comments Off

A Confederacy of …

Posted on May 20, 2007

In the book A Confederacy of Dunces there is a quote at the front by Jonathan Swift:

When a true genius appears in the world, you may know him by this sign, that all the dunces are in confederacy against him.

While I wouldn’t call myself a genius (I’m much too humble ;-) I certainly feel as if Dame Fortuna is against me at the moment. I decided to give Moodle a shot last night, so downloaded it. My PC has had a problem with Apache running PHP, but this has been going on for a while and since I have a webhost where I can upload things to try out, it isn’t such a big deal. I extract the zip file locally and upload it to the webhost. I start going through Moodle’s install script…and it gets to a point where it checks to see if my setup is minimally required, and it isn’t. It requires UTF-8 and MySQL 4.1. The server my site is on apparently uses MySQL 4.0 (strangely, the webhost’s main site says they have servers with MySQL 5.0.*). I didn’t see UTF-8 in the character sets for MySQL, but it doesn’t seem to have a problem with handling UTF-8. I’ve installed WordPress and MediaWiki without this problem and both of those use UTF-8. I have a feeling Moodle asks MySQL what character sets it supports and if it doesn’t see UTF-8, it gives an error. I think WordPress and MediaWiki probably just send the data without checking, or maybe the server had UTF-8 capability when I originally installed it. So this means I can’t install Moodle on my PC or my webhost. I’ll be talking to the webhost, but I’m going to try and set it up on my laptopt for the time being. The performance will be bad, but at this point I’m just wanting to tinker with it.

Filed Under Code, Journal, LAMP, Net, Open Source, TESOL | Comments Off

whelmed

Posted on May 19, 2007

If you ever get a chance, pick up a book called The Mother Tongue: English and how it got that way, which I think is by Bill Bryson. It’s a book with all kinds of anecdotes about the English language. One of those anecdotes is more of a question: How come we can be overwhelmed or underwhelmed, but not just whelmed?

To put it in context, I’ve spent a large part of the day looking for anything to do with Unicode on Palm Pilots. I’m overwhelmed by the amount of information and underwhelmed by the performance (for lack of a better term). There is a lot of information regarding Unicode and Palms, or international character sets and Palms, but it boils down to A) Palm OS doesn’t support Unicode normally, and B) Buy our software. It seems like there is a lot of software for Palms that support international character sets, and a few that even support Unicode, but none of them (that I could find) were web browsers. There is one web browser that is in beta which is supposed to support Unicode kinda/sorta, but the website is down, so that idea is out the window.

There is a rumor that Palm may support Unicode in the future. They are on a panel at the Unicode Consortium, and I think I read they hired a VP who previously worked at the Consortium, so it bodes well for the future.

However, none of that helps me with my endeavor at the moment.

I did see that Moodle has a small Moodle for Mobiles project going. I first heard about Moodle when I was doing research for one of my papers this past semester. It’s an open-source courseware project, similar to the Sakai project (a/k/a Oncourse CL if you go to IU), though it seems to have a larger community. Plus it is PHP/MySQL. I’m thinking about starting to use that instead of continuing with my own project.

With the Moodle for Mobiles project (MOMO), they have a way to convert (or they are working on it) UTF-8 into other encodings. That won’t help me with my Palm since it can’t read the other encodings either, but I can use the Palm to work out the accessibility of the site and use my regular browser to work on the content. So, Moodle would just be a regular website and MOMO is a user-agent sniffer that serves up a special webpage for mobiles. I figure I’ll give it a shot at least.

Filed Under Code, Journal, LAMP, Net, Open Source, TESOL | Comments Off

Next Page »

© Copyright gottahavacuppamocha • Powered by WordpressCoffee Candy is based on the Eye Candy theme.