473,562 Members | 2,571 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

php-4.3.4-Win + Apache2 + XP

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\SYST EM\ 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
5 2789
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
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.goo gle.com...
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\SYST EM\ 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
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
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\syst em32
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\my sqladmin.exe

Good luck

Savut

Jul 17 '05 #5
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 "recommende d" 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\dll s" folder and open it. Copy all of the
individual DLL files to the "C:\WINDOWS\sys tem32" folder.
-Find the "C:\php" folder and open it. Copy the "php4ts.dll " file to
the "C:\WINDOWS\sys tem32" 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\c onf\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><TI TLE>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\h tdocs" 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\my sqladmin.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2190
by: Aldo Polli | last post by:
Hi, I have this error when I start apache2 with php4 Syntax error on line 233 of /mypath/apache2/conf/httpd.conf: Cannot load /mypath/apache2/modules/libphp4.so into server: dynamic linker: /mypath/apache2/bin/httpd: relocation error: symbol not found: ap_pass_brigade; referenced from: /mypath/apache2/modules/libphp4.so I compile apache...
1
2244
by: Chris Haynes | last post by:
Hello all, I am attempting to install Apache 2.0.47 and php4.3.3 on slackware8.1. I am pretty new to linux and this is something of a learning experience and so I was anticipating a few problems along the way. Now I have pretty much followed the instructions at lamps.efactory.de/e-lamps-2-0.shtml word for word, but when i try to access a...
1
2768
by: FL | last post by:
Hi, I'm tring to *test* php5 beta2 as module with Apache 2.0.48 and win2k (I know, I'm nuts :o) First, there is no php5apache2.dll in the beta2 package but a php4apache2.dll (php.net doc mention php5apache2.dll at http://www.php.net/manual/en/install.apache2.php) I usually copy php4apache2.dll and php4ts.dll in the Apache2/modules/
0
2025
by: bissatch | last post by:
Hi, I have installed Apache2. I have installed PHP4.3.0. All is working fine. I have now went and tried to install DOMXML into PHP by simply uncommenting the extension = php_domxml.dll (or something like that) in php.ini. Unfortuntely I get the following error at a part of my PHP page where I try to load a xml file:
3
4012
by: bissatch | last post by:
Hi, I have recently installed PHP4 with Apache2. Currently I am trying to install the DOMXML extension. According to what I have read, if I uncomment the extension=php_domxml.dll line in php.ini (ensuring that extension_dir is correct and that the file is definitely in that folder) and then restart apache this should install domxml in PHP....
0
1280
by: FrankL | last post by:
I had to update my server configuration consisting of Apache2 and PHP4. I now have installed: apache2/apache2-prefork 2.0.54-2.1 apache-mod_php4/php4-zlib/php4 4.3.11-0.3.1 "Regular" PHP scripts work just fine, but the websvn script is acting up - after selecting a repository the page just "hangs", i.e. the browser waits...
1
3689
by: news8080 | last post by:
I downloaded a GUI for nagios that uses PHP but when I point the browser at the PHP file, it shows me the source of .php file instead of executing it, if i use command line 'php filname.php' then I see exepected result but why can I not do that via web?? # /usr/local/bin/php -v PHP 4.4.0 (cli) (built: Jul 21 2005 11:55:49) Copyright (c)...
3
1606
by: masterx | last post by:
I developed and maintained a site for someone using Apache 1.3 and PHP 4.0.3 and used to be able to reference a page without explicitly specifying the .php extension. ie. http://www.url.com/adminpage would open adminpage.php. However since I've upgraded to Apache 2.0.55 and PHP 4.4.1 this no longer works. Is this something that can be...
1
4795
by: Randell D. | last post by:
Folks, I consider myself well versed with Apache 1.3 and PHP4 - I found drupal and wanted to try it out - I had problems getting it working with Apache2/PHP5/MySQL5 so I downgraded... Note: I did have Apache2/ PHP5 working... I confirmed this via phpinfo output... But now that I removed my original directory containing Apache/PHP, and...
0
7579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7874
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7630
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7940
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5198
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2075
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1192
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
907
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.