Archive for the ‘howtos’ Category

Mar 18

This is my first post about IPv6 and, as you can read in the title, is gonna be the first of a serie.

One thing that is driving me mad during these days is that on many sites, blogs, forums etc. there are a lot of explanations about how IPv6 works, but really few explanations on how to make it working.

So now I’m not gonna explain what IPv6 is, or how it works, because I’ll assume that the reader has at least a basic IPv6, IPv4 and UNIX / NetBSD understanding.
I’m gonna write down the steps I performed to get IPv6 connectivity ( assuming your ISP isn’t already giving you native IPv6 connectivity, otherwise you can stop reading now ) using a D-Link DSL-2640B aDSL modem-router with a standard firmware ( support IPv4 only ) and a NetBSD/i386 5.1 based router ( any computer with two NICs ).
I currently have no firewall on the DSL-2640 and no services / daemons running on the NetBSD router.

In this first post I will illustrate how to get IPv6 connectivity via a tunnel broker. There are many free services availables. I choose Hurricane Electric ( HE from now on ) just because a pair of friends already use it and told me that it works.

The tunnel created with an HE’s endpoint is static and request that you have a public pingable IPv4 address.
If you are behind a router that does NAT, like me, this could represent a problem, so I created this page to test if I can ping my public IPv4 address.
The solution I found was to move the NetBSD router to the DMZ, so when someone ping my public address, actually it sends ICMPv4 requests to my NetBSD router.

Creating a tunnel on the HE website is pretty simple, just look at the image below:

Create tunnel with HE

  1. Click;
  2. Insert your public pingable IPv4 address

HE tunnel details

Just remember, for this specific configuration, when configuring the tunnel interface on the router, not to use your public IPv4 address but to use the private address of your IPv4 gateway. So, to create a tunnel in NetBSD ( 4.x or 5.x ) type the following as root:


# ifconfig gif0 create
# ifconfig gif0 tunnel $Your_IPv4_gateway $Server_IPv4_address
# ifconfig gif0 inet6 $Client_IPv6_address $Server_IPv6_address prefixlen 128
# route -n add -inet6 default $Server_IPv6_address

The tunnel should be up and ready. Just try to send an ICMPv6 echo request to someone using ping6, like ipv6.google.com ( you have to create and configure /etc/resolv.conf first ).

If you succeed, congratulations! You’re now on the IPv6 internet and halfway in configuring the router!

In the next part I’m gonna explain how to enable routing, configure the router advertisement daemon and make the configuration permanent.

Bye



The procedure I’m gonna explain is mainly a remainder to myself.

But first of all a little introduction.

Back in the good ol’ days of MS-DOS there were four types of soundcard:

  • AdLib Pro Audio Spectrum ( and compatible chips/cards )
  • Creative Sound Blaster 16 ( and compatible chips/cards )
  • Creative Sound Blaster Pro ( and compatible chips/cards, I own one * )
  • Windows Sound System ( and compatible chips/cards )

* An Oak Technology Mozart Sound System 16 bit, Sound Blaster Pro compatible.

The way to install the driver files for a Sound Blaster card under MS-DOS, although not really easy, was more or less standard.
Launching a setup ( the easy part ), followed by some tweaking of the autoexec.bat and config.sys files ( the complicated part ) and hopefully nothing more.
Under Windows, things became a little more complicated and with the begin of the PnP ( actually, that means PLUG and PRAY ) era, things got even more complicated.
The final user is unaware of this because, over the time, setup programs became “smarter” and got the job ( installing the drivers and configuring the operating system ) done well almost always. That simply means sometimes they fail.

Some days ago, I had to install a Creative Sound Blaster Live! 5.1 Digital into Eagle, my 2.66 GHz Pentium 4 HT. Eagle already has an integrated audio chip, which works, but is not powerful enough for some tasks and doesn’t support ASIO drivers very well.

Picture of a Creative Sound Blaster Live! 5.1 Digital sound card

The SB Live! 5.1 instead is built around the EMU10K1 audio processor that, ten years ago, was one of the most powerful audio processors on the market and was used also on semi-professional equipment, so the decision to put the SB Live! 5.1 into Eagle was rather straightforward.

I already had the drivers for the card, downloaded from the Creative website three or four years ago ( they are 8 years old now and, no, Creative didn’t released a new version since 2003, so these are still the same NT 5.x drivers ) and I have already installed it once upon a time, so I knew just one or two things about the setup…

As I wrote, just above, sometimes the drivers setup programs fail. Needless to say that this setup fails just at the beginning.
The setup downloaded from the Creative support website, LiveDrvUni-Pack_ENG.exe, usually fails to locate the SB Live! installed into the system and quit without doing anything.
Although is an executable, actually is a self expanding archive that can be opened, for example, using WinZip.
Inside the audio\drivers directory there are some files that should be the drivers needed to use the card with Windows NT 5.x.

But using the Windows wizard to install the drivers doesn’t work for me as the OS tells that drivers for the device can’t be located in the folder… in which they actually are.
So I launched ctzapxx.exe, and that seemed to work, but the system failed to reboot ( Windows XP hanged during shutdown ). At the next boot, no drivers were installed in the system.
The solution was to launch ctzapxx.exe and, when asked to reboot the system, power-off the system using the switch of the power supply. At the next boot, drivers were installed and working.

Bye


Dic 31

/* A truly complicated way to... do it :) */

#include<stdio.h>

int main( int argc, char* argv[] )
{
   int values[] =
   {
      0, 25, 15, 0, 9,
      -89, 46, 23, 18, -87,
      57, 12, -4, 17, -82,
      18, -2, 1, 0, -16
   };
   char c = ( 'N' + 'C' ) / 2;
   int i;
   for( i = 0; i < 20; i++ )
   {
      c += values[ i ];
      printf( "%c", c );
   }
   return 0;
}

/* Bye */


I was very busy during the last two months so, as a result, I had little to no time to write something.
Something interesting at least…

During some spare time of the last week,  I built a really simple and cheap headphone amplifier. I needed one because sometimes I like to listen to some sat radio station (especially for news) and I don’t want to leave the TV on only to use it as an headphone amplifier.

I  wanted to keep the complexity low, really low, so I decided to use a pair of ICs instead of four ( one amplifier and one buffer per channel ) or more transistors.
There are various IC audio amplifiers. Some are huge AB class amplifiers able to deliver dozens of Watt to a 4 Ω load. That is not my case, because headphones usually have an impedance of 16 Ω or more.

The one I selected was the National LM386, a small 8 pin IC in a DIL package.
Considering the low output power, there is no need for a heatsink. Moreover, the air inside the case shouldn’t be hotter than the air outside, despite the little heat generated by the voltage regulator.
Using the LM386, only two external cap per channel are required. Without any further component, it’s easy to obtain a fixed gain of 20.

Talking about the PS (power supply), my idea was to use a cheap wall mount PS but, as many people know, sometimes ( *almost always* ) “cheap” means “unregulated-with-an-output-voltage-completely-different-from-the-rated-one”. Furthermore, a PS like that usually have different type and size of plugs, some with inverted polarity ( many devices use a plug with the negative/ground on the outside ).
So my amplifier needed to have its own voltage regulator and at least a diode to prevent damages in the case I or someone else accidentally connect a PS plug with the wrong polarity.

Now lets see the schematic:
Amplifier schematic

  • Vps ( and GND of course ) must be connected to a PS with a minimum rated output of 12 V;
  • D1 could be any 1 A diode, same for D2. 1N4001, 1N4002, etc are perfects;
  • L1 is not essential. Without it I hear a stronger 100Hz noise, depends by your PS;
  • C1 could be smaller or bigger, again depends by your PS;
  • U1 is the standard LM7809 3 pin fixed voltage regulator in the TO220 package. A very small heatsink is ok;
  • The value of C4 is not critical, but should be mounted close to U2 and U3;
  • Lin and Rin are the two audio input from RCA plugs;
  • R1a and R1b are two halfs of the double 100 kΩ potentiometer R1. R1 should be logaritmic;
  • C2 and C3 could be smaller (but equals);
  • About C5 and C6, the larger, the better;
  • R2 and R3 must be equals and not bigger than 8 Ω;
  • Lout and Rout are the output to the jack plug.

Now some technical details:

  • Vps must be greater or equal to 12 V and lower than 35 V. Assuming a 2V drop on U1 and a 0.7 V drop on D1, this lead to a minimum Vps of 11.7 V. As Vps raises, so do the temperature of U1 so be careful about heat generation;
  • The input impedance of the LM386 is 50 kΩ, so the value of C2 and C3 can affect the bandwidth. Keep in mind that usually there is also a cap on the output stage of the audio source, so actually there are two caps in series: the total capacitance is smaller than that of the smallest cap;
  • If you want to add a LED, simply connect it in series with a 1 kΩ resistor between the output of U1 and GND;
  • R2 and R3 are sorta short circuit protection;
  • There isn’t a Zobel network in this project. If you think you need one ( e.g. the amplifier oscillate ), add a 10 Ω resistor in series with a 50 nF cap between the outputs ( before R2 / R3  ) and GND.

I have used many spare parts to build this amplifier, but I think that 15 € should be enough to buy all the components.
Some spaces I left on the board are needed because of the various connectors that are very close to the board itself.

Amplifier board

I used a 0.5 mm solder wire and I made most of the link on the copper side of the board.
I used a plastic enclosure, but if you plan to use a metallic one, beware of ground loops and remember to insulate any plug from the enclosure chassis.
Could be a nice project if you are relatively new in building electronic circuit, but I don’t suggest it as the first circuit to build, because doing problem solving on audio circuit could be really frustrating.

The result (mine) is this, black and only a bit greater than a mouse.
Amplifier compared with the size of a mouse
The front side of the amplifier with the power LED, power switch and the volume knob.
Amplifier front side
The rear side of the amplifier with the RCA plugs, 6.3mm jack plug and the PS plug.
Amplifier rear side

Bye


Ott 31

Recently I needed a *BSD machine to test a software I’m developing with two friends for an university research project.
My choice went for NetBSD of course ( latest version is 5.0.2, but the 5.1 is coming, anyway…).
But I can’t use Mirage, my UNIX (Oracle Solaris) server, for two reasons:

  • The only disk inside has Solaris on it and I don’t want to remove it, install NetBSD, then reinstall Solaris again;
  • I need two network cards and  Mirage has only one ( the Happy Meal ).

Because Raptor is powerful enough, I decided to virtualize NetBSD on VirtualBox, so I can have up to four network cards, as much RAM (and CPUs) as I wish, remote desktop, etc.

So, I created a virtual hard drive, then I created a virtual machine and tried to boot it… No way… Some strange errors at boot, during kernel loading…
Now, the NetBSD slogan is “Of course it runs NetBSD”, meaning it is able to runs on almost anything with a CPU and some RAM, including the toaster.
Being unable to run on one of the most used desktop virtualization software is unacceptable. It has to be my fault, I’m missing something.
Something critical for every OS I’ve used (and they’re many) is the / or the C: partition. The boot loader could be able to launch the kernel, but the kernel could not be able to find and mount the partition.

So, get my advice. When creating a virtual machine for NetBSD, add a SCSI controller to handle the virtual disk instead of using the classical IDE interface or the newer AHCI interface.

Bye



Questa guida è stata realizzata su richiesta di… ehr… un “cliente” con la necessità di monitorare le operazioni di un altro utente sul proprio (del mio “cliente”) computer.

Le immagini sono state prese da una versione in lingua italiana di Windows XP Professional. Su Windows Vista / 7 non cambia molto.

Importante: Accedere come un utente membro del gruppo Administrator (XP) o eseguire il setup come amministratore (Vista / 7).

  1. Eseguire il programma di installazione.
  2. Selezionare la lingua (in questo caso, inglese).Language selection dialog
  3. Alla schermata iniziale cliccare sul pulsante ‘Next’.
  4. Alla schermata ‘Version Comparison’ cliccare nuovamente su ‘Next’.
  5. Alla schermata ‘License Agreement’ cliccare su ‘I agree’.
  6. Alla schermata ‘Information’ cliccare su ‘Next’.
  7. Alla schermata ‘Select Destination Location’, scegliere dove installare i file del programma.
    • Default: C:\Windows\System32\MPK
    • Altre possibilità: C:\Programmi\MPK (Windows XP Italiano); C:\Program Files\MPK (Windows XP inglese e Windows Vista / 7 a 32 bit); oppure altri percorsi a sceltaDestination Location Selection
    • Considerazione personale: installarlo sotto C:\Windows\System32 non mi sembra una buona idea…
  8. Alla schermata ‘Select Additional Tasks’ si può levare il segno di spunta da ‘Create a desktop icon’, quindi cliccare su ‘Next’.Uncheck 'Create Desktop Icon'
  9. Alla schermata ‘Ready to Install’ cliccare su ‘Install’.
  10. All’ultima schermata cliccare su ‘Finish’.
  11. All’avvio del programma compare una schermata che suggerisce di acquistare la versione completa. Cliccare su ‘OK’.
  12. La procedura guidata di configurazione si aprirà automaticamente. Deselezionare ‘Monitor all users’ per non monitorare tutti gli account del computer e poter scegliere selettivamente, quindi cliccare su ‘Next’.Uncheck 'Monitor all users' at the first configuration wizard dialog
  13. Selezionare gli utenti che si vogliono controllare, quindi cliccare su ‘Next’.
  14. Selezionare le attività degli utenti che si vogliono controllare, quindi cliccare su ‘Next’. Le opzioni non selezionate  non sono disponibili nella versione gratuita.Selection of the user activities to monitor
  15. Selezionare il livello di “invisibilità” del programma, quindi cliccare su ‘Next’. Le opzioni non selezionate non sono disponibili nella versione gratuita.Inivisibility options
  16. Selezionare una combinazione di tasti con cui richiamare il programma, quindi cliccare su ‘Next’.hotkey selectionE’ comunque possibile richiamare il programma mediante l’icona posta nella tray bar.traybar icon
  17. All’ultima schermata deselezionare ‘Check updates automatically’, quindi cliccare su ‘Next’.last dialog
  18. Fine

Adesso il programma è attivo e sta registrando l’attività degli utenti che si è scelto di controllare. Una volta richiamata la finestra principale del programma è sufficiente selezionare uno degli utenti sotto controllo per visualizzare i dati registrati.


This guide has been made on demand for… ehr… a “customer” with the need to control the actions of another user on his (my “customer”) computer.

Images come from an Italian language version of Windows XP Professional. On Windows Vista / 7 there aren’t many changes.

Notice: login as an user member of the Administrator group (XP) or run the setup as an administrator (Vista / 7).

Refer to the italian version of this howto just up here for the images.

  1. Run setup.
  2. Select language.
  3. At the first dialog, click on ‘Next’.
  4. At the ‘Version Comparison’ dialog, click on ‘Next’.
  5. At the ‘License Agreement’ dialog, click on ‘I agree’.
  6. At the ‘Information’ dialog, click on ‘Next’.
  7. At the ‘Select Destination Location’ dialog, choose where to install the program.
    • Default: C:\Windows\System32\MPK
    • Other options: C:\Programmi\MPK (Windows XP Italian); C:\Program Files\MPK (Windows XP English and Windows Vista / 7  32 bit); other locations
    • Personal thought: installing under C:\Windows\System32\ doesn’t sound like a good idea to me…
  8. At the  ‘Select Additional Tasks’ dialog, uncheck the ‘Create a desktop icon’ option, then click on ‘Next’.
  9. At the ‘Ready to Install’ dialog click on ‘Install’.
  10. At the last dialog, click on ‘Finish’.
  11. The first time the program start, it asks to buy the complete version. Close the dialog by clicking ‘OK’.
  12. The Configuration Wizard will run automatically. Deselect ‘Monitor all users’ to choose the user to control.
  13. Select the users to control, then click ‘Next’.
  14. Select the user’s actions to record, then click ‘Next’.
    Unchecked options are unavailable on the free version.
  15. Select the desired “invisibility”.
    Unchecked options are unavailable on the free version.
  16. Select the hot keys to unhide the program.
  17. At the last dialog, click on ‘Finish’.
  18. The end.

Now the program is active and is recording the activity of the monitored users. After unhiding the main window, just select a controlled user to see the recorded data.

Bye



So here I am, configuring my UNIX server (actually a Sun Ultra 5 workstation), Mirage, installing Oracle Solaris 10 for the second time after a disk change.
The disk on which Solaris was installed was too damn noisy to allow me to work at night so I just put another IBM 9GB SCSI disk and went through the (really long) installation process.
So, after installing the OS, I started configuring the system (adding users, configuring daemons etc.). In the meanwhile, I wanted to listen to some music so I just plugged my headphones into the corresponding jack, pressed ‘Play’ on the media player and… here it came…
the internal speaker.

The internal speaker is active by default, but, unlike others operating systems, those of the Ultra 5 / 10 are not only used to play ‘beep’ but also to play system sounds (could be useful) and other sounds (it’s annoying).

The only working solution I’ve found on the web (beside meaningless chats), is the following:

$ audioplay -p line

Now I should decide about putting that line on my ~/.profile file, but at least now I can listen to some music without that annoying noise.


E così, eccomi qui intento a configurare il mio server UNIX (effettivamente una workstation Sun Ultra 5), Mirage, installando Oracle Solaris 10 per la seconda volta dopo avere cambiato il disco rigido.
Il disco su cui era installato Solaris era troppo dannatamente rumoroso per permettermi di lavorare di notte, così ho semplicemente montato un altro disco IBM SCSI da 9GB e ho effettuato l’installazione (veramente lunga).
Dopo aver installato il OS, ho iniziato la configurazione del sistema (aggiunta degli utenti, configurazione dei demoni, ecc.). Nel frattempo, visto che volevo sentire un po’ di musica, ho inserito lo spinotto delle mie cuffie nel jack corrispondente, ho premuto play nel media player e… ecco il problema…
lo speaker interno.

Lo speaker interno è attivo di default, ma, a differenza di quanto accade in altri sistemi operativi, quelli delle Ultra 5 / 10 non sono utilizzati solo per riprodurre il ‘beep’, ma anche per riprodurre i suoni di sistema (può essere utile) e altri suoni(è seccante).

L’unica soluzione funzionante che ho trovato sul web (a parte le chiacchiere inutili), è la seguente:

$ audioplay -p line

Adesso devo decidere se inserire questa riga nel mio file ~/.profile, ma almeno, per adesso, posso sentire un po’ di musica senza quel rumore fastidioso.

Bye



Probably, this may works with other distributions, kernel versions and other systems, but I’m not going to do any further test.

Recently, a friend of mine asked me to install a new hard drive on his Sony Vaio laptop, because he ran out of free space on the original drive.

So after buying and installing a new 160GB drive, I began with the setup of Windows XP SP3. Anyway I left some free space for Linux.

Setting up Windows was quite easy, but setting up Linux, was a real nightmare.

I tried 4 differents x86 Ubuntu’s CDs (8.04 live, 8.10 live & alternate, 9.04 alternate). They all had the same problem: kernel hanged during startup. The strange thing about that was that by pressing a key (any key), kernel startup process moved forward of a single step, and, keypress after keypress, after 10 or more minutes, the OS was completely loaded!

I tried with OpenSuSE 11.1 live CD. There were less problems during startup, but the matter still remained the same: the OS required several keypresses to boot. After installing to disk, nothing changed.

Now, I’m not an expert, but thinking about that, I supposed there was a problem with interrupts or system clock or both, so after looking for solutions on Google, I found someone writing about the boot parameter “clocksource”.

To know clocksources available on my system, I wrote:

cat /sys/devices/system/clocksource/clocksource0/available_clocksource

on a terminal, and got:

tsc acpi_pm jiffies

Firstly I tried adding “clocksource=acpi_pm” in /boot/grub/menu.lst but, at the following boot, nothing changed.

Then I tried with “clocksource=jiffies“: that actually works!

The system boot up quite rapidly and without the need of any keypress.

Hope this article could help someone who is hitting a wall with his head trying to install Linux on this laptop.

Bye


Set 8

This is a post taken from an old unused blog of mine. Many things have changed, but this article could be useful for distributions that still use the “classical” ( /dev/sda1 or /dev/hda1 ) way to refer to mass storage devices.

Having some spare time, I decided do some jobs on Mirage.
Apart from Solaris 9 that is unused by months on the Samsung 20GB IDE drive, I decided to reinstall Debian 4.0 on the Fujitsu 18GB SCSI drive that was initially placed inside the Sun 599 box.
Version 4.0 is the last one that allow installing a working dektop environment. Version 5.0 with the “new” 2.6.26 kernel doesn’t correctly start X.org, while Debian 4.0 works flawlessly.
Just to try something new, I decided to go for XFCE as default desktop environment instead of Gnome.
Installation was perfect, but at the first reboot, the system halted on the message:

Begin: mounting root file system

Obviously, there are some problems in mouting /, /boot, /usr and other filesystems…
Pressing

[STOP]+[A]

take me to the OpenBoot prompt where using

reset-all

I restart the system, this time giving more attention to the kernel messages.
During boot, kernel finds the Samsung IDE drive, the two 9GB IBM SCSI drives inside the Sun 599, the Plextor SCSI CD drive and, finally, the Fujitsu SCSI drive.
Ok, so, if the two IBM drives are /dev/sda and /dev/sdb respectively and the Plextor CD drive is /dev/sdc, then the Fujitsu drive must be /dev/sdd.

Obviously the system hangs on the same message, as before.
Once started BusyBox, the emergency shell

mkdir temp

followed by

mount /dev/sdd1 /temp

Some warnings, but it mount the file system. With

ls /temp

I can read the files in /boot

 An immediate check to the silo.conf file shows me

root=/dev/sdc4

So, in a moment

vi /temp/silo.conf

the “wrong” parameter is modified.

At the next boot… the system hangs always on the same message.

Uhm… probably (ehm, that means, “for sure”) I mounted the file system read-only from BusyBox.
Looking at the file, I actually haven’t modified it.

At the next boot, at the SILO prompt I type

help

and SILO tells me that I can define a root device using

root=/dev/$device

So I try

linux root=/dev/sdd4

and finally boot goes on, even if it stops for another less important reason.

The next question is easy to solve. It simply try to mount /dev/sdc4 as /.

mkdir temp
mount /dev/sdd4 /temp
vi /temp/etc/fstab

Just the time of changing every reference of /dev/sdc to /dev/sdd and rebooting and…
Voilà! Everything goes right and within a minute I’m able to login in gdm.

Okay… and now there is a problem bigger than a house.
The CD-ROM drive IS NOT /dev/sdc.

And so, what?

What the Hell is “stealing” a SCSI drive designation?

… SUSPENCE …

 

The “thief” is a 128MB USB flash drive, to which the kernel assigns the designation /dev/sda.
Obiviously, removing that drive means that the system hangs on finding the root file system…
Changing silo.conf and /etc/fstab to use the original /dev/sdc  make the system bootable without the USB drive inserted, but of course with the drive inserted the system is unable to boot.

The title of this article came from a message the Debian installer wrtites at the end of the process:
“The Silo bootloader results installed. The system should now be bootable.”

[UPDATE – PROBLEM SOLVED]

After asking some friends and doing some search I’ve found many interesting things (like how useful udev can be)… that haven’t helped me figuring out how to solve this problem.
The BIG idea come from a friend’s laptop on which I recently installed OpenSUSE 11.1. This Linux distribution uniquely identify a disk using an id. To access a mass storage device, instead of using the classical

/dev/sdxn

where x is the letter used to identify the physical disk device and n is the number identifying the partition, uses

/dev/disk/by-id/scsi-SFUJITSU_MAN3184MC_JADDAJADDAJADDA-partn

where JADDAJADDAJADDA is the device serial number and n is always the partition number.
This way to identify the various devices has been introduced in kernel 2.6 and newer.

Modifying silo.conf and /etc/fstab accordingly Mirage is now bootable even with more USB devices attached.
A minor “collateral damage” is that the system disk can be designated in various different ways depending on the number of external disks connected, but until now this has caused no problems.

Bye


The missing link…

posted by Viking
Ago 31

Today I tried to do a very simple thing: install PHP 5 on a Windows Server 2003 system to use it with IIS.
There are many HOW-TOs telling how make things work together and, of course, none of them worked for me. Maybe is only because I’m out of luck today.

DISCLAIMER: I’m not responsible in any way of any damage you could cause to your system doing what I’m writing here.

Okay, now assuming IIS 6 is already up and running using the Default Web Site and that you have already installed PHP 5 with ISAPI (there must be a php5isapi.dll file in the directory you have installed PHP into, e.g. C:\PHP\), there are only two steps to perform.

  1. Open the Internet Information Services Management MMC console and add a new extention in the Web service extentions folder.
    I have called mine “PHP Hypertext Preprocessor” (yes, I lack some fantasy…) with a single required file ( C:\PHP\php5isapi.dll ).
    Check first to see if there isn’t one already (even similar but that points to the same file), maybe with different versions of the installer… you know how it works;
  2. Open the folder Web sites and select Default Web Site. Right click on it and select properties. Go to the Home Directory tab, then click on Configuration…
    Add an extension to the list by clicking Add… and then inserting the extension .php and C:\PHP\php5isapi.dll as executable.
    Always check if there isn’t one already… you know.

Now put a php file (like the classic phpinfo.php) into the directory of your site, open it with your browser and, if you can see phpinfo, then it works!


Oggi ho cercato di fare una cosa semplice: installare PHP 5 su un sistema Windows Server 2003 per utilizzarlo con IIS.
Ci sono molti HOW-TO che spiegano come fare funzionare insieme le cose e, ovviamente, nessuna procedura si è rivelata funzionante nel mio caso. Probabilmente perché sono a corto di fortuna oggi.

DISCLAIMER: Il sottoscritto non è responsabile in alcun modo di qualsivoglia danno che potete causare al vostro sistema facendo ciò che ho scritto.

Okay, dando per scontato che IIS 6 sia già avviato e funzionante utilizzando il Sito web predefinito e che abbiate installato PHP con ISAPI (dovrebbe esserci un file php5isapi.dll nella directory nella quale avete installato PHP, ad esempio C:\PHP\), ci sono solo due operazioni da eseguire.

  1. Aprite la console MMC Gestione Internet Information Services e aggiungete una nuova estensione in Estensioni servizio web.
    Io l’ho chiamata “PHP Hypertext Preprocessor” (sì, mi manca un po’ di fantasia…) con un un’unico file richiesto ( C:\PHP\php5isapi.dll ).
    Controllate prima per vedere che non ce ne sia già una (anche simile ma che punti allo stesso file), magari con versioni differenti dell’installer… sapete come funziona;
  2. Aprite la cartella Siti web e selezionate Sito web predefinito. Cliccate con il tasto destro e selezionate Proprietà. Andate alla scheda Home Directory, quindi cliccate su Configurazione…
    Aggiungete un’estensione alla lista cliccando su Add… e quindi inserite l’estensione .php e C:\PHP\php5isapi.dll come eseguibile.

Adesso mettete un file php (tipo il classico phpinfo.php) nella directory del vostro sito, apritelo con il vostro browser e, se riuscite a vedere phpinfo, allora funziona!

Bye