Archive for the ‘Articles’ Category

 

 

Installing imagick on Windows

Wednesday, August 30th, 2017

A few years ago i wrote a post moaning about how difficult it is to install imagick on Centos. Well i have to say that was a breeze compared to installing it on Windows..

As we know it is a PECL extension. On the page we see this “This extension requires ImageMagick version 6.5.3-10+ and PHP 5.4.0+.”.

But what they are not saying there is that you should not use the official windows binaries that you get from imagemagick.org. In fact they are saying the opposite.

(more…)

dynamically manipulate a jQuery Mobile Control Group

Monday, May 18th, 2015

I could not find a working answer to the question How to dynamically populate a control group in jQuery Mobile and programatically change its selected value in the search engines, so I though I would write this quick article.

Now, lets say your HTML looks like this:
(more…)

Enabling PHP in a single directory

Tuesday, March 10th, 2015

I am writing this because I couldn’t find any information on how to enable PHP for a single directory.

Let’s say we have a website example.com, whose documentRoot is in /var/www/vhosts/example.com. I want PHP disabled for the entire website apart from the directory /myApp.
(more…)

Upgrading PHP?

Monday, January 27th, 2014

If you think that by upgrading to the latest version of PHP you will be more secure than before you might be wrong. Some security features such as magic quotes GPC and safe mode have been removed as of 5.4.

In HTTP all of the communication coming into a web app from the outside world happens via one of the 3 channels (Get, Post and Cookie). The magic quotes GPC feature automatically escapes the input.

(more…)

Copying a LAMP web application

Wednesday, June 12th, 2013

One of the most common things a web professional does is copying a website from one web server to another. Whatever the reason – deploying, debugging, upgrading – it doesn’t matter. A few years ago when I started working with the web – I was using FTP. The more I was digging into the Linux Command Line the less I was using things like FTP until the point I completely stopped using it. You will see how quicker it is doing a copying via SSH compared to downloading all files via FTP and then uploading them again. The 5 main steps you need to take when copying a website are described below:
(more…)

June 2013 already?

Wednesday, June 12th, 2013

Is it June already? Time flies when you are having fun! haha… Last time I wrote here was in January, so I guess the plan to start writing here more often failed. The truth is that I have been busy with soo many different things.

On the personal side of things – it’s all the same (partying, travelling, socialising, living life to the full and enjoying the small things). I must admit – the weather in Scotland has been lovely for the last few weeks. I think that Europe and Scotland exchanged – while EU gets all the rain – we got the sunshine in Scotland ūüôā

On the technology side of things I have been digging deep into the mobile side of the web (building HTML5/CSS3/jQueryMobile web apps in Cordova) as well as trying to build the perfect MVC PHP framework to use for my own projects (I might release it under the GNU/GPL one day).

(more…)

The Modulus operator, The Ternary operator and FizzBuzz in PHP

Sunday, January 6th, 2013

Happy new year! I’ve disabled my Facebook so I think I will start writing here more often..

Anyway, I wanted to talk about the Modulus operator % in PHP (which is very similar to most other programming languages).

From the PHP docs, we know that it returns the “Remainder of¬†$a¬†divided by¬†$b“. But what does that mean?

(more…)

From MySQL to SQL server for PHP devs

Friday, November 16th, 2012

As you know, I have been a LAMP developer for years. I simply love all the things that make LAMP amazing РApache, PHP, MySQL and Linux. Last year some fellow developers were trying to convince me to move away from Apache and switch to nginx but they failed. I am that type of developer who always try to use the most used technologies. The reason for that is because they are usually the most stable.

Recently, I have been asked to develop a PHP application that runs on Windows Server’s IIS and uses Microsoft SQL server as a RDMS. As you might have expected this has been a new experience for me and it has been rather bad.

The reason why I am doing this post is to try and help other developer with PHP/MySQL background switch better. So lets get started!
(more…)

about passwords and web security in general

Thursday, June 30th, 2011

The topic about passwords never gets old. They are the unique string which a user has to enter into a web site in order for the system of that site to know who the user is.. But you already know that of course.

In the beginning passwords could be anything from just a single letter to 20 chars. Then password polices got a little stricter and most of the websites made a requirement for at least 4 characters, then the limit was lifted to 6 characters. Now in the last few years some websites have lifted the limit to 8 characters and others have also added additional security requirements such as having both upper and lower case characters and numbers in the password.
(more…)

Web based IDE

Sunday, December 5th, 2010

If you are like me and you travel all the time, from one place to another and you use different computers all the time you probably miss most of your software all the time. Well, at least one problem could be solved with this web based Integrated Development Environment (IDE) by Mozilla:

http://mozillalabs.com/skywriter/

I’ve not had the chance to fully test it yet, but will extend this article when I have time.

Making a dynamic URL look like static

Monday, November 29th, 2010

1. Introduction
Static URLs are preferred by search engines and are more user-friendly and meaningful than the dynamic ones.
An example of dynamic URL is:
http://example.com/page.php?id=1545

of course this URL tells nothing to the user and search engines won’t like it, because they will know it is dynamically generated.
(more…)