php on windows internals

Post on 21-Nov-2014

2.808 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Intro to develop PHP and PHP extensions on Windows. Basic steps to setup a development environment or to hunt down bugs,

TRANSCRIPT

PHP INTERNALS ON WINDOWS

Pierre Joyevortrag@mayflower2009/10/22

easier than ever

Get in touch

http://twitter.com/pierrejoye

http://www.facebook.com/pierre.joye

http://www.linkedin.com/in/pierrejoye

http://www.xing.com/profile/Pierre_Joye

pierre@php.net

Why Windows?

Portability

Customers Need

Interop

Do it yourself

INTRODUCTIONHow did we get here?

MOTIVATIONSWhy it is worth doing

Support

IRC Freenode#php-dev-win

Windows Internals listhttp://www.php.net/mailing-lists.php

http://wiki.php.net/internals/windows

STARTING OUTWhat do you need to get started

Prerequisites

Supported Platformsx86

Windows Server 2008

Windows 7

Windows Server 2003

Windows Vista

Windows XP (SP2+)

Compilersx86

Visual Studio 2010

Visual Studio 2008

Visual Studio 2005

Visual Studio 2003

Visual Studio 6

Platform SDKx86

Platform SDK 7.0

Platform SDK 6.1

Platform SDK 2003/02

Other

Works but not used in php.net releases

5.2 5.3 6.0Visual Studio 2010

Visual Studio 2008

Visual Studio 2005

Visual Studio2003

Visual Studio 6

Versions used by php.net

Works and used in php.net releases

No support

All you need is a console

Setup a default debugging environment for 32bitsetenv /x86 /xp /debug (yellow)setenv /x86 /xp /release (green)

BUILDING PHPA custom build in 10 minutes

Setup your tree

Common tree contents

• Architecture specific commands• dlls

bin

• Headers files

include

• Development libraries (.lib, known as .a on unix platforms)

lib

Get the sourcesSVN

http://www.php.net/svn.phpSnapshots

http://windows.php.net/snapshots/Releases

http://windows.php.net/releases/

Generate the configuration scripts

Add a custom extension directory (pecl, your own extensions, etc.)Buildconf --add-modules-dir=c:\path\to\pecl

Configure your build

Compiling

AUDIENCE PARTICIPATION

Can you build it?

Typical Structure of a development package

Test FCGI in the console

set REDIRECT_STATUS=1set QUERY_STRING=set PATH_TRANSLATED=C:\Inetpub\wwwroot\inf.phpset SCRIPT_FILENAME=C:\Inetpub\wwwroot\inf.phpset REQUEST_METHOD=GETset CONTENT_TYPE=set CONTENT_LENGTH=

Want to add a feature?

Define the dependenc

ies

•http://wiki.php.net/internals/windows/libs

Download the

required Zip

•http://pecl2.php.net/downloads/php-windows-builds/php-libs/VC9/x86/

Unpack

•Unzip in your deps directory

My code has no bug

Breakpoints, the easy way

THE FUTUREWhat‘s next?

QUESTIONS?Answers.

Resources

http://sourceforge.net/projects/console/

http://sliksvn.com

http://tortoisesvn.tigris.org/

http://pecl2.php.net/downloads/php-windows-builds/php-libs/binary-tools.zip

http://www.microsoft.com/express/

http://windows.php.net

http://wiki.php.net/internals/windows/

http://wiki.php.net/internals/windows/stepbystepbuild

top related