php-4.3.4-Win + Apache2 + XP

From: Ad Astra (adastra_at_cwnet.com)
Date: 03/04/04


Date: 3 Mar 2004 20:11:17 -0800

I am completely new to PHP and am finding installation the most
difficult part to understand and implement. Could someone please
review the rather long missive below and assist me? I have provided
it in as clear a fashion as possible.

COMPONENTS

* Windows XP (Home) [Version 2002/Service Pack 1 installed]
* Apache2 server [Version 2.0.48] (successfully installed; located as
shown in the tree below)
* php-4.3.4-Win (unzipped; located as shown in the tree below)
* mySQL 4.0.17 (unzipped; located as shown in the tree below)

FACTS

I am doing a manual(server module, not CGI) install of PHP. I intend
to undertake the installation of mySQL after PHP is successfully
installed.

I have put DLLs in various places (overkill, I know) so that they "can
be found," a requirement spoken of in the PHP install.txt file. [The
thing that will be doing the finding has not been identified in the
PHP install.txt file. Is it the Apache2 server? the PHP program?
both? something else?] I would like to have the DLLs only where they
need to be, and to be able to remove them from the places they don't
need to be.

The key DLLs and EXE mentioned in the PHP install.txt file are:
php4ts.dll
php4apache.dll
php.exe

On my system,
RUN: %SYSTEMROOT%
yields
C:\WINDOWS

I have relabeled
php.ini-dist
as
php.ini
and copied it to various locations (see the tree below).
 
When I did the Apache2 install,
the installation program itself placed Apache2 in the
C:\Program Files\Apache Group directory,
a directory it created as part of the installation
and which appears at the same level as my
C:\WINDOWS (system root) directory.

My preference is to have all three programs--the Apache2 server, PHP,
and mySQL--conveniently accessible via my Program Files directory,
from where I launch numerous other programs as well.

Regarding the type of installation I am doing (in Windows XP), Julie
Meloni, in her new book PHP ESSENTIALS (Second Edition), instructs as
follows:
     "1. In the PHP installation directory, find the php.ini-dist file
and rename it php.ini."
[I did this.]
     "2. Move the php.ini file to C:\WINDOWS\ or wherever you usually
put your *.ini files."
[Actually, I don't "usually put my *.ini files"--this is the first
time ever. So I winged it and first put the php.ini file in
C:\WINDOWS\ as an obvious first choice; and then, later (after the
installation did not succeed), I copied it to various other locations,
as mentioned above and shown in the tree below.]
     "3. Move the php4ts.dll file to C:\WINDOWS\SYSTEM\ or wherever
you usually put your *.dll files."
[In my system, under C:\WINDOWS\ are two similarly named folders,
system\
and
system32\.
Taking no chances, I copied the php.ini file to both places. Later, I
placed it in the other locations shown, as well, knowing this was
probably neither necessary nor well conceived.]

Concurrently, I referred to the information in the PHP install.txt
file, which confirmed Julie Meloni's Step 1.

The choice of directory for Step 2, based on the PHP install.txt file,
was concluded to be C:\WINDOWS\ (the equivalent of %SYSTEMROOT%, based
on the RUN test I performed, as noted above). The information in the
PHP install.txt file tells me that the %SYSTEMROOT% directory
(C:\WINDOWS\, according to my test) is "typically: c:\winnt or
c:\winnt40 for NT/2000/XP servers". This appears not to be true for
XP; I have concluded this after spending some time looking for the
winnt and winnt40 directories without success.

In the Apache2 configuration file
I did the careful inclusion of the uncommented line

LoadModule php4_module c:/php-4.3.4-Win/sapi/php4apache2.dll

at the very end of the section that starts

# Example:
# LoadModule foo_module modules/mod_foo.so
#

and lists numerous LoadModule items.

In the Apache2 configuration file
I also did the careful inclusion of the uncommented lines

AddType application/x-httpd-php .php
AddType application/x-httpd-php .html

at the very end of the section that starts

# AddType allows you to add or override the MIME configuration
# file mime.types for specific file types.

I saved the file and closed it.
I started Apache.
I stopped Apache.
I checked the error_log and did NOT find a line like this:

{Tue Mar 2 10:00:00 2004] [notice] Apache/2.0.48 (Win32) PHP/4.3.4
configured

Per Julie Meloni's book, such a message would tell me that "PHP is
happily cohabiting with Apache" (i.e., is successfully installed).

Because I did not see that kind of message, I am assuming that PHP is
not "happily cohabiting with Apache," that it is not installed, and
that I do not have the correct path(s) delineated.

QUESTIONS
 
Here are my questions:
(1) Is it true that the problem is a path problem?
(2) If so, what would the correct path(s) be?
(3) Where do the above-noted DLL files, the EXE file, and the INI file
need to be located to fulfill all of the stated requirements? These
requirements include: (a) that these files be findable by the programs
that require them, and (b) that these files be located within my
Program Files directory so that I myself can find them and easily
launch them.
(4) Is it necessary to have the DLL and EXE and INI files exist
redundantly in any of the locations indicated? If so, which and
where?
(5) Are there serious potential problems with such redundancies? If
so, could you please tell me which instances of these copied files I
should definitely remove?

SYSTEM TREE (as relevant to current installation)

* Desktop
* * My Computer
* * * C:
* * * * mysql [etc. files and folders]
* * * * php-4.3.4-Win32
            -php4apache2.dll
            -php4apache.dll
            -php4ts.dll
            -php.exe
            -php.ini
            -[etc. files]
* * * * * cli
               -php.exe
* * * * * [etc. folders]
* * * * * sapi
               -php4apache2.dll
               -php4apache.dll
               -php4ts.dll
               -php.exe
               -php.ini
               -[etc.files]
* * * * Program Files
* * * * * Apache Group
* * * * * * Apache2
* * * * * * * conf [etc. folders]
* * * * * * * - httpd.conf [etc. files]
* * * * WINDOWS
* * * * * system
               -php4apache2.dll
               -php4apache.dll
               -php4ts.dll
               -php.exe
               -php.ini
* * * * * system32
               -php4apache2.dll
               -php4apache.dll
               -php4ts.dll
               -php.exe
               -php.ini

Thank you very much for whatever assistance you can provide.



Relevant Pages

  • Re: php-4.3.4-Win + Apache2 + XP
    ... I run a nearly identical configuration for AMP (Apache, MySQL, PHP). ... > to undertake the installation of mySQL after PHP is successfully ... Is it the Apache2 server? ...
    (alt.php)
  • Re: php-4.3.4-Win + Apache2 + XP
    ... I run a nearly identical configuration for AMP (Apache, MySQL, PHP). ... > to undertake the installation of mySQL after PHP is successfully ... Is it the Apache2 server? ...
    (comp.lang.php)
  • php-4.3.4-Win + Apache2 + XP
    ... I am completely new to PHP and am finding installation the most ... I am doing a manualinstall of PHP. ... I have put DLLs in various places so that they "can ... Is it the Apache2 server? ...
    (alt.php)
  • Re: Problems with a new install
    ... I can get pages to be served by the installation, but what I'd also like to do is get PHPMyAdmin working. ... When I try to login to the PMA using a user/pass defined in the MySQL database, I get no error messages, but it just reloads the login page. ... When I try to run through the various buttons for the setup utility, it creates a zero-byte config.inc.php file in the config folder, and never shows anything more than the buttons on the page. ... I've given the IUSR_machinename account privileges to all the PHP folders, as well as the temp folder. ...
    (comp.lang.php)
  • Re: [PHP] Is the GD module standard?
    ... I have been using the imagepng() function in my local testing ... I hadn't done any customization to my PHP set ... I went with the default set of installation options that Ubuntu ... Recently, I uploaded my site to a web hosting server, and the CAPTCHA ...
    (php.general)