Home > Uncategorized > InDefero – include(“commonsense.php”);

InDefero – include(“commonsense.php”);

I spent a really long time (8+ hours) setting up an open source project tracker called InDefero. I was also trying to setup Git at the same time, but that’s something for another post.

InDefero has no install wizard (one is in the works though), so all the configuration is manual. Installing the DB tables requires you to run a PHP CLI script. Everything was going smoothly until I tried to install the tables. The script exited with no output every time I ran it.

I tried to debug the script with echo statements, and traced to issue to a require statement that was causing execution to stop. After tinkering with several of the scripts, including the script in the require statement (the config file), and still having the install script fail, the thought occurred to me, why am I not getting any debug info from PHP?

Since the php.ini I was using was setup for production, display_errors was off. After turning it on with a CLI switch, I got a debug message. My config file was messed up. After going to the indicated line, I realized what happened.

The InDefero config file has a secretKey field that you’re supposed to put a random string in. I used PWGen (a neat open source password generator) to generate the random string. The only problem was, I opted to include special characters. In most programming languages, there are special characters that have to be escaped, and PWGen happened to put a few in the string it generated.

After selecting the alpha num character set in PWGen, generating a new string and putting it in the config file, the install script ran successfully.

I was thinking, finally, it’s working. Then, I browsed to the admin project list, and got a nice exception page. After spending a few hours figuring out that it was a database name escape issue, and not a permissions problem, I reported and fixed the bug.

When you’re debugging a problem, remember, read each error message carefully. Read it several times, word for word. Not reading the error properly can cause you to spend a lot of time on something that isn’t related to the error message.

Unfortunately, the SVN browser in InDefero is way too slow. I’m going to have to switch to something else :(

Categories: Uncategorized Tags: ,
  1. August 12th, 2009 at 11:25 | #1

    Thanks for the bug report and the fix, it will be applied asap. For the speed of the subversion browser, is it possible for you to give me some stats about the size? Just open a ticket with some details. I have a test repository with 500MB+ to test the speed of the subversion backend.

  2. recon
    August 12th, 2009 at 18:08 | #2
  1. No trackbacks yet.