Ubuntu 7.10, Setting up / Installing SSH Access, Apache2, Mod Rewrite, HTTPS / SSL Certificate, MySQL 5, PHP 5, XSL, XSLT, PDO, ImageMagick (Imagick)

Apache, General News, Trips and Photos, php, ubuntu No Comments »

This document Contains information about Installing Ubuntu, Setting up / Configuring: SSH Acces, Apache2, HTTPS, MySQL5, PHP5, XSL / XSLT, Imagick, PDO and Home networking (Although not complete !!)

Ubuntu 7.10, From Installation to Complete Setup - An Idiots guide

Information Covered..

  • Initial and Essential Configuration
    • Install
    • Pre Use / Screen Setup
    • Update / Upgrade your new installation
    • Setup SSH Acess
  • Setting up the Web Dev Environment
    • Setup Apache2
    • Setup HTTPS / SSL Cert
    • Setup MySQL 5
    • Setup PHP 5
      • Enable XSL / XSLT support
      • Enable Imagick (Image manipulation library
      • Install PDO
  • Setting up the home network (SSHFS and NTFS)
    • Installing the Samba Server
    • Connect your Win box to Ubuntu Box

Wordpress’ code is shit… so please read this blog entry / ubuntu how-to on this plain html page.
Click here to read more.

php5-mysql mixed with pdo and pdo_mysql causes apache to failed to load.

Apache, php, ubuntu 5 Comments »

I am running ubuntu 7.10

I had previously installed php with pdo, and added the pdo_mysql and pdo
extension into the /etc/php5/apache2/php.ini file.

Once i then tried to install php5-mysql via apt-get php segfaulted and
apache refused to restart.

With the pdo and pdo_mysql extension in php.ini i was getting the
following error from /var/log/apache2/error.log..

PHP Warning:  Module ‘PDO’ already loaded in Unknown on line 0
PHP Warning:  Module ‘pdo_mysql’ already loaded in Unknown on line 0
/usr/sbin/apache2: symbol lookup error: /usr/lib/php5/20060613
+lfs/pdo_mysql.so: undefined symbol: php_pdo_get_dbh_ce

Once i commented out the pdo extension, this got rid of the first PHP
warning, and pdo is in phpinfo but no pdo drivers..

If i comment out pdo_mysql in /etc/php5/apache2/php.ini and also
commented it out from /etc/php5/conf.d/pdo_mysql.ini and restarted
apache then it worked.

Bottom line is, if anywhere at all you have pdo_mysql.so in any
configuration, you get the error:

/usr/sbin/apache2: symbol lookup error: /usr/lib/php5/20060613
+lfs/pdo_mysql.so: undefined symbol: php_pdo_get_dbh_ce

and apache fails to load.

Server version: Apache/2.2.4 (Ubuntu)

Quality information on PHP SPL

General News, php No Comments »

I was recently browsing around looking for information about PHP SPL apart from the standard info on the php manual website.

I came across the following website: http://www.phpro.org 

This website has some really quality written articles about php and also about the php spl library.

If you a up and coming php developer, or already consider yourself a guru then still check the articles, tutorials as its definatly worth a good look as theres lots of information still to be learnt..

Wordpress is messy disgusting code

General News, php 1 Comment »

Every tried modifying wordpress code ?

After I had an inital look I have been put off. Unfortunatly today work has forced me to get into the guts of wordpress and this stuff is grotesque !

Here is a sample of some code: http://devpipe.pastebin.com/f42a541d2

Please digg / comment if you agree that wordpress is such a messy piece of work it needs a compete ground up re-write and some kind of templating engine used to cut out all this embedded inline php shit.

This thing needs binning a proper application where code is separate from content written.

Install Imagemagick / Imagick for PHP on Ubuntu

php, ubuntu 2 Comments »

Want to know how to install Imagemagick on ubuntu ?

No problem if you want to install imagemagick on your pc, ubuntu makes this very easy for you with only a few simple commands..

  • Make sure u have pear install ( ’sudo apt-get install php-pear’ )
  • Then run: sudo apt-get install imagemagick
  • And then: sudo pecl install imagick
    **if you get an error which looks like this: configure: error: Cannot locate configuration program Wand-config

    then no problem, simply run the following command: sudo apt-get install libmagick9-dev
    Now re-run sudo pecl install imagick

All sorted ? Good, now simply add extension=imagick.so to your php.ini and your done :)

Incidently, if you want to get serious about PHP and Imagemagick, i highly recommend you check out mikko’s imagemagick blog which details lots of examples of using imagemagick and pushing it to the limit. cool stuff.

My Ubuntu 7.10 Setup - Initial setup, Look & Feel, Web dev environment

Apache, General News, php, ubuntu No Comments »

Hello anyone reading, i recently setup my ubuntu 7.10 (Which I’m absoloutley convinced is slower than 7.04) and anyway, here is a few notes from my installation, i hope someone finds some part of it useful. If so.. please comment…

There are 3 main sections:


Step 1, initial setup

Hello, this is my guide to setting up my ubuntu dev machine.

Here is my PC setup:

  • PC: Dell INSPIRON 530
  • Monitor: LG Flatron Wide M228WA

Issues with the INSPIRON 530 from previous ubuntu installations..

I have reinstalled ubuntu many times on the Dell INSPIRON 530, and have encountered a few issues in the past. I will detail them below.

Help, No ethernet !!

Prior to Ubuntu 7.10, if you installed ubuntu on your Dell INSPIRON box, you will find the ethernet on the back is not supported out of the box. To get the ethernet installed, please untar the following archive..

firstly do: wget theatons.com/test/dump/linux-backports-modules_2.6.20-16.tar.gz
then extract: tar xzvf linux-backports-modules_2.6.20-16.tar.gz
then run: sudo dpkg -i linux-backports-modules-generic_2.6.20.16.28.1_i386.deb

You might have to run the other one aswell, in some kind of order, but it makes no harm to just play about running those and then plug in your ethernet, give it 1-2mins to sort it self out, then run ifconfig and you should see your ip having connected via your ethernet.

Incidently the ethernet for the Dell INSPIRON 530 on ubuntu 7.10 works out the box

What about my Dell E228WFP ?

Well i know when i installed with ubuntu 7.04 it only went up to 1024 res out the box, however the correct xorg.conf and guide to getting this to 1680x on my other post here: Setting up the E228WFP with ubuntu.

I don’t know how this is with ubuntu 7.10 as i said i’m now using a LG Flatron Wide M228WA, which incidently is as much more superiour monitor, and works with ubuntu 7.10 out the box at 1680x resolution.


Step 2, personal preferences

Lets get it looking a little better so we can work on it properly..

Big fonts look ugly.

I highly recommend taking down the font-size from the standard ubuntu font-size of 10px to 8’s and 9’s.

Todo this go to ‘System’ -> ‘Preferences’ -> ‘Appearances’ -> ‘Fonts’ and then i use, in this order:

  • Application font: 8
  • Document font: 8
  • Desktop font: 8
  • Window title font: 9
  • Fixed width font: 9

And keeping the font itself standard feels fine. I also set it to ‘Subpixel smoothing (LCDs)’ but this is all personal preference really.

Getting a start like, ‘windows’ menu…

If your coming from a Windows background, as i’m sure 90% of people are, i recommend a nice easy start style menu, again, all personal preference..

I do the following..

  • Add a panel to the top menu, ‘Window list’
  • Unlock the top menu and then add into it the ‘Workspace switcher’, ‘Deleted Items’ and ‘Show Desktop’
  • Finally ‘Delete’ the bottom pannel, then drag the top pannel to the bottom.


Step 3, Setting up the ultimate webdev environment

What am i talking about ? Just installing the things everyone needs to get along in this web dev mad world !

  • Apache 2
  • MySQL 5
  • PHP 5
  • phpmyadmin
  • SSL certificate
  • mod_rewrite
  • PDO and PDO_Mysql
  • Imagemagick

Think i’ve missed somthing of the list ? No problem, drop me a comment and i’ll stick it on

Installing the major players, Apache2, MySQL 5, PHP 5, PhpMyAdmin, SSL, Morewrite, PDO and PDO_MYSQL…

I’m not going to bother rewriting all this up, as comprehensive instructions can be found on my previous post, by clicking here

Please note, if you intend on sending requests via CURL from https, when u will need to fix this error: CAfile: /etc/ssl/certs/ca-certificates.crt
Todo this you simply need to type the following: sudo apt-get install ca-certificates

Want to know how to install Imagemagick on ubuntu ?

No problem if you want to install imagemagick on your pc, ubuntu makes this very easy for you with only a few simple commands..

  • Make sure u have pear install ( ’sudo apt-get install php-pear’ )
  • Then run: sudo apt-get install imagemagick
  • And then: sudo pecl install imagick
    **if you get an error which looks like this: configure: error: Cannot locate configuration program Wand-config
    then no problem, simply run the following command: sudo apt-get install libmagick9-dev
    Now re-run sudo pecl install imagick

All sorted ? Good, now simply add extension=imagick.so to your php.ini and your done :)

Incidently, if you want to get serious about PHP and Imagemagick, i highly recommend you check out mikko’s imagemagick blog which details lots of examples of using imagemagick and pushing it to the limit. cool stuff.

I want my php to send emails aswell

If you need your php - dev environment to also send emails, simply install any kind of mail program, i use postfix.. sudo apt-get install postifx

Simply select ‘internet site’ if your unsure, make sure you put the mail server name NOT as your @domain.com email, as this will be treated as internal, and not sent via the web. a good server name might be: MyDevBox for example.

What about vim ? And syntax highlighting .. etc ?

Simply type: sudo apt-get install vim-full

Then cd ~/ to get to your homedirectory, then vim .vimrc and put in whatever settings you would like, eg: “syntax enable”. .. you may find some idea’s on the net from other peoples .vimrc files.. have fun :)

I have also put my personal .vimrc file online which can be found here: My .vimrc file / Vim setup file

Protx Offers no 3D Secure PHP Integration Kit

General News, php No Comments »

Utterly shocking, protx launch 3D secure checkout system, and yet do not offer full documentation / integration kit. Read the rest of this entry »

My .vimrc Config file

Apache, General News, php, ubuntu No Comments »

Hello, This is how i like my .vimrc file :)

” Enable syntax highlighting
syntax enable

” Map F8 with next tab, and F7 with previous tab
map :tabn
map :tabp

” Make sure backspace always works
set backspace=2

” Autoindent
set autoindent

For those of you who are still running vim < 7 i recommend you update purely for the tabs. Although previous versions had a :next and :prev the new tabs along the top just seems to make work much easier.

I also highly recommend checking out the vim documentation, available at this link: Vim Documentation and also check out this for some cool tutorials and links Vim Resources

My Home PC Setup

General News, php, ubuntu No Comments »

I have had many requests latly to take a photo of my home setup, so.. here it is :)

Click the picture to enlarge..

homework_small.jpg

PHP / JS Image cropper

General News, php 4 Comments »

I have recently just made a small app / class to crop images using this excellent js image cropping tool,  found here: http://www.defusion.org.uk

I have stripped out all the shit, default config is to maintain a specific aspect ratio and with a minimum size, however this can be changed by looking @ the defusion examples

Click here to download the js cropper with the php GD 2 crop functionality.

**Note: Have to set file permissions on the /cropper folder so it can write the image once its been edited.

WP Theme & Icons by N.Design Studio & Shamefully P0wered by WordPress
Entries RSS Comments RSS Log in