Categories
Open Source PHP Technology Ubuntu

Installing Zend Core PHP on Ubuntu Linux (8.04)

Warning! Techy post – if your not into Web development you’ll want to skip this one…

I’ve been wanting to try out Zend Core (Zend’s standard PHP stack / extension or “Reliable PHP made easy”) for a while but as Ubuntu isn’t officially supported I’ve held off. A problem with some code running on the Ubuntu version of PHP 5 forced my hand – I discovered that its actually not that hard to get ZC up and running on Ubuntu. Thought I’d share in case this is helpful to anyone…

  1. Download, unpack and run the ./install command as per usual
  2. I opted to stick with the version of Apache already installed (as its slightly newer than the Zend bundled one)
  3. My experience of Zend attempting to configure Apache varied – one some boxes it almost worked, others it didn’t. If you find the installer crashing out just untick the configure Apache option and try again.
  4. Once Zend Core has completed you’ll need to tweak things abit…

PHP5 Module

The ZC installer will have probably left your Apache configured with 2 LoadModule php5_module entries (one in /etc/apache2/apache2.conf – thanks to ZC and the other Ubuntu one in /etc/apache2/mods-enabled/php5.load). So you can either do a sudo a2dismod php5 to remove the Ubuntu one or modify the Ubuntu one to the following:

LoadModule php5_module /usr/local/Zend/Core/modules/apache22/libphp5.so

In fact you can be cunning here by commenting out the Ubuntu PHP5 extension and adding the ZC one in this file – allowing you to effectively switch between the 2 different extensions should you need to.

MySQL extension – if you’re using MySQL then you’ll need to watch out for the fact that the bundled MySQL extensions look for the MySQL socket file in /tmp/mysql.sock rather than the Debian / Ubuntu location which is /var/run/mysqld/mysqld.sock

In most cases changing in php.ini:

mysql.default_socket =
to
mysql.default_socket = /var/run/mysqld/mysqld.sock

Does the trick; but alas not in all cases it seems (eg MySQL PDO). Really hacky fix to this (please do let me know if you have something better – other than editing the socket in the /etc/my.cnf file) is to run a scheduled (using crontab) symlink of /var/run/mysqld/mysql.sock to /tmp/mysql.sock

To do this run: sudo crontab -e
and add the following line:

 5 * * * * ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock

And for now that works for me. If you want a copy of some of the relevant config files / snippets (including the extra bit that ZC adds to the apache2.conf) then I have zipped them up for ease.

Zend Core itself looks like a good product – being able to access to php.ini options via web based tool is pretty useful, as is knowing you are working on a consistent & tested version of PHP. Its a shame MySQL doesn’t offer a similar free / unsupported version of their MySQL Enterprise in a similar way really…

Categories
Open Source PHP Ubuntu Web Development Zend Framework

Zend Framework to be bundled with Ubuntu Hardy (8.04)

Interesting & good news – Zend Framework is being bundled as part of Ubuntu Linux: http://devzone.zend.com/article/3232–Zend-Framework-to-be-part-of-Ubuntu

Direct link to article: http://andigutmans.blogspot.com/2008/02/zend-framework-to-be-part-of-ubuntu.html

Also found an interesting presentation on version 1.5 of the Zend Framework.

Categories
Linux Open Source Sony Stuff Technology Ubuntu

Ubuntu Hardy Heron (8.04 alpha), Sony Vaio Memory Stick slot reader

Desktop of Hardy HeronBit of a techy one here (so skip this if your not into Linux!) but sometimes these posts are useful to others!!!

Whilst trying to get my Sony memory stick slot (Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD) working on my Vaio under Ubuntu 7.10 (Gutsy) I came across this bug report where someone recommended trying the live CD of the latest release (Hardy Heron) to see if that fixed the issue.

Not sure is progress on the issue with the memory stick reader has been made – instead of:

[10321.605008] tifm_core: MemoryStick card detected in socket 0:0
[10321.611165] tifm_ms: Unknown symbol tifm_has_ms_pif

I now get:

tifm_core: MemoryStick card detected in socket 0:0

Which is possibly a bit of a backwards step!

However what I did discover is that the alpha (development) version of Hardy – the new 8.04 version of Ubuntu which is due for release next month – is pretty stable. So I have decided to take the plunge and did a dist upgrade (changing the /etc/apt/sources to reference hardy rather than gutsy and then running upgrade-manager -d). So far working well (hopefully not famous last words!!) writing this from it.

This thread (SONY VAIO MEMORY STICK: tifm_7xx1: sd card detected in socket 0)
and another on Ubuntu Forums discusses a similar issue / mounting SD cards and the latter suggests using

sudo mount /dev/tfa0 <mount point>

but this doesn’t work for me – if anyone knows how you look up what a device is likely to be listed as I’d be keen to know (need to do a bit of digging on this). I think I need to resolve the tifm_ms bit first.

I have been contributing the bug report (feels good to give something back after all the years of being a Linux user – now on the way to becoming a tester / bug reporter – who knows one day I might write some code for it!!)

Hardy comes with Firefox 3 beta 3 which seems really good also (hope I won’t be eating my words!) unfortunately Firebug and Google Brower sync (two plugins I can’t live without!) don’t seem to be available for it yet – so I am mostly using FF2 still.

Categories
Linux Samba Technology

Getting support for a small company Ubuntu Server installation

Why are most (small) IT support companies not interested in supporting Linux? If you are an IT support provider in the London area who can support a small network of Windows XP PCs and a Ubuntu (Samba) Fileserver (which pretty much takes care of itself) please get in touch!

I will post up details when I find someone on this in due course. [Edit opps I should have done more Googling before posting – it looks like Canonical might offer what I am after – but what I am saying here holds up – support for both Windows & Linux from IT support providers is needed…]

I think this could be an interesting/lucrative potential market – stop selling the over priced and bloated MS server offerings and sell the more cost effective and robust Ubuntu Linux based solutions for small businesses. What with web based management systems its got to be the way to go. Particular as lots of basic NAS boxes are going down the embedded Linux route.

Surely some of the saving in licensing costs can be passed on to the customer and some kept back as improved margin? I guess what this really needs to take off is a robust Open Source Email/Calendaring solution (Exchange Server killer) – I suspect Exchange is the reason a lot of businesses still go for Windows Server.

Categories
Ubuntu Web Development

Ubuntu (7.04) on HP Proliant DL385 G2 Server

2 word summary = Works well! -Here’s a picture of one of the boxes I got in for work recently:

HP Proliant DL385 Server

Thought I’d share a few notes…

Firstly these don’t appear to ship with Optical drives as standard as (after talking to my friend who works at HP) most large customers use network based deployment systems to install the OS.

Not an issue though – just get hold of a USB CD or DVD drive to do the install from. Once I got hold of one of those everything just worked. RAID (using very flashy 2.5″ SAS drives), Ethernet everything – so thought I’d document that as when I ordered not much came up on a Google search for this specific model. And is working well after 3 months of use as a LAMP and SVN server.

Currently we are using 2 in my dev team – one for Wiki and SVN and another to host our LAMP Development work on a central box – Apache 2.2, MySQL 5.0 and PHP 5.2 – having a central development box really helps when working together (I will write an article on that in due course!).

The iLO feature on these boxes is quite cool too – for those of you that don’t know iLO (Integrated Lights out) is basically a mini server inside the server that has its own Ethernet network connection – you can use a web based interface to boot, reboot or even install an Operating System – if you have the relevant HP software). Very handy – particularly when the server isn’t in the same area as you!

At 7city we ordered IBM xSeries servers for LAMP use but those generally needed a little bit of fiddling to work on Linux (an X336 required a Kernel parameter so it would shutdown/reboot properly) none of that needed with these HPs – they just work – very impressed.

Categories
Linux Technology Wireless

(Debian) Linux support quoted on the box of a product

This is the first time I’ve seen this (see the line highlighted in Orange) obviously I’ve seen Redhat or SuSE before but this is good to see. Hopefully we’ll start seeing Ubuntu too. (Ubuntu is Debian based but many users won’t know that – or care for that matter!)

Edimax Wireless USB - Debian Linux Supported

I also think its comedy that they’ve mistyped Mandrake as Mandark! For those of you that don’t know Mandrake is another Linux distribution that aims to be easy to use.

Talking of things that are good to see hopefully the Dell Ubuntu Store will be in Europe before too long!

Categories
Linux Sony Stuff Technology Ubuntu

Ubuntu on the Sony Vaio SZ3

Full post to come on this but a summary – 99% of the features of the laptop (nVidia Graphics, Wireless, Mouse etc) all work out of the box (no messing about at all – it just works!) with Ubuntu Linux 7.04 aka “Feisty Faun”!

Ollie’s Vaio SZ3 running Ubuntu

I am really impressed with Ubuntu 7 – its a very well polished piece of software and what with the news of Dell announcing Ubuntu as a supported/pre-installed operating system in the US I think its starting to reach a level of maturity that makes Linux more accessible to the average user – interesting times…

When I did a google I found a link to related model. I have yet to try out all of its suggestions (such as detecting what graphics card is switched on – from the Stamina/Speed selector switch and changing the X config) but as I learn more I’ll update this post.

Hmm looks like this question on Launchpad might get the Webcam working.

Categories
Linux Samba Ubuntu

Ubuntu Server Kernel Opps turned out to be faulty memory

The title of this one says it all really, but after spending hours scratching my head with a office file server I built for L.S.A. Ltd (www.travelf1.com) late last year I found the solution to the crashes that started occuring a couple of weeks ago.

See this Ubuntu Server Crash Output file – for the error message that was appearing basically it was a Kernel Oops that occurred when large files were being copied/transferred via samba. It turned out to one of the memory DIMMs going weird which I discovered after having the idea to run a Memtest on the machine (Memtest is available as a boot option when starting up a Ubuntu machine). At first I suspected the software RAID 1 but that’s actually been rock solid on this box and on my home Ubuntu server too.

Categories
MS Windows Vista 7, 8 etc Samba

Using Vista Offline Files with a Samba Share

So after tearing my hair out for the last week with Vista – almost to the point when I was going to put Windows XP back on – I have finally got Vista Offline files working with my Samba shares…

I like to move the My Documents folder on each of my machines from the C: drive to a network share that lives on my Linux file server – on my laptop I make that available offline – in case I am away from home etc. On Windows XP this was fine and worked pretty well. I recently upgraded to Vista and mapped the drive for my home directory – all good made it available offline (or “Always available offline” as Vista now calls it). It did its initial sync and all was good.

Next time I logon (and after making sure I am connected to the network) I go back to my network drive to make sure its working online – and nope it isn’t! I make sure I can ping the machine – thats okay and I can access the share online if I access the machine by its ip – \\192.168.1.4\share. Very weird and very frustrating!

Whilst searching for the solution I came across some useful info on making sure Samba is setup correctly for offline files (mainly to do with oplocks – see below for a useful link).

Anyway tonight I have a brain wave whilst looking at Vista’s user management stuff and reading some more stuff on the net. It turns out that Vista’s offline files works per user rather than per share and as a result is more reliant on usernames and passwords. My Samba share uses a different password to my vista login. So I made them the same – and hey presto it works!

So in summary if using offline files in Vista make sure your usernames and passwords match. I also think I’ve seen something under the user accounts section that lets you link in different user account details – but I haven’t tried that yet. Here is a screenshot.
Vista Network Password Screenshot

Vista Offline Files Samba Settings Link Broken as of June 08 ;-(