Contactez-nous : 01 71 18 39 73

Articles techniques Syndicate content

Debugging PHP with Eclipse: an additional tip

Articles techniques - Tue, 24/08/2010 - 13:45

This article is just a quick follow-up of the article Setting up a XDebug debugging environment for PHP / WAMP / Eclipse PDT.

In the previous article, we learned how to debug a PHP web application using Eclipse and XDebug.
However, in those tests, the browser used was the internal Eclipse browser. This is pretty good, but
if you have a pretty complex web application, with a lot of Javascript, you might want to test and
debug it directly in your browser.

read more

Categories: Articles techniques

My mails are being treated like spam! What should I do?

Articles techniques - Tue, 20/07/2010 - 09:59

Lately, I've been working on the Butterflive website where users can subscribe. As part of this process, users are sent automated mails (to check if the mail address they provide is correct or not). Alas, my mails were filtered as Spam by my own mail server.

In this article, I'll describe step by step what I did to solve the problem, what was successful and what did not work as expected.

The environment

First, a quick word about the environment:

  • Mails are sent in PHP, using the Zend_Mail component of the Zend framework

read more

Categories: Articles techniques

Installing APC op-code cache on Ubuntu 10.04

Articles techniques - Fri, 16/07/2010 - 17:54

In this article, I will explain how to install the APC opcode cache in a few easy steps, on Ubuntu 10.04.
APC is an opcode cache (and more). When a PHP script is run, it is compiled by PHP internally, before executing it. PHP does not store the compiled result, therefore, next time the script is run, PHP will compile it again. APC is designed to store the result in its cache. This way, when PHP executes again a script, APC will serve the compiled script from the cache. PHP won't have to parse the script again, and it will save a lot of time.

First step: install PECL

read more

Categories: Articles techniques

Setting up a XDebug debugging environment for PHP / WAMP / Eclipse PDT

Articles techniques - Thu, 08/07/2010 - 09:01

In this article, we will step through all the steps required to enable debugging on your PHP environment.

The setup we will use is: WAMP 2 with PHP 5.3, Eclipse Helios with PDT.

Setting up the development environment

Obviously, the first step is to install WAMP, then to install Eclipse Helios (use the Eclipse for PHP release version). I will assume in this article you have a basic understand of Wamp and Eclipse PDT.

read more

Categories: Articles techniques

Installing the PHP geolocalization extension on CentOS

Articles techniques - Mon, 07/06/2010 - 10:05

Lately, I've had the need to install a geolocation database on a web server to localize (as closely as possible) a visitor based on its IP address.

For this, I've been using the MaxMind geolocation database. Although Maxmind is a commercial service, they provide a free database mapping IPs to countries.
Maxmind provides a PHP geoip extension enabling a very quick access to the GeoIp database.

In this blog article, I'll describe all the required steps to install the geoip extension on a PHP server, on a CentOS distribution.

read more

Categories: Articles techniques

GET or POST? Best practices for choosing the HTTP method

Articles techniques - Wed, 26/05/2010 - 09:20

Last night, I read a not so old post from Brandon Savage about why "every developer should write their own framework". Very interesting reading, especially since I love writing my own frameworks. But I could not imagine how right he could be.

read more

Categories: Articles techniques

Internationalizing a Javascript script

Articles techniques - Tue, 18/05/2010 - 22:10

Lately, while working on Butterflive, I was faced with the challenge of internationalising a pure Javascript module. Using the usual server-side techniques to provide translation was not an option.

Basically, I wanted to easily provide a chat window with messages that would be translated automatically depending on the browser's locale.

read more

Categories: Articles techniques

Managing HTML / Flash overlay problems

Articles techniques - Tue, 18/05/2010 - 20:48

I'm currently working on a live video-chat solution named Butterflive (more on that later).

The chat window is a div with absolute positionning. When the chat window was moved above a flash video (a SWF), I noticed strange results (see below).

You can see that some parts of the chat window are going above and some parts are going below the Flash movie.

I tried to tweak the zindex CSS property without any success.

Actually, the problem comes from Flash.

read more

Categories: Articles techniques