Tag Archives: mysql
September 26, 2013

Using Vbulletin’s Impex Import System With Newer Versions of MySQL

vbulletin-logo-2013

vbulletin-logo-2013If you are moving a forum to Vbulletin or, like me, need to move an existing Vbulletin install around, then you might end up using Vbulletin's "impex".

Impex is an import system that allows you to import users, posts etc., from a very large number of bulletin board and forum software into Vbulletin.

To save your sanity - remove the CMS / Forum software importers that you won't be using from:

/impex/systems

I was using Vbulletin to Vbulletin so I nuked all the others - if you don't you'll end up with a confusing mess

For some bizarre reason the code in the index.php makes reference to some SQL that will not work with MySQL 5.*

So you'll get a rather unhelpful error message like this:

 

ImpEx Database error

mysql error: Invalid SQL: CREATE TABLE impexerror (
errorid bigint(20) unsigned NOT NULL auto_increment,
errortype varchar(10) NOT NULL default '',
classnumber varchar(3) NOT NULL default '',
importid bigint(20) NOT NULL default 0,
error varchar(250) default 'NULL',
remedy varchar(250) default 'NULL',
PRIMARY KEY (errorid)
) TYPE=MyISAM

mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 9

mysql error number: 1064

So you need to open up your index.php and make one minor edit.

Around line 270 you should see:

 $error_table = "CREATE TABLE {$impexconfig['target']['tableprefix']}impexerror (
errorid bigint(20) unsigned NOT NULL auto_increment,
errortype varchar(10) NOT NULL default '',
classnumber varchar(3) NOT NULL default '',
importid bigint(20) NOT NULL default 0,
error varchar(250) default 'NULL',
remedy varchar(250) default 'NULL',
PRIMARY KEY (errorid)
) TYPE=MyISAM";

The last bit of that uses "TYPE" which is no longer valid. You need to switch it to "ENGINE"

So you should end up with:

 $error_table = "CREATE TABLE {$impexconfig['target']['tableprefix']}impexerror (
                                                errorid bigint(20) unsigned NOT NULL auto_increment,
                                                errortype varchar(10) NOT NULL default '',
                                                classnumber varchar(3) NOT NULL default '',
                                                importid bigint(20) NOT NULL default 0,
                                                error varchar(250) default 'NULL',
                                                remedy varchar(250) default 'NULL',
                                                PRIMARY KEY (errorid)
                                        ) ENGINE=MyISAM";

 

You'll now be able to run impex :)

 

Related Posts:

July 11, 2011

A Couple of WordPress Plugins and Tips To Help With Migration

WordPress Logo
WordPress Logo

Image via Wikipedia

Moving from MovableType to WordPress involves a bit of fiddling about with redirects. How much fiddling you need to do will vary on your setup. In my case my MovableType URL structure was based loosely on a WordPress one, as I'd migrated from WordPress to MovableType previously.

Of course if things were that simple life would be a lot easier - and probably a bit more boring :)

I won't bore you with the details, but suffice to say that "simply" redirecting a couple of things wasn't going to work for all posts .. ..

A couple of plugins that helped resolve this (assuming that it is actually resolved):

Redirection - a very powerful suite that logs 404s so that you can redirect on a per page / post / file basis or setup a solution to catch all the issues

Permalink redirect - handy if you need to update your permalink layout and don't want to lose traffic to the old links

For some reason, possibly the settings I had in my MT install, all comments were set to off on the imported posts. This post has a lot of handy tips on opening comments (or closing them) using MySQL ie. directly running queries on the database. A single SQL query is a lot faster than manually updating hundreds of posts!

WordPress SEO - helps with tweaking your WordPress powered site to maximise the SEO impact

WP Super Cache - One of the things I love about MovableType is that you can set it up to write static files so that no matter how much traffic you're getting Apache can do the heavy-lifting and MySQL only gets involved from time to time. Donncha's plugin suite brings sane caching to WordPress and helps make your site a lot more responsive

Subscribe to Comments Reloaded - while a lot of people seem to like offloading this kind of thing onto a 3rd party service I'm more comfortable running the comment subscriptions directly from my own server.

Enhanced by Zemanta

Related Posts:

May 10, 2009

Playing With Lifestreams and SweetCron

sweetcron logo

sweetcron logoA few months ago Stewart mentioned Sweetcron as a "lifestream" solution (You can see his here).

A "lifestream" basically acts as an aggregator of all your online activities, as many of the online services that people use, such as Twitter, Flickr etc., publish your activity via RSS.

I'd already been experimenting with Movable Type's Motion, which is a pretty cool addition to an existing MT powered site, however having a separate, standalone, solution was not without its attractions. I registered michele.ie a few months ago, but apart from using it to test our Exchange mail hosting I hadn't really done anything with it.

So last night (and very early this morning) I decided to setup Sweetcron on one of our shared hosting plans. Our hosting system allows you to split your domain up across multiple hosting plans and platforms, so while the main site is now on a Linux web server the email is still on Microsoft Exchange.

I chose to setup the webspace to use PHP5, since PHP4 is defunct. In terms of the database I opted for MySQL5, since it's also the more recent version.

I'll have to admit that I hadn't used FTP for a long time. I have a habit of just doing things from the command line, but once I'd got over that it was easy enough to setup.

The documentation for Sweetcron is a bit sparse, but the basic install is easy enough. On our system you just need to remember that the MySQL database server is NOT "localhost", as the basic configuration file assumes that you're running everything on a single server.

The one step that isn't documented clearly is how to setup a simple cronjob to automate it for you. Fortunately someone else had done that already, so adding the cronjob via the hosting control panel was fine.
You just need to execute the following command every few minutes (or hours):

curl http://your/true-cron/url

You can find the actual URL in the Sweetcron admin panel. So just set that command to run via the cronjob manager and off you go.

The basic install ships with two themes, but there are several other themes available which range from the very simple to the incredibly complex. I still haven't settled on which one I actually want to use, as they all handle parts of your "stream" differently. In order to avoid duplication issues I think I'll stick with a theme that doesn't pull in the full content from blog posts and just provides a link to the original source.

So if you're bored and want to know what I'm up to you can head over to my new personal space and see!

Related Posts:

January 7, 2009

A Bit of SQL For Jobberbase Open Source Job Board

A Bit of SQL For Jobberbase Open Source Job Board

JobberBase is an open source job board application written in php / mysql.

It's pretty powerful and is open source, so I've decided to use it for one of my many sideline projects that I promised myself to get off the ground this year.

Unfortunately there wasn't any SQL for the counties of Ireland, so I did up a simple one last night.

You can grab it here

Thanks to Paul from BlackDog for recommending the script!

Related Posts:

August 11, 2008

Atmail Open – Slick Open Source Webmail

Zemanta Pixie

Over the past few years I've used several of the open source webmail solutions to access my mail when I've been on the move. Squirrelmail, for example, is quite functional, but the size of my personal mailbox has grown so big that it took forever for it to load.

A few months ago the Atmail team announced an open source version of their webmail solution. I was interested in trying it out, but I was expecting the install process to be awkward and complex.

It wasn't

A couple of minutes after downloading the software I had a fully functional webmail client up and running and it's able to handle my mailbox without any issues.

The open source version of Atmail is a lot faster than Squirrelmail ever was and has some pretty slick features. You can right click on a message to delete it, or mark it as read / unread. Of course if you just want to delete the mail you can do so, but dragging it into the "trash" is kind of fun too!

The only thing that it seems to be missing, based on playing with atmail for a few minutes, is a method of selecting multiple emails to delete at once.

It's the kind of software that I can see people making use of if they want a functional webmail client and are sick of some of the uglier alternatives.

What are the differences between the open source version and the commercial one?

For most people the differences probably won't make much difference, as they're more for larger organisations and businesses that want to integrate with other systems, but you can see a full comparison chart on the site.

I've always been a strong believer of using the products and services that we sell, so it's only apt that I'd start using Atmail now, as we've just rolled out the full commercial version as part of our new hosting solution. Though I think our clients are getting a lot more features than I am!

Zemanta Pixie

Related Posts:

May 8, 2008

Dvds.ie Offline Temporarily

dvds.ie logo

dvds.ie logo

DVDs.ie has been taken offline, as the server simply did not have enough RAM.

I've ordered extra RAM and will put the site back online once I have the RAM installed.

For the past 48 hours the site has been slow, while the server itself has been nearly always inaccessible via ssh, due to MySQL eating cpu and ram. It seems like the GoogleBot started crawling and "upset" the backend, which is more than a bit silly.

Ah well.. I needed to get more RAM for that server anyway

Related Posts:

April 14, 2008

Hack Any WordPress Blogs Lately?

I feel sorry for the WordPress developers, but I feel even more sorry for their users.

Over the past year WP users who have been keeping track of updates etc., have had to update and upgrade their installs so many times that it's not funny.

The way I see it WordPress users fall, broadly speaking, into two main categories:

  • Casual users
  • Geeks

Casual users want a CMS to use for their website or blog. They like the way it's easy to install and they've heard good things about it. Lots of webhosts offer easy installers for WordPress.
Lots of designers like working with the WordPress templates.

Neither the casual user or the designer is going to be signed up for security alerts from Secunia or Security Focus  or any of the other security sites.

Geek users are probably more likely to play with stuff and are probably going to install lots of plugins.

Now a hardcore geek might check into the source of a plugin to see if the code is "sane", but the average blog jockey probably isn't that concerned with security.
They're not going to worry about the security holes that CMS with php code in its templates could actually cause.

Why would they?

So WordPress has had security issues in the past.
Surely the latest version resolves all of these?
Surely a major update would bring more than just eye candy?

Seemingly not.
According to Security Focus WP 2.5 is open to SQL injections.
What does that mean in English?
It means, simply, that an evil person could inject data into your blog's database ie. content

There's a longer article discussing some of the implications over here with some back and forth between the author and Mr WordPress - Matt Mullenweg.

In typical fashion Mullenweg tries to attack the author instead of addressing user concerns.

A simple "we aren't aware of any issues" or something along those lines would have been so much more graceful, but no, that was not the case.

I'm no longer a WordPress user, so I can't tell first hand, but is there a glaring big flashing light going off on WP installs if the software is out of date and needs to be upgraded to address security issues? Is there?

Open X has had that for ages. It practically forces you to upgrade as soon as you login to an out of date install. They also don't mind telling users about security holes, instead of adding them as an afterthought.

Now whether or not the latest security hole is a real danger or not is irrelevant. It doesn't matter. Seriously.

What does matter is that people trusted WordPress, but are now being embarrassed when their sites are defaced or hijacked

Transparency and honesty nearly always win out and taking a proactive stance on webapp security should be part and parcel of any developer's modus operandi. Shiny interfaces may help the bubble 2.0 crowd, but when the bubble bursts it would be nice to see things with a proper foundation.

(And WP isn't the only webapp with a dire security history - I'm looking at you Joomla and you PhpBB)

Related Posts:

September 18, 2007

Open Ads 2.4 Released

openads.png

openads.png

Open Ads 2.4 was released a few days ago.

Open Ads, which was previously called PhpAdsNew, is probably the most popular open source adserver available. I've been using it for years, though I've probably only used a fraction of its features.

I've decided to start using it to serve ads on some of the blogs I run (I'm already using it to run ads on other sites).

Why?

Ease of use primarily.

I like the idea of creating ad zones and not having to think about them again !

Related Posts:


css.php