Forget about compiling, use binaries instead. Cygwin is only necessary for
Unix-application for which no Win32 Port exists (e.g. postgresql), but
apache and php can run in native mode on win32.  Instead of including all
this --with-  options in your compilation, just enable the desired
extensions in your php.ini.  I think compilation is only necessary if you
have some very special needs, that are not included in the normal Win32
binaries.

The following worked for my system (Win2000 and Apache3.1.22):

 1) Download Windows binaries php-4.1.2-installer.exe and
php-4.1.2-Win32.zip
 from www.php.net

 2) Don't try to install php from the zip but use the exe to install php
 without extensions as cgi-executable. This will put all standard dlls to
the right place and
 do some registry entries.

 3) Unpack the zip and copy the extensions folder to your php install
 directory (e.g. c:\webserver\php)
     There a precompiled php_gd.dll is contained with support for jpeg,
png,
 freetype2, ttf

 4) Edit php.ini which resides in %Windir%
 Locate the paths and directories section and make entries similar to
below:
     ;;;;;;;;;;;;;;;;;;;;;;;;;
     ; Paths and Directories ;
     ;;;;;;;;;;;;;;;;;;;;;;;;;
     include_path=; UNIX: "/path1:/path2"  Windows: "\path1;\path2"
     doc_root=; the root of the php pages, used only if nonempty
     user_dir=; the directory under which php opens the script using
/~username
     ; directory in which the loadable extensions (modules) reside
     extension_dir=c:\webserver\php\EXTENSIONS
     extension=php_gd.dll
     extension=php_zlib.dll
     enable_dl=On

 I am not sure about dependencies, but it may be that for png support zlib
is
 necessary (at least when compiling it in unix), so it may be good to
enable
 php_zlib.dll too.

 5) Configurate and restart your webserver
 eg. for apache in httpd.conf:

     # Path to PHP.EXE directory -- change ScriptAlias to suit your config.

     # Attention: Paths are unix style with slash not backslash, even on
     # Windows-PCs
     ScriptAlias /php4/ "c:/webserver/php"
     Action application/x-httpd-php4 "/php4/php.exe"
     AddType application/x-httpd-php4 .php
     AddType application/x-httpd-php4 .php3
     DirectoryIndex index.html default.htm index.php index.php3

 6) Check installation by a script containing
     <?php phpinfo(); ?>
     The output should contain a section:
       gd
       GD Support enabled
       GD Version 1.6.2 or higher
       FreeType Support enabled
       FreeType Linkage with TTF library
       JPG Support enabled
       PNG Support enabled
       WBMP Support enabled


 I hope this helps.

 Jürgen Schoch


Think A Bit wrote:

> Hi there, i'm new to this list.
>
> I tried to compile php 4.1.2 on a win2k machine with visual c++ and
> finally succeeded (except those 38 warnings ...)
>
> But: where do i put those --with stuff like --with-t1lib or even
> --with-gd
>
> I have cygwin running, but don't quite know what it does that can't be
> done through win2k as well?
>
> Trying to start this configure thing i got this:
>
> $ ./configure
> creating cache ./config.cache
> checking for a BSD compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking whether make sets ${MAKE}... make: not found
> no
> checking for working aclocal... missing
> checking for working autoconf... missing
> checking for working automake... missing
> checking for working autoheader... missing
> checking for working makeinfo... missing
> Updated php_version.h
> checking whether to enable maintainer-specific portions of Makefiles...
> no
> checking host system type... i686-pc-cygwin
> checking for gawk... gawk
> checking for bison... bison -y
> checking bison version... 1.27 (ok)
> checking for gcc... no
> checking for cc... no
> configure: error: no acceptable cc found in $PATH
>
> (and, yes, i have added c:\cygwin to the path-variable in the
> system-tray and even restarted...)
>
> furthermore: there's the distribution version of php 4.1.1, but no
> source for that, and there's just the source for 4.1.2 - can i simply
> put the new compiled php.exe and php4ts.dll where the old ones were?
>
> Thanx for your help,
>
> Best regards,
>
> oliver


-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to