SLES 11 SP4 – mysql, php and sockets

Something changed in SLES 11 SP4 (or one of the very recent updates).

The default mysql.sock moved to /var/run/mysql/mysql.sock rather than the previous location in /var/lib

For some reason this meant that the defaults for PHP5 were looking for the wrong location for the socket.

A quick cleanup of /etc/php5/apache2/php.ini to include mysql.default_socket = /var/run/mysql/mysql.sock and everything is back functioning.

Photos and Menalto/Gallery Project

I have been a long time user of Gallery Project. I migrated from jAlbum in mid 2003 and migrated through G1 up to G2 with integration into WordPress.

Six years ago I made a note to really investigate the changes from Gallery 2 to Gallery 3 – I did the homework; but the change didn’t make sense for many reasons.

Last year I was saddened to see that the Gallery Project had gone into hibernation. Always sad to see an open source and community led project get shuttered.

Less photos these days; we tend to share a limited number via Facebook – but still the dilemma – what to do with the hundreds of thousands of old photos and rapidly rotting code.

Whiteboards lead to architecture lead to whitepapers

Over the past 15 years I’ve become very aware that different people take in information in very different ways. I am a visual learner as an example – so seeing diagrams, manipulating shapes on a touch screen, linking conceptual boxes together – that’s my thing. Others prefer to read and digest, others like to listen, question and engage in conversation.

I am writing a series of architecture papers – and to make sure that the concepts and intent are really landed I’m doing a lot of whiteboarding and socialising too.

Elasticity in the cloud

It’s nice to be able to turn the dial to 11 when you need something doing quickly.

Just rebuilt the thumbnails on the photo albums – it’s a CPU intensive job. Turn Azure up to 11 – more RAM, more procs – and it’s done in no time.

Comcast backbone issues

Something is broken with Comcast Business Internet.

Speed test (urg) to Comcast in Seattle gives 50/10 – as expected:


Speed test to Comcast in San Jose gives 50/10 as expected:


Speed test to Comcast in Salt Lake gives 2/10 – which is horribly broken.


Same Ookla test outside Comcast – and I get 2/10 in Seattle.


Comcast Chicago compared with Comcast Seattle.


Excel 2013 and Power View – sometimes doesn’t start

I had a group of machines for a pilot project just stop launching Power View.

Very frustrating – and then my machine stopped working.

I finally tracked down the problem – and hopefully this helps others.

Using the Registry Editor – RegEdit – browse to

Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\User Settings

You should see a registry key PowerViewExcelAddin


Delete the key.

Now open Excel – create a new blank workbook.

On the Insert tab you should see PowerView


Click on PowerView – Excel will say you need to enable Power View – click on Enable.


The Power View and all of the BI should work now.

Change control–test before tinkering

Bobbins. I made a change to the web server config in Azure today – and it took the web server VMs offline.

Still troubleshooting on the why – but I had to rebuild the base server and re-attach the web content and database drive.

Lesson learned – test, test and document the changes..

Postfix, Office 365, SMTP AUTH and STARTTLS

A fun day.

First up there is a feature gap on Azure – where there is no reverse DNS – i.e. PTR records – for virtual machines.

The main problem I am having since moving things to Azure is that mail delivery from Postfix is getting some hosts rejected – because the receiving MTA receives no host on reverse DNS lookup of the sending MTA. Imagine I sent mail to [email protected] – and my MTA is running with a public IP address of {x.x.x.x}. The receiving MTA does a reverse lookup for {x.x.x.x} and finds no record. The mail is bounced.

My solution is to send mail via Office 365 – reconfiguring Postfix to relay via Office 365 using SMTP. The added challenge – Office 365 uses TLS for security and requires STARTTLS.

As I mentioned – a fun day grinding through docs and understanding what was needed to get this to work.

The short version:

This is the additional config for Postfix – here I am using SLES 11 SP2 – this is in /etc/postfix/

# Use Office 365 as relay

relayhost = []:587

# Use credentials for auth to Office 365
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_send_dummy_mail_auth = yes
smtp_always_send_ehlo = yes
smtp_tls_security_level = encrypt
smtp_use_tls = yes

smtp_tls_CAfile = /etc/ssl/certs/cacert.pem

# misc
tls_random_source = dev:/dev/urandom

#smtpd_tls_loglevel = 2
#smtp_tls_loglevel = 2

#enhanced logging for Office 365
#debug_peer_list =
#debug_peer_level = 4

The plaintext username/password pair were placed in /etc/postfix/sasl_passwd

[]:587        Office 365 authentication:complex password

I also modified /etc/postfix/sender_canonical to remap the default from name to the same name used for Office 365 authentication

[email protected]  Office 365 authentication name

Finally I found an interesting set of bugs/features in WordPress – where the assumption is that the default PHP mailer is being used and that the wrong from email is being injected into the PHP mailer function. Messy. Opened for two years now.

This was resolved by using the WP Mail Options plugin to overwrite the mail from field.

End result – all working.