Overall I think the event was well-organised, there were certainly plenty of people there and we had a projector, speakers and a room so it pretty much ticked all the boxes. The Fat Cat is a nice pub, with good beer, but for those of us coming from further afield it was a bit tricky to get to as its not exactly handy for the station. The evening was good however I felt that the timings slipped badly – I was the first speaker and although there was somthing else happening earlier on, the talks aimed for 7:30 were actually nearer 9pm … so a couple of pints later than I was expecting my audience to be and I think my talk came across as rather dry as a result! Also since one of the speakers ran over his time completely (now I understand why other geekups sit with a stopwatch and click the slides through for you!), I had about ten minutes after the talks to hand out a couple of business cards and answer a few quick questions before I had to dash off for my train. All of these though are only teething problems and I think everyone had a pretty good time, so well done to Jag for getting it off the ground … here’s to next month!
Author Archives:
Geekup Sheffield
OpenOffice Custom Quotes
To turn these off go to:
Tools > Autocorrect > Custom Quotes tab
And until the “Replace” boxes.
Hope this saves someone else the annoyances I had.
SugarCRM SOAP Data Types
SugarCRM SOAP API Examples
SugarCRM can’t talk to PHP 5 native SOAP libraries in WSDL mode, so connect without it. Find below a series of queries that each worked for me, all just dumped here in succession, don’t try to run this whole piece of code – it is intended as a series of examples. Use each line and then var_dump($response) to see what’s happening.
// set up options array
$options = array(
"location" => 'http://192.168.1.129/aeat/spm/crm/soap.php',
"uri" => 'http://www.sugarcrm.com/sugarcrm',
"trace" => 1
);
// connect to soap server
$client = new SoapClient(NULL, $options);
// look what modules sugar exposes
$response = $client->get_available_modules($session_id);
// look in more detail at the fields in the Accounts module
$response = $client->get_module_fields($session_id, 'Accounts');
// look for a particular account name and then get its ID
$response = $client->get_entry_list($session_id, 'Accounts', 'name like "%LornaJane%"');
$account_id = $response->entry_list[0]->id;
// create a new account record and grab its ID
$response = $client->set_entry($session_id, 'Accounts', array(
array("name" => 'name', "value" => 'New Company')
));
$account_id = $response->id;
// create a new contact record, assigned to this account, and grab the contact ID
$response = $client->set_entry($session_id, 'Contacts', array(
array("name" => 'first_name',"value" => 'Geek'),
array("name" => 'last_name',"value" => 'Smith'),
array("name" => 'email1',"value" => '[email protected]'),
array("name" => 'account_id',"value" => $account_id)
));
$contact_id = $response->id;
I hope this helps – if you have anything to add, or would like to post some examples, please do :)
Installing VMWare Tools
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
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’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
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 :)