Red Antigua Logo slogan
Ads by Goooooogle
Search this site (by Google)
Menu
Home
About
Tools
Perl modules
Perl tutorials
C tutorials
Server configurations
UNIX on Windows
Misc. FreeBSD/UNIX
Redirect a web page
JavaScript
Virus list
Old stuff
Off topic

Tools    (top)
Your IP
Check a site for broken links
(W3C)

Perl modules    (top)
Tree::Numbered::Tools
(CPAN)
Perl tutorials    (top)
Perl modules
HTML::Template
CGI::Application
Mail::POP3Client
Mail::Send
MIME::Tools
Cookies with CGI::Application
Upload files with CGI::Application
Download files with CGI::Application
Redirect with CGI::Application
CPAN shell
Install DBD::mysql from the CPAN shell
Perl trim function
Validate an IP with Perl
Run suid Perl scripts under Apache
Perl taint mode
Perl date functions with Date::Calc

In Spanish
Curso de Perl

C tutorials    (top)
C - Introduction
C - Absolute beginner's Emacs
C - Examples for beginners
C - Makefile examples
C - Autotools examples
Server configurations    (top)
DNS
Apache
Apache Authentication and Access Control
mod_perl on FreeBSD
MySQL
MySQL add account
phpMyAdmin
Squid
DHCP

UNIX on Windows    (top)
Apache setup on Windows
MySQL setup on Windows
PHP setup on Windows
Perl setup on Windows
Emacs setup on Windows
UnxUtils
PuTTY
WinSCP
GIMP on Windows
MinGW - gcc on Windows
MSYS - make-in-a-shell on Windows
msysDTK - autotools on Windows
GDB for MinGW on Windows

Misc. FreeBSD/UNIX    (top)
CD and DVD creation on FreeBSD using 'k3b' on FreeBSD
'ipf' on FreeBSD
'pf' on FreeBSD
'su' on FreeBSD
Mount an ISO image under FreeBSD
Load the correct sound driver under FreeBSD without knowing what sound card you are using
Simultaneous sound channels on FreeBSD
Boot floppies for FreeBSD
Problems with old disks/controllers and the 'ata' driver
FreeBSD network stuff
DOS-to-UNIX file conversion
favicon.ico on UNIX
Emacs tips
Sendmail tips
GKrellm
Command Line Calculator
Save multimedia streams with 'mplayer'
xargs - solution to 'Argument list too long'
Process multiple images from the command line using 'ImageMagick'
Turn the system bell off under X Windows
Process each line in an input file from the command line (or in a shell script)
How to keep a program running in the background using 'nohup'
How to remove symbolic links in the current directory using 'find' and 'rm'
How to remove Emacs backup files in the current directory and all subdirectories using 'find' and 'rm'
How to execute .profile without logging in

Redirect a web page    (top)
Redirect to another web page
Apache redirect
C redirect
Perl redirect
PHP redirect
HTML redirect
JavaScript redirect

Javascript    (top)
Trim function
Login form
Register form
Popup window

Virus list    (top)
Latest viruses - Computer Virus HQ (external)
Latest 10 viruses - Sophos

Links    (top)
HTML and PHP Scripts - Html Web Template

Old stuff    (top)
POP3 server setup
About AnyMail
AnyMail downloads

Off topic    (top)
Personal links

Validated by
Valid HTML 4.01!
Valid CSS!
Powered by
apache.org
PHP setup on Windows
PHP setup on Windows
This tutorial describes how to setup PHP on Windows (tested with PHP 5.1.2 on Windows XP Professional).

Install
Download the precompiled zipped Windows binaries of PHP from http://www.php.net/downloads.php.
Create the C:\php directory and extract the downloaded .zip file into it.
Copy C:\php\php.ini-dist to C:\php\php.ini.

Configure Apache for PHP
To test PHP together with Apache, first setup Apache on Windows.
When Apache is working properly, add the following lines to Apache's httpd.conf:
# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php"
Add index.php to the DirectoryIndex option:
###DirectoryIndex index.html index.html.var
DirectoryIndex index.html index.html.var index.php
Restart Apache, and be sure there are no error message in the error log file.
Then create a test .php script, let's say phpinfo.php, in the Apache Document Root (C:\Program Files\Apache Group\Apache2\htdocs by default on Windows):
<?php
phpinfo();
?>
Try to access http://localhost/phpinfo.php.
You should see a lot of info about PHP.

Configure PHP for MySQL (optional)
If you plan to use PHP together with MySQL, then first setup MySQL on Windows.
In PHP version 5, the MySQL extension is no longer enabled by default, so you have to do this manually in php.ini (I couldn't get it to work with the default extension_dir = "./"):
; Directory in which the loadable extensions (modules) reside.
;;;extension_dir = "./"
extension_dir = "C:\php\ext"
To enable an extension, look for the Windows Extensions section in php.ini and just uncomment the extension(s) you want to enable (all extensions are disabled by default).
MySQL requires the php_mysql.dll to be enabled, and if MySQL is configured for UTF-8 instead of the default MySQL charset, Latin1, the MultiByte String extension, php_mbstring.dll has to be enabled as well.

MySQL support:
extension=php_mysql.dll
If you use the UTF-8 instead of the Latin1 charset:
extension=php_mbstring.dll

Configure phpMyAdmin (optional)
Read the phpMyAdmin configuration tutorial.
Last modified: Fri Aug 24 14:12:23 Romance Daylight Time 2007