Office Software set-up (WPKG)

21 May

We (@ DigitalBase) are using WindowsXp clients connected to a Samba Domain Controller (samba 3.X).
Due to the fast expansion & new workstations, i figured we could use something for “automatic software rollout”. At my previous assignment they were using a Windows SMS Server to rollout hotfixes, patches, software etc…This solution turned out really valueable & trustworthy. Software updates as well as new installs were faster/easier then i imagined, what eventually would free up some time on other “fronts”.

As we are using an open-source variant & no m$ domain controller this was not an option. The current set-up already forced windows clients to run a logon script. But untill now i never used that to maintain/administer systems. After looking around (tnx google :) ), i bumped onto an “open-source” solution that goes by the name of WPKG.

WPKG is an automated software deployment, upgrade and removal program for Windows.

It can be used to push/pull software packages, such as Service Packs, hotfixes, or program installations from a central server (for example, Samba or Active Directory) to a number of workstations.

It can run as a service to install software in the background, without user interaction.
It can install MSI, InstallShield, PackagefortheWeb etc. packages, and all other packages using repackaging or some batch scripting.

Source WPKG website.

Apparently this piece of (great) sofware, does not require a server side installation. The only requirements are a shared network resource & the installation of the WPKG client service (on the client machines). During installation you need to enter the location of 4 different scripts (3 configuration variables & engine .js script). As there was an existing netlogon samba share, i placed the all files in that share & pointed the installer to those files. After that you’ll need to set-up some user(s) & permission(s). I would advise to create a new samba user to access those scripts, this way you don’t need to update the cached password each X days (if samba password changes). I added that user as local administrator on the 4 Client’s & made sure the WPKG service was up & running.

Consider this post part1, i’ll post how i succeeded installing software on the clients the same hour (i am tired now).

Good Software : Dirkey

18 May

Tired of navigating through different subfolders to reach that specific directory you were looking for ? Saving an image from the web to a certain directory takes you over 1 minute ? Stop looking for the same folders over & over again, let me introduce Dirkey.

Dirkey is a small utility that enables you to define bookmarks for folders and go back to these bookmarked folders from within File Open/Save dialogs and Windows Explorer. You can set and go to these bookmarks using your keyboard or your mouse. When Dirkey is active you can press Ctrl+Alt+0..9 in e.g. an Open/Save File dialog and a bookmark will be set on the current folder. You can go to any bookmarked folder by using Ctrl+0..9 in the same or another supported window. All bookmarks are global and are preserved when you turn your computer off. You can also open bookmarked folders in a new Explorer window.

Source : Dirkey Homepage

Plain simple, it rocks. I feel my life has gotten simpler. P.S. For xPlorer users, there is an xplorer plugin on the dirkey plugin page.

So long Ricoh ! Welcome Samsung !

17 May

Some weeks ago i got some new monitors for my employers (2x Samsung Syncmaster 226 Bw). After checking out some monitor specifications i was fully convinced that these 22′ monitors were the best available monitors (price/quality), the Samsung 226BW has a response time of 2ms and a contrast ratio of 3000:1. After wortking with these monitors for 2 weeks, i was convinced of Samsung, an upcoming power in hardware parts.

So after the nice “Ricoh incident“, i needed a new printer. Again checking review websites as well as pricewatch listings, i didn’t find a suitable printer that would offer me the functions i need. This is what i had on the requirements list :

  • Laser color printer
  • Less then 800€
  • Scanning capabilities
  • Scanning capabilities
  • Fax

When calling around & checking some various shops, one of those shops told me he had a brand new Samsung CLX-3160FN in stock (the last one), it’s a new Laser printer (all in one) solution that wasn’t even listed on the belgian Samsung website. (so i guess it was really new). I went to pick it up, although i noticed the specifications noted the CLX-3160FN printer could only print about 4pages per minute (in color), at the same time it had many other functions to compensate for the slow color printing (black&white has 16ppm). I was pleasantly surprised the printer had the retail price of 500€, what was less then i paid for the Ricoh machine 2 years ago.

Coming back @ our office, i immediately unpacked it. The CLX-3160FN comes with very good & brief instructions. You could call it a ‘fool-proof’ installation procedure. The printer picked up an ip adress from the DHCP server, allowing us to connect to it after about 10 seconds. After installing the drivers i noted the menu’s & applications were very clear & user friendly. I got a 10minute “godmode’ feeling when playing around with various features like : scan to email, scan to application, multi scan, fax from computer, fax to email etc…

I’ll write about some of these features later, it all comes down to my main point : “Samsung & CLX-3160FN rock !

DigitalBase is hiring

16 May

Digital Base is looking for young skilled Belgian (dutch speaking) web developers. If you want to work in a small team on various projects (medium to large business) in a relaxed & friendly environment send your CV to me at snk00sj@digitalbase.eu Before you do that, make sure you have the following qualifications :

  • under 30 years/old
  • native or perfect dutch speaking
  • decent knowledge of english
  • good social skills
  • excellent PHP knowledge
  • good OOP knowledge
  • close/around Leuven (office @ leuven)
  • basic knowledge of version management systems (cvs, svn)

Make sure to mention your references and/or degrees.

Talk to you soon

Ricoh screwed me

11 May

2 years ago, i bought a CL2000 printer (Ricoh), thinking that i would be using this one for the upcoming 5 years, as i am not a frequent print-guy, paperless office remember ? Very good printer, stable, fast, not too noisy….

CL2000 Now after 1year and a few months, the color began to fade. Pages came out semi-printed, right untill the point i couldn’t print anything at all. So i called the Ricoh helpdesk, as i was pretty sure the machine was still under warranty (2years), they told me to contact me reseller, and let him manage the warranty.

So that’s what i did…I sent a mail to the computershop where i bought this machine, very nice people. They told me to bring in the machine, so that’s what i did…So now yesterday i got word of Ricoh, seems like my printer is totally screwed, but what is worse is the reason :

Ricoh service checked my machine and noticed that there was still a coating/plastic underneith 2 of the toner cartridges. (see pictures below). So 2 years ago, when installing the machine, i was stupid enough to pull out 2 of the plastics, and leave 2 others behind ??!…In these kind of situations it’s always my word against theirs, but i am fully convinced that i couldn’t be this stupid leaving 2 of those plastics behind. So now i ask myself :

  • Why couldn’t a 700$ machine not detect there is something wrong with the feeding of the toner ?
  • Why do these problems popup after 1,5 year after about 1000 prints ?
  • Why didn’t maintenance tests on the machine itself (color correction, alignment & refill status) not notice there was something wrong ?
  • How could those plastics screw up the entire machine ?
  • After taking out the toners at the office & in the computershop, we didn’t notice the plastic coating outselves ?

I was informed there are alot of broken / to-be-replaced parts on the machine. Apparently these costs will climb to about the price of a new machine (or even more expensive), +500€. I attached the pictures below, before you start accusing me how stupid i am, i am really sure i followed instructions, and also fully convinced “home-installations” need to be made “fool-proof”, that means the machine should detect a problem….

[Gallery not found]

Now lets hope when they send this machine back, we can still use some parts. As i know several people that use the same machine.

Working on a small space

8 May


As we are currently three employers working in a “non-office” building, i would like to show you all how our offices look like. This used to be a children barbershop (Bles & Tres), that’s why the floor is red, and the wall has a children’s wallpaper. I have to admit, i am starting to get used to it (not to mention i almost like it :p ).

[Gallery not found]

Juice up that blog

7 May

I know i have been slow on updates & posts, shame on me ! But i am back with a small update.
I’m doing great, working full time from the “Digital Base” offices right now together with my 2 colleges. We’re working on 3 projects at the same time, and new offers keep coming in…

I’ve upgraded the wordpress engine (2.1), and pimped it using the “simpla” theme, with some small modifications (especially the sidebar). I will be adding more functionality & content soon. Also note i disabled the comments for now…. Come back soon :)

Working on existing PHP applications

10 Jan

We’ve all been there before, you’ve been hired to finish / work on someone elses work, and you encounter some very strange behaviour. If you’re working on a small website, going through the code should provide you with the necessairy information to solve this issue, however, if the application is somewhat bigger (multiple components, databases, caching, dynamic code building, multiple objects …) it’s always nice to know exactly what code is being executed on a certain moment.

Imagine you have found the exact page / function / action where it’s going wrong, and you are trying to debug it. Commercial companies offer solutions like Zend Platform / Zend Studio to debug, view stacktraces, variable watches & alot more…and i am mostly using Zend Studio for that too, but at this moment in time, Zend does not offer a windows library for Zend Platform that supports PHP 5.2.0, neither did they release a fix for Zend Studio 5.5 to build inspectation data over a Samba share…So let’s do the same thing using XDebug, afterall the world still spins without Zend.
Make sure to get the right windows or linux module for your php version from www.xdebug.org and use the installation instructions to get it running, make sure to check phpinfo to see if the xdebug is loaded. When everything is installed, we’ll start by profiling a certain action to find out what exactly the page/action is doing. Make sure to adapt your php.ini with the following configuration :

zend_extension_ts=”c:/apache/php/ext/php_xdebug-2.0.0rc2-5.2.1.dll”

[xdebug]
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.profiler_append=0
xdebug.profiler_enable=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir=c:/temp/
xdebug.profiler_output_name=profile

After that restart your apache, and open the page you want to analyse. As soon as you send a request to the webserver it will create a file in the c:/temp (or whatever path you defined). For me it generated a file (c:/temp/cachegrind.out.5808). This file contains alot of information what exactly php was doing on your request. Call it a stack trace. This file is human readable but does not give an immidiate overview, that’s why i would suggest to use a program to analyse the cachegrind. To my knowledge, the best program to-do that is KCacheGrind, the downside is that is a KDE program, so if you are using windows you would need alot of hacks, just to get KCacheGrind running, thats why there is a windows port (with less features) available called WinCacheGrind. If you open WinCache use the File>Open File dialog and relocate to the cachegrind.out file (for me c:/temp/cachegrind.out.5808), depending on the size of your file, wincachegrind will start analysing and give you a visual representation of the stack trace of your action.

Note that all pages you visit from now (untill de-activating the module in php.ini) will get ‘profiled’ and generate a cachegrind file. As this is filesystem intensive, i would suggest commenting the above php.ini section as soon as you’re done and restart your webserver.

Propel / Pager / Datagrid – Part II

9 Jan

In my previous post, i talked about the writing of a custom datagrid for propel usage. The required features for this datagrid would be :

  • easy configuration
  • multi sortable columns (ascending & descending)
  • search features
  • add actions to one or multiple records (icon + action)
  • sizeable columns
  • go to page x
  • ability to change rows per page

So since my last post, 2 weeks have passed and i am proud to say we’ve finished a large part of the code. Now we are still having problems with the javascript to allow the user to change his column width in multiple browsers, IE seems to refuse some of the javascript code. I am still looking into that.

P.S. : I have been getting several e-mails with code requests. Untill i am really done i won’t give out the code. If you think you can help me with the javascript resizing issue though, you can always drop me an e-mail.

Propel / Pager / Datagrid

15 Dec

Because we are using propel in most of our larger projects, it’s very common we need a datagrid for the listing of the objects. A year ago we made a datagrid with the most important features combined with an ajax approach (sorting, filtering…), for the ajax functionality we wrote our own javascript function calls, what led to alot of unmanageable code, both javascript and php.

As time moved on, this loading of the datagrid became slower and slower (due to increasing objects, about 9000 records with multiple joined tables). This was mainly because the old datagrid first loaded all objects, and then sorted the entire array by the columns as defined by the user….don’t tell me..i know ! This is a bad approach, that means all records get looped, and if you are using propel that would mean for each of those 9000+ records an object is created…that’s crazy…(it has some advantages though)…

So now i finally found some time to do a total rewrite of this datagrid, combined with the power of the propel pager, propel criteria & the php/ajax framework xajax, i came up, faster then expected, with a powerfull scalable datagrid that only loads the visible records. All switchpages, sorting & filters call a corresponding ajax function. These functions change the criteria in the object and reload the datagrid. I’ll elaborate on this later, by showing you some code and perhaps an online example.