Installing VMWare Tools

I recently did some work with Debian Etch virtual machines which I downloaded from the good people at thoughtpolice. Here are my notes on getting the VMWare tools added to that machine.

To be able to do anything interesting with a virtual machine, you need to install the VMWare tools onto the virtual machine. With the virtual machine, choose to “Install the VMWare tools” – this does a virtual equivalent of putting the right CD into the machine and you can then mount the CD and run the install program (follow the instructions on the VMWare site, they probably update theirs). I found that under Debian Etch I needed to first use aptitude to install some additional things that the tools needed to get themselves set up. These were:

  • gcc
  • psmisc
  • binutils
  • make
  • the kernel sources for the relevant version – do linux-headers-$(uname -r) to get the right version.

Then run the VMWare tools installation and everything should go through smoothly. If you installed VMWare tools but didn’t get all the setup completed because libraries were missing, you can just re-run the vmware-config-tools.pl script ( in /usr/bin/ for me).

VMWare Virtual Machines on NTFS

I keep having a problem with my virtual machines. I’m running kubuntu but the virtual machines are on an NTFS partition (because I use them from windows occasionally). The error message appears at startup and goes like this:


VMware Player unrecoverable error: (vcpu-0)
Failed to allocate page for guest RAM!
A log file is available in "/path/to/VM/vmware.log". A core file is available in "/path/to/VM/core". Please request support and include the contents of the log file and core file.
To collect data to submit to VMware support, run "vm-support".
We will respond on the basis of your support entitlement.

I looked in the log file and saw that immediately before the “Failed to allocate page” bit it said:


Could not mmap paging file : No such device

Apparently this is a known problem with VMs on an NTFS parition, but luckily the solution is very simple. I found a post which recommended editing the .vmx file and adding the following line:


mainMem.useNamedFile=FALSE

This worked perfectly for me, I hope it helps someone else too. See also my post about installing vmware tools

Geekup Talk

I did mention recently that I had arranged to speak at the local GeekUp group. Well, the event itself was last night and although I did have speaking nerves I think it went OK.

I’ve uploaded the slides I used to Slideshare, so you can find them here. The talk was entirely based on a talk Ivo Jansch gave at the PHP London conference in February.

I’m trying to work on my speaking skills as I’ve been asked to speak at the Dutch PHP Conference this summer, if you were there and have any comments then let me know! Thanks also to everyone who did come and say hi and give me feedback on the night :)

Edit: I see there is photographic evidence – thanks Deb and Nigel!

SugarCRM SOAP API

I don’t know when SugarCRM, the open source CRM tool, first acquired a SOAP API but I missed it completely. I’ve used SugarCRM a few times, on quite a casual level, and only fell across the SOAP API because I needed it.

The first thing to note is that the SOAP API for SugarCRM is advertised as being incompatible with the PHP 5 SOAP client implementation, and they recommend you use nusoap. However this isn’t true and I found it worked fine with PHP 5 in non-WSDL mode.

The second thing to note is that the documentation is rubbish. The best I could find is on their developer wiki and it isn’t enough to write an application with. I had to do a fair amount of fiddling around on the server side to understand when I was making mistakes which isn’t ideal for remote system calls! They do, however, have very good inline documentation so I ran PHPDocumentor over the file which had the stuff I was dealing with in it. I can’t find an equivalent online so you can see my copy over here

Also if you go to your own sugar installation and append /soap.php to the URL, you will see some information there about formats plus a link to the WSDL. The WSDL isn’t very human-readable but the top bit of it defines the custom data formats like “name_value_list” and shows you how to assemble them to submit to SOAP. If I can work out a good way of presenting that information I’ll add it somewhere and link to it.

There will also be a follow-up with the script that worked for me. If this helps, or you have any questions, then add a comment please :)

GeekSpeakr

I saw this article on linuxchix about the new register of women speakers that has been set up by Brenda Wallace of linuxchix. The site is called geekspeakr and although it claims to be “very alpha” they are currently registering female speakers. I don’t have a lot of speaking experience but it looks interesting and I figure it takes all sorts, so I’m registered … are you?

Speaking at GeekUp in Leeds

This week I will be giving a 20:20 talk at the GeekUp event in Leeds, entitled “Enterprise Web Development”. The 20:20 talk format allows talks with 20 slides, with 20 seconds allowed for each slide. Wish me luck :)

If you’re local to Leeds, I’d love to see you there.

SugarCRM Custom Fields

‘Tis the week for code snippets it seems – actually its mostly that I’m working with SugarCRM in anger for the first time and falling into a few traps. Due to the unique way in which this product is funded, there is a lot less community support around than I’d expect for a product this size.

Today I attempted to create custom fields for the first time, which should have been much easier than it was. The first problem was that all the tutorials deal with earlier versions of Sugar and the interface has changed. The second problem was that I kept on getting lots of errors when I tried to create a custom field. The errors were Javascript errors but when I looked in my apache error log there were lots of these:

PHP Warning:  LanguageManager::include(cache/modules/ModuleBuilder/language/en_us.lang.php) [function.LanguageManager-include]: failed to open stream: No such file or directory in .../include/SugarObjects/LanguageManager.php on line 91, referer: ...
index.php?module=ModuleBuilder&action=index&type=studio

On closer inspection I realised the cache directory was empty. I made this writeable by the apache user and everything started working after that.

Custom Field Creation

Here’s a very quick run through on the steps that I followed. From the home screen, go into the admin section and then click on “Studio”. In the left-hand pane, expand the folder for the module you want to add things to and click on “Fields”. At this point you should read the help entries in the right hand screen but for the impatient: Click on “Add Field”, enter the field details and click on “Save”. The field name gets saved with a suffix of “_c” and should appear in the central pane under “custom”. If it doesn’t, see above for my comments about the cache directory.

The new field needs to be added to the layout before you will see it – this seems to fool a lot of people and I must admit I would have missed this myself if I hadn’t read it on the forums. Once you have created your field, go back to the tree view on the left and choose which layouts you’d like to be able to see your field in. Again there is help on the right hand panel but basically you drag the “new row” thing from the left hand column in the central panel to the right hand column in the central panel, and then drop your new field on top of it.

Hope this helps, its taken me quite a while to get to grips with what should be fairly simple. I’ll add a final note to say that the custom fields are available through the SOAP API – just remember their names get suffixed with a “_c”.

PHP5 SOAP Error in non-WSDL Mode

I just came across a really strange error while using PHP5’s excellent SOAP functionality. My SoapClient was operating in non-WSDL mode but when I called function that did not exist I got the error:

Operation 'getFunctions' is not defined in the WSDL for this service

After spending quite a long time trying to get the client to realise it wasn’t supposed to be using a WSDL, I realised I had mistyped the name of the function and what the error message actually meant was “this function does not exist”. Hopefully I’ll remember next time I see the same problem, hopefully by putting it here it might also help someone else too.

Software That Costs Money?

I haven’t paid money for software for a long time. I bought a student license for Microsoft Office in 1999, and I’ve definitely bought a laptop that came with Windows since then, but that’s about it. I’ve given money to organisations that made my software, but I can’t think of another time that I’ve entered a business transaction where I give money in return for a software product. I live in a world of Linux, OpenOffice, with Opera as my web browser and vimfor everything else.

Recently I’ve been reminded that actually people make software that you can’t just dip into, that you have to buy. This is partly because I now work for Ibuildings and we’re Zend Partners – so all of a sudden I have access to lots of Zend products that I haven’t had reason to play with before. I also have a new work laptop that came with Windows Vista, which was less horrifying to use that I’d feared, and nothing like as good as I’d hoped. I’m sure half of the problem is that I really haven’t used windows for a long time, and its quite hard to find your way around unless you’re used to doing things that way.

The very idea of paying for software feels new … it isn’t, of course, but its been so long since I had anything that didn’t come out of my linux package manager, or from sourceforge that it really caught me by surprise. A lot paid-for software is easy to make points against – its proprietary, closed softare, or the same thing could be achieved by free equivalents. Which is true but if you’re not actually going modify the code or use the contributions of a wider community, it probably doesn’t matter. And if you aren’t going to install, set up, and glue together one or more free products, then the paid-for version is probably more up your street. On the whole, there are definitely situations where I can see the point of paying for a better-packaged version, or one that combines one or more functions, or offers support.

Then there’s the aspect that commercial software comes with salesmen and things – there’s a lot to be said on both sides! I’m not sure I’ll be putting my hand in my own pocket for software any time soon, but working with new products is interesting and I find I really would recommend some of them to others. I’d love to hear others’ feelings on this topic as well!

ZendCon Call For Papers

The ZendCon Call For Papers is now open. This conference is one of the biggest of the year but unfortunately is only held in the US. This year I am planning to submit talks for consideration for the first time … wish me luck :)