Slashcode FAQ

Before asking any questions, please read the relevant documentation.

All code references below are to the latest version of Slash; if you are using an old version, please upgrade.

What is Slash?

Slash is a database-driven news and message board, using Perl, Apache and MySQL. It uses persistence through mod_perl for a good speed and efficiency. Slash has all the features and more that you'd ever want in a bulletin-board/message-board system. You can customize it to anything you want, give it any appearance that you want. This can mostly be done via data in the database. Slash is a database beast in the true sense.

Is this the same code that runs Slashdot?

Yes. Slashdot and Slashcode are usually running the latest development code from CVS, within a week or so.

What other sites use Slash?

Well, Slashcode is one. Look at the list of Slash sites we know about (including sites that host other Slash sites), and please tell us about any other sites we don't know about.

Can I really use this code on my own site? For free?

Yes. Did you read the license?

Do I need to link back to this site if I use Slash?

No, but it would be nice if you did. We'd link back to your site if we used your code.

OK, where do I download it from?

Our project page on has links to all the latest files, through HTTP. It is available on CVS at and FTP at

How can I help?

Join in the disucssions on Slashcode, give us feedback, help other users in our growing community, submit bug reports, and just generally participate. We will regularly post on Slashcode about opportunities to help out.

Who are you?

Slash is developed full-time by three people: Patrick Galbraith (CaptTofu), Chris Nandor (pudge), and Brian Aker (Krow). It was, of course, started by Rob Malda (CmdrTaco). Jonathon Pater (CowboyNeal) still works on the code, and other Slashdot authors Clifton Wood (Cliff) and Jamie McCarthy (jamie) put in a lot of time on it. Of course, there is plenty of additional help given by the users of the code and the various sites, other OSDN programmers and sysadmins, etc. Thanks! See the authors page for some more information.

How do I contact you guys about ... anything?

We have several ways for you to get in touch with us. Before sending in any bug report or question relating to problems with the code or setup, read the Troubleshooting section below.

Please use these ways of getting in touch with us. It makes our jobs easier, and it makes it easier for us to help you, the community.

What is discussed on

Anything that is on-topic. On-topic comments include anything directly related to Slash. This excludes flames and discussions about Slashdot editorial policies. This also excludes discussions about other Slash-like projects. We reserve the right to delete any comments we feel are inappropriate.

Slash Installation

How do I install Slash?

Read INSTALL. Follow the directions contained therein. Rinse, lather, and if necessary, repeat. Really, everything should be explained in there. See the section on troubleshooting if you have problems.

Why do I have problems with mod_perl and Apache?

Because you didn't install it according to the instructions, perhaps using older or beta versions of the software or prebuilt binaries or packages, or you don't have all the Perl modules installed properly, or because you are using PHP (as many people have reported problems using PHP and mod_perl both with Apache, and there's not much we, as lowly application programmers, can do about that :-).

What is this about GMT?

MySQL and your Perl processes must run in GMT. That way, it is easy for users around the world to set their own timezone in their preferences. Read the INSTALL directions about getting MySQL in GMT, and see the supplied httpd.conf and util/slash files about keeping Perl in GMT.

Will Slash work on Windows?

You can use Slash from any machine with a browser, of course, but to install Slash, only Unix is supported. That doesn't mean you can't get some or all of it to work on Windows; it just means that we have not tested it on Windows and don't have the time to make sure it works on Windows. This may happen eventually. Most of the code should work fine on Windows. However, there is no liklihood that Slash will ever be ported by us to work with IIS. Slash requires Apache. Hopefully, it will work fine with the Windows version of Apache, when we get around to playing with it on Windows.

Is MySQL 3.23 broken, or is Slash?

MySQL 3.23 changed behavior of auto increment fields so that negative numbers are not allowed in the fields. Slash 1.0 uses auto increment on its uid field, and the anonymous coward uid is -1. This is fixed in Slash 2.0. Note that Slash 2.0 requires MySQL 3.23, while Slash 1.0 requires (for this reason) MySQL 3.22.

Slash Code

Can you make Slash compliant with HTML x.x?

No, but YOU can! Slash is fully customizable. You can edit the templates to suit your taste. See the HOWTO documents for themes, plugins, and templates.

Why don't you port Slash to PHP/Python/Java/Lisp/VB/Fortran?

Because we like Perl. And no, Perl is not slow. If you think it is, well, you are entitiled to your opinion, and we've heard it all before. However, you are free to use whatever programs and languages you like, and we even have a list of other systems and ports of Slash that you can choose from. Enjoy!

What is the development roadmap?

Right now, the current version of slash is 1.0 (and at this writing, the the release is 1.0.9). The current development version (codename: bender) is 1.1. When it is final, it will go to 2.0. The next development release will be 2.1, and the next version 2.2. This release will be the Slashdot release, in that it will be for bringing Slashdot up to date on the 2.0 codebase. After that, we will move to 2.3, which currently is not well-defined, but will be a lot of the features we put off in 2.0 and are not needed for 2.2.

Slash Administration

How do I log in?

If you are logged in as a user, and you have admin privileges, then you are logged in as an admin. Go to the home page and log in and start administrating!

Is there any manual for this thing?

We are working on documentation. Look at the schema for the database, play around with the site, and read the Getting Started document, which is linked to in the admin menu (when you are logged in) as "Help". Or you can go straight to the document at http://yoursite/slashguide.shtml. If you don't look at this document and ask questions answered in this document, you may be publicly ridiculed. You've been warned. :-)

Where are my .shtml files?

index.shtml etc. are created by slashd (if it is running) when there is a need to create them (see next FAQ below). These files normally have #include directives to get the header and footer.

How can I force updates / make pages update more frequently?

If your site is not very busy, some things can take awhile to update. In this case, you can often force updates by restarting your httpd processes. A short-term solution (for example, while testing) would be to set cache_enabled in the vars table to 0 (which makes everything in Slash fetched live from the database for dynamic pages); this would not be recommended for general use, though, as performance of the site will suffer without caching.

There is also a variable in the vars table, updatemin, that controls how often slashd checks to see what needs to be updated. A story needs to be updated if its writestatus field is 1, so you can force an update for the next time slashd cycles by setting your story's writestatus value; if you make a new story or update an existing story, this is done for you.

Note that blocks, including the poll blocks, can take an especially long time to update, even for active sites. They will update only when portald runs to update the block in the database, and then after that, the httpds need to refresh to get the new content. This time period is controlled by the block_expire var (for blocks and templates) and story_expire var (for stories).

How does the "Older Stuff" Slashbox work?

The Older Stuff slashboxes are created dynamiclly in the code. The only thing you need to provide is a block named "${foo}_more", where ${foo} is the name of the section. So the default "Older Stuff" block is named "index_more". For the Ask Slashcode section, we would create an "askslashcode_more" block. Once that block is in the database, an "Older Stuff" slashbox will be created for that section.

The Older Stuff box will, in essence, include 2/3 of "maxstories", which is a user-defined variable (and is 30 by default). So 10 stories would show on the main page, and 20 in the Older Stuff box. This is not always the case; for example, today's stories, even if there are more than 10, will show up on the main page. But this is basically how it works.


How Do I Troubleshoot $x?

This section is very important if you are having problems with Slash. Please read it thoroughly.

First, make sure you have read the relevant documentation. If it does not solve your problem, read it again. And if the problem persists, reading it a third time is not a bad idea.

Also, if you did not follow the INSTALL instructions precisely, consider whether or not your problems are a result of this. We are sometimes not kind to people who don't read the instructions, or don't follow them without good reason. It may sound mean and clichéd, but we want to help you, and you can help us help you by reading the docs.

When you have exhausted the documentation, do your best to isolate the problem. If you can, find out what is causing the problem. Try to repeat the error, and document what you do to cause it. Try doing things a little bit differently to see if the problem persists under different but similar conditions. If you are inclined, try to track down in the code where it is happening. If there is a log that is kept (by portald or httpd, for instance) look in there for error messages. If an error message is given, do your best to find out what is producing the message. Is it Apache, mysql, slashd, portald,

In other words, get all of the information you can about the error. This is done for two reasons: first, you may solve the problem yourself, or discover exactly what the error is. Second, if you can't solve it, then you can give us as much information as possible to try to solve it.

So when all of these avenues have been exhausted, and the problem persists, send in the information you have gathered (including relevant information about your system setup, and the complete error messages, if applicable) to the appropriate forum. This may be in the form of a bug report to Server 51, or a post to the mailing list, or a story submission to Ask Slashdot. If you solve the problem with code changes, use diff -c oldfile newfile > patchfile to create a patch and send it in to us. See the FAQ under above for more information on how to contact us. And thank you!

Last updated Wed Oct 31 16:56:33 2001 GMT