Archive for the ‘code’ Category
2010
03.22
Tags: document indexing, document management, knowledgetree, solved
Posted in code, knowledgetree, open source software, php, sysadmin, ubuntu | 4 Comments »
Argh. Well, it’s really not quite out of the box, at least on Ubutu Server 9.10 (after reinstallations required after initial failures…), so this is just a selection of the fixes that made the import and indexing of the 160 000 files at 102GB possible. So for KnowledgeTree 3.7.0.2 Commercial Edition (the same holds true for the Community Edition), the following should help:
- Use the best-practice advice when doing the local file system import – rather do 10 000 files at a time rather than 100 000 at once. Really. Trust me. It defeats the whole idea of just running a batch job. Completely. As you’d expect the option of saying – just transfer all data in directory X. But alas, that doesn’t work. So do it in batches. Manually.
- Tika Apache Indexer for Lucene – not so much on PDFs, Docs, XLS or PPT files. Install catdoc (which includes
catppt and xls2csv) and pdftotext (which you’ll find in xpdf-utils).apt-get install catdoc pdftotext- modify
knowledgetree/search2/indexing/extractors/TikaApacheExtractor.inc.php and comment out the mime types that are affected above from the returned array in getSupportedMimeTypes() – PDF, XLS, DOC and PPT: (more…)
2010
03.21
Tags: configuration, knowledgetree, pear, php, solved
Posted in code, knowledgetree, linux, php, sysadmin, ubuntu | 1 Comment »
OpenOffice.org startup failures, indexing issues and other niggles forced me to re-install KnowledgeTree 3.7.0.2 Commercial Edition (the same holds true for the Community Edition) more than once during setup. I was met with this delicious error notification which killed all further activity on the site (and prevented the startup of /setup/wizard/, control.php, browse.php, login.php — well, everything, really):
Warning: include_once(DB/.php) [function.include-once]: failed to open stream: No such file or directory in /usr/share/knowledgetree/thirdparty/pear/DB.php on line 371
Warning: include_once() [function.include]: Failed opening ‘DB/.php’ for inclusion (include_path=’/usr/share/knowledgetree/search2:/usr/share/knowledgetree/ktapi:/usr/share/knowledgetree/thirdparty/xmlrpc-2.2/lib:/usr/share/knowledgetree/thirdparty/simpletest:/usr/share/knowledgetree/thirdparty/Smarty:/usr/share/knowledgetree/thirdparty/pear:/usr/share/knowledgetree/thirdparty/ZendFramework/library:.:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear:/usr/share/knowledgetree/thirdparty/pear’) in /usr/share/knowledgetree/thirdparty/pear/DB.php on line 371
Warning: Cannot modify header information – headers already sent by (output started at /usr/share/knowledgetree/thirdparty/pear/DB.php:371) in /usr/share/knowledgetree/config/dmsDefaults.php on line 299 (more…)
2010
03.21
Tags: errors, knowledgetree, openoffice, soffice, solved, troubleshooting
Posted in code, knowledgetree, linux, php, sysadmin | No Comments »
Having repeatedly received the error that OpenOffice.org is not running on the standard installation of KnowledgeTree 3.7.0.2 Commercial Edition (the same holds true for the Community Edition), further investigation was necessary. The key area of investigation must focus on the dmsctl.sh file, particularly from line 47 onwards, but more of that further down below. This is on Ubuntu (9.10 Server).
First, do a few quick checks:
- Is the process running? Anywhere?
Check whether OpenOffice.org is actually running, using a simple netstat -pant| grep 8100 — as the default installation is running with a headless OpenOffice.org on port 8100. You should see something like:
tcp 0 0 127.0.0.1:8100 0.0.0.0:* LISTEN 9655/soffice.bin For the fix in question, it wasn’t giving any results on this check (sudo the commands where required, but you knew that already), which means that it’s not running properly. Also,
ps -aux | grep soffice
gave no results, indicating non-functioning backend software.
(more…)
2010
03.15
Tags: crack, ophcrack, passwords, rainbow tables, ssd
Posted in code, Did you know, linux, security, sysadmin, windows | No Comments »
A Swiss firm, Objectif Sécurité, makers of Ophcrack_Office (for Word and Excel files) and Ophcrack Open Source (over at sourceforge.net), has tweaked their application to crack XP passwords with up to 14 characters on a Steady State Drive interface (think of large, light, laptop drive using Flashdrive technology) through rainbow tables (pre-calculated hashes) in an average of 5.3s.
Seek times on the SSD seem to be the big tweak here:
Oechslin has fitted an elderly Athlon 64 X2 4400+ with an SSD and the optimised tables. This system can, with only a 75% CPU utilisation, crack a 14 digit password with special characters, in an average of 5.3 seconds. Oechslin says that, worst case, it should be able to search arithmetically through 300 billion passwords per second, a speed that is a factor of 500 faster than an Elcomsoft cracker supported by a modern Tesla GPU from NVIDIA.
(more…)
2010
03.01
Tags: excel, password, protection, security
Posted in code, security | 4 Comments »
Elmcomsoft has a variety of really good brute-force and dictionary-based password attacks on the full Office suite, including a distributed version to run in the cloud (which I wrote about some time ago). As cool as the software is, it doesn’t allow the removal of cell-based or sheet-based passwords (which kinda sucks), and the password.xla file which seems to be the big thing from staxx.com requires a whole whack of goodies to run on Office 2007 natively.
Enter the same macro that McGimpsey & Associates published in 2004 (reproduced here as per their GPL licence) that removes all internal Excel Passwords: (more…)
2010
02.20
Tags: afrigator, errors, weekend
Posted in code | 2 Comments »
Afrigator.com (Blogs, Videos, Social Media etc) seems to have issues on the cross-linking of author to posting – cross-linking internally and referencing incorrectly.

I'm sure they're working on the references, working to correct.
I’m sure they’re on it.
In this example, Gaming SA hasn’t posted since Dec 2008, but is being referenced for a post from Feb 2010. THe top link goes to the site directly, and a framed Afrigator in the first and second title, respectively…
Oh well, it’s weekend 
2010
01.22
Tags: do no evil, google
Posted in code | 2 Comments »
When last did you access google.com/ig/oscheck? It returns a serialized array — with a weird space-holder — instead of “Do no evil” (which implies that you can be evil, think evil, plan evil, but not execute it), they’ve upped it a notch — all the way to “don’t be evil’” (note the trailing apostrophe).
This of course changes the mantra — you can do evil, think evil, plan evil and execute it, but just hug a bunny and buy milk on the way home in your green car (so don’t be evil). Strange deviation. Also, the apostrophe implies omission (or ownership, with bad grammar). So did they mean don’t be evilk (whatever that may mean) — you go through the alphabet and figure that one out.
Happy thoughts! 
throw 1; < don't be evil' >{m:[{i:1,st:"c=ig&e=APu7icpPle4eIsUPx/8S%2BVe24JQkS/cBvDBsJhSnfdcogQ1nIoym4glNnR1WvsfaswewrREVMvHzqhekfe75PLUAm7A4%2BOlsToBUzAVE4axMYP2Q%2BGGHAMUnq61oFTnlsEU%2BiqWrfH8"}]}
2010
01.21
Tags: css, google
Posted in code | 1 Comment »
You’ve seen it, you hate it, you threaten to switch to wolfram or Bing… Or you can just make it go away.
Stylish allows you to apply custom stylesheets to sites by wildcard prefix, so that it works and look the way you want it to. For Firefox. For IE, IE8Pro does something similar (YMMV — I haven’t tried it…)
All you need to apply is a simple CSS script:
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix('http://google.'), url-prefix('http://www.google.') {
#ghead, #sbl, .fade, #fctr{ opacity: 1 !important; }
}
Lots of customisations available at userstyles.org!
2010
01.20
Tags: access, conversion, data export
Posted in bash, code | No Comments »
The mdbtools package for Ubuntu Jaunty includes a command called mdb-export. This allows you to dump the contents of tblName from database.mdb to STDOUT in CSV format like this:
mdb-export database.mdb tblName
Output redirection to capture the output in a file is also supported (not that that’s a feature of the app, as you know):
mdb-export sample.mdb tblFoo > capture.txt
2009
11.25
Tags: document management, knowledgetree, open source
Posted in open source software, php | No Comments »
PBGVVH25US66 They released the Knowledge Tree 3.7 RC Community Edition some time ago, which now runs on the full Zend-Server stack! Infrastructurally, this is the biggest changed; PHP-based setup wizards also feature, and sure – you can now run it on IIS6/IIS7, but that switch to the Zend stack with use of Optimiser features most highly for me on this development. But you knew that already! 
Curious to see the feedback from Steve Briggs from iBurst about their KnowledgeTree (not necessarily their whole CRM solution) usage and implementation experience at iBurst, after the chat I had with him yesterday…
2009
11.15
Tags: drupal, nginx, wordpress
Posted in code, sysadmin | No Comments »
So I’ve installed the current beta (for non-production environments) of Drupal 7 on an nginx/php/mysql setup to test speed, interface and ease of use. It was a double-whammy operation, on the one hand testing the server environment, and on the other, the new software. It’s not production-ready, so I don’t expect it to be ready by any stretch of the imagination. So these are just impressions. (more…)
2009
09.30
Tags: project management, scrum, video
Posted in code | No Comments »
YouTube was jumpy, so I post it here…
This looks very familiar, just terminology at the end of the day…but you knew that already.
Thoughts and comments welcome…
2009
09.08
Tags: bash, delete, divx, linux, mp3
Posted in bash, code, linux, open source software, sysadmin | No Comments »
So you want to run a script that removes all mp3 and avi files off the filesystem. One way (in bash) as below. Comment, suggestions and feedback are welcome
Using $EUID to check for root user, and $IFS to check for line breaks as the file names has spaces in them. IFS is saved to a temp variable, reset and then re-instated afterwards. C is the counter. Got two litte for loops in bash with backtick execution.
(more...)
2009
09.07
Posted in code, sysadmin, ubuntu | No Comments »
A typical situation – you get to audit a server setup which hasn’t seen a apt-get update / apt-get upgrade or even apt-get dist-upgrade since Netbooks were a pipedream.
“Please don’t change anything, we only want a virus scanner, but the update cache is busted,” they say. That you see a whole bunch of 404‘s in the apt (or aptitude) feedback is normal — there is no active repo for this flavour anymore! Long-gone!
So – what to do? As you would, you compile from source. Ha — one gotcha — zlib‘s probably not installed (compression library, as you know).
So – quick move to virus scanning happiness (on the latest version):
(more…)
2009
09.02
Tags: pear, php, phpdoc, phpdocumentor
Posted in code, open source software, php, windows | 5 Comments »
So the below description will give you a step-by-step to run phpDocumentor (which replaces phpDoc):
Get it at www.phpdoc.org or install it via PEAR (much easier – 2MB download or so).
For Windows machines:
- go-pear.bat (if you haven’t already — find it if you don’t know where it is) and pear install --alldeps phpdocumentor
- Do a search for PEAR_ENV.reg on your machine.
- Execute it.
- Make sure you’ve got the Environment Variables set to point to include the PHP bin directory (
set PATH=%PATH%;c:\path\to\php ) OR- From the desktop, right-click My Computer and click properties.
- In the System Properties window, click on the Advanced tab.
- In the Advanced section, click the Environment Variables button.
- Finally, in the Environment Variables window, highlight the path variable in the Systems Variable section and click edit. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.
- In Vista:
- Open the the Control Panel, select the System and Maintenance link, and select the System link. Or, press the Windows key and the Pause / Break key at the same time.
- Select the Advanced System settings link.
- You can now call php and pear commands from the command line (you many need to restart for the changes to come into effect).
- Verify by typing phpdoc -h
phpdoc -d "c:\projectDir" -o HTML:default:default -t "c:\projectDir\docs"- for PDF files, replace the output parameter (-o): -o PDF:default:default
- Formatting in smarty (like PHP website etc): -o HTML:smarty:default
-t = target directory of generated documents
-d = source directory of files to check
-o output format as above.
(more…)