Recently i faced with a case when i need to run an old website which requires PHP 5.2 when my main version on the test server is 5.3.5
Debian Squeeze 6.0
Here i place a very short step by step instruction for how to do so.
1. Go to http://us3.php.net/downloads.php and download needed php version.
2. Extract just downloaded file: shell> tar xzvf php-5.2.17.tar.gz
3. Install PHP development libraries:
shell> apt-get update
shell> apt-get install libxml2-dev libmysqlclient-dev libcurl4-gnutls-dev libcurl4-openssl-dev libpng12-dev libjpeg62-dev
4. go to the folder where you extracted PHP archive
5. configure and make it:
shell> ./configure --prefix=/opt/php5.2 \
shell> make install
6. Install and set up fastcgi support for PHP:
shell> apt-get install libapache2-mod-fastcgi
7. Enable fastcgi:
shell> a2enmod fastcgi
8. Enable mod_actions:
shell> a2enmod actions
9. Set up PHP cgi wrapper. Create file '/usr/lib/cgi-bin/php52-cgi' with the following content:
10. Make this file executable:
shell> chmod +x /usr/lib/cgi-bin/php5-cgi
11. Create include file for Virtual Hosts: '/etc/apache2/php52.conf'
12. Fill it in with the following content:
#include for virtual hosts that need to run php-5.2
ScriptAlias /php52-cgi /usr/lib/cgi-bin/php52-cgi
Action application/x-httpd-php5 /php52-cgi
AddHandler application/x-httpd-php5 .php
13. copy php.ini-recommended file to /opt/php5.2/ and rename it to php.ini
14. Include this file in to Virtual Hosts, where PHP2 is needed.
#needs to run version 5.2.x of PHP
15. Restart Apache: /etc/init.d/apache2 restart
That is it.
Thanks to Brett's blog!
Also I invite you to visit us at www.mbi-solutions.net
Wednesday, July 6, 2011
Tuesday, July 5, 2011
Hi, today we added an English version to our website http://www.mbi-solutions.net
For this we split the content in to 2 folders: "nl" - for Dutch one and "en" for English.
The only page - index.html remains in the root folder.
To all the pages we added language switcher which cross references corresponding pages.
From the SEO point of view what has been done:
- Language tags (see previous post) have been changed to reflect thee new language.
- Titles, keywords, descriptions and pages content have been translated
- Sitemap file which is used by search engines has been also updated to reflect the changes.
Posted by Igor Stolyarov at 2:26 AM
Friday, July 1, 2011
Here i'm going to put SEO optimization tips used while optimizing www.mbi-solutions.net.
Generally that's for myself for not to forget it.
1. Don't forget doctype:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2. <html> tag should look like this:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl">
(MBI Solutions is Belgium website that's why i used "nl" to show that the language of website is Dutch)
Also i added these tags (some manuals recommended to do so):
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="nl" />
<meta http-equiv="language" content="NL" />
<meta name="language" content="nederland" />
3. All pages must contain title, keywords and description meta tags. They should look like this:
<meta name="keywords" content="MBI Solutions, software, web-site, internet, Belgium, software ontwikkeling" />
<meta name="description" content="MBI Solutions. Vaste Project prijzen. Professioneel en flexibel. Bespaar tot 50%. Social media. Verhogen klantwaarde. Klantgericht." />
Title will be shown in the browser's headr
Keywords should contain key words describing this page (not whole website!)
Description should contain a short explanations, examples of what this page is about.
!!The most important!!: words which you put in to title, keywords and description must appear in the page content. Better if they appear there not once.
4. All images on pages must have ALT tag filled in. you should put there short description of what is shown on the image. Also the names of images should also men something. For example:
<img src="img/office.jpg" width="296" height="182" alt="MBI Solutions office foto" />
Here the name of the immage says that it's an office photo and the same is mentioned in the image alt tag.
Posted by Igor Stolyarov at 12:01 PM