By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,898 Members | 1,455 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,898 IT Pros & Developers. It's quick & easy.

php-4.3.4-Win + Apache2 + XP

P: n/a
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.
Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
I noticed that Message-ID:
<3b**************************@posting.google.com > from Ad Astra
contained the following:
I am completely new to PHP and am finding installation the most
difficult part to understand and implement.

<snip tale of woe>

Wow.

I saved myself all this bother by using phpdev from
http://www.firepages.com.au/ I think you need phpdev423 then the 430
upgrade.

After that, on my win98 machine, installation was simplicity itself.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #2

P: n/a
I run a nearly identical configuration for AMP (Apache, MySQL, PHP).

Cut down on some of the confusion you are experiencing, I will email you
what you need to do.

Much easier than you might think.

"Ad Astra" <ad*****@cwnet.com> wrote in message
news:3b**************************@posting.google.c om...
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.

Jul 17 '05 #3

P: n/a
Ad Astra wrote (edited):
Can't get Apache, PHP, and MySQL working!
Please help. Thank you very much for whatever assistance you can provide.


Undo everything you did!
just kidding :)

Here's how I do it for PHP5:

1. Install, configure and test Apache from the .msi at the Apache site
(no need to copy files anywhere)

2. Unzip, install, configure, and test MySQL from the .zip at the MySQL
web site
(no need to copy files anywhere)

3. Unzip PHP from the .zip at the PHP web site
4. Edit Apache's httpd.conf adding these lines
LoadModule php5_module <PHP_DIR>/php5apache2.dll
AddType application/x-httpd-php .php
(Can't remember if this works for PHP4)
5. Copy php.ini to the directory just below the one httpd.conf is in
(This is the only file I need to copy manually)

6. Stop and Start Apache
7. Test with phpinfo()
As I don't like to have things in "Program Files" (that space gives me
the creeps) my directory structure is

C:\Utils\Apache contains php.ini
C:\Utils\Apache\conf contains httpd.conf
C:\Utils\php where I extracted php.zip
C:\Utils\mysql where I installed MySQL
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Jul 17 '05 #4

P: n/a
I had successfully install all these on XP without problem.
Here some tips:

1. Php.ini should be only at c:\windows (dont overkill you system :D)
2. All file in c:\php\dlls and also php4ts.dll should be copied to
c:\windows\system32
3. PHP is here c:\php
Mysql is at c:\mysql
Apache2 is at the default install directory (program files)
4. LoadModule php4_module c:/php/sapi/php4apache2.dll
AddType application/x-httpd-php .php
5. Check if php.ini is well configured, the most important part is
extensions_dir = "c:/php/extensions"
6. To run mysql, the best way is to run c:\mysql\bin\mysqladmin.exe

Good luck

Savut

Jul 17 '05 #5

P: n/a
Thanks to each of you for your assistance and inspiration, I succeeded
today in getting PHP up and running on my system. I am adding a few
notes to Savut's very helpful core list in case some other newbie like
me comes along who needs what for you are probably pretty obvious
steps (for some of us they are not). I've put double angle brackets
around Savut's list numbers to identify them. --Ad Astra

[This is for Apache2 + php4.3.4 + MySQL (manual installation) on
Windows XP:]
-Download the PHP program to Desktop.
-Unzip the PHP program with an unzip program [I used CuteZIP], and
have the unzip program install PHP in the "C:\" folder.
-Change the PHP download's long name [for me, it was php-4.3.4-Win] to
simply "php".
-Within the (newly named) "php" folder, find the "php.ini-dist" and
"php.ini-recommended" files and select one of them to copy and rename.
[I chose the "recommended" version, based on what I read in the PHP
online manual.]1.>> -Copy the chosen file, rename it to simply "php.ini", and move it to
the "C:\WINDOWS" folder.
[The "php.ini" file should be located only at "C:\WINDOWS".]2.>> -Find the "C:\php\dlls" folder and open it. Copy all of the
individual DLL files to the "C:\WINDOWS\system32" folder.
-Find the "C:\php" folder and open it. Copy the "php4ts.dll" file to
the "C:\WINDOWS\system32" folder.3.>> PHP is here: "C:\php".
MySQL is at "C:\mysql".
Apache2 is in the default install directory ("C:\Program Files\Apache
Group"). 4.>> Using a text editor [I used EditPad Pro] to modify the Apache2 configuration file (found in "C:\Program Files\Apache
Group\Apache2\conf\httpd.conf"), find the block of "LoadModule"
entries. At the end of the block, add the following (uncommented)
line:

LoadModule php4_module c:/php/sapi/php4apache2.dll

Find the block of "AddType" entries. At the end of the block, add the
following (uncommented) line:

AddType application/x-httpd-php .php
5.>>Make sure the "php.ini" file is well configured. [The most important part to consider is the extensions directory.] Open the
"C:\WINDOWS\php.ini" file with your text editor [I used EditPad Pro]
and search for the following:

extension_dir =

Complete the line so that it looks like this:

extension_dir = "C:/php/extensions"

-Use a text editor to create a test program entitled "first.php". For
example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>My First PHP Script</TITLE></HEAD>
<BODY><?php echo "<P>Hello, World! I'm using PHP!</P>\n";
?></BODY></HTML>
-Place this "first.php" file in the "C:\Program Files\Apache
Group\Apache2\htdocs" folder.
-Launch your browser and call up "first.php" in the URL line. [In my
case, I used "http://127.0.0.1/first.php" in the URL line (for the
localhost setup).]
-Provided each step has been done correctly and the "first.php" file
contains no typos, the output in the browser window should be the line
"Hello, World! I'm using PHP!"
6.>>To run MySQL (mysql), the best way is to run

C:\mysql\bin\mysqladmin.exe.

If you spot any errors in the above, let me know. I think it's
accurate, though.--Ad Astra
Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.