The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Installing PHP with Apache 2.2 under Windows
Dr Z
post Mar 8 2007, 10:51 PM
Post #1


Advanced Member
****

Group: Members
Posts: 221
Joined: 23-August 06
Member No.: 11



I have Apache 2.2 running under Windows in my new (well, relatively) laptop. Now, I am in the process of installing PHP 5, as an Apache module. for same reason: Off-line testing.
  • I have installed all relevant files in a sub-directory name PHP5 in the root directory (C:).
  • I copied all the pertinent PHP .dll files to the root directory of Apache 2.2, including the file 'php5apache2.dll'
  • I renamed 'php.ini-recommended' to 'php.in'i, and, in this file, I set the 'doc_root = C:\Program Files\Apache Software Foundation/Apache2.2/htdocs'
When I un-comment the line "LoadModule php_5module php5apache2.dll" in 'httpd.conf file', I get an error message saying that the file 'php5apache2.dll' can not be found.

The most puzzling part is this:
I had installed Apache 2, PHP 5, MySQL, and even Pearl, in my PC about 2+ years ago (with some help from the old timers of this board, at times) and tested them. Now I am looking at both computers side by side and comparing the files in each directory. config files, etc.), and I cannot find a difference. I even run a "configuration test" of the Apache 'httpd.conf file' in my PC, as a sanity check, and did not encounter any error messages.
The only difference is my PC has Apache 2 installed and the laptop has Apache 2.2.

I would appreciate any comments and/or pointers as to what I am doing wrong.....

This post has been edited by Dr Z: Mar 8 2007, 10:53 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Dr Z
post Mar 13 2007, 06:49 PM
Post #2


Advanced Member
****

Group: Members
Posts: 221
Joined: 23-August 06
Member No.: 11



I found the cause! If anybody is using, or intend to use vhosts, the following story may be of interest:

I started with the question "Why 404?", and did some nosing around and found the cause. I was barking at the wrong tree! The cause is not PHP, but it is actually due to Apache and vhosts.

Let me explain:
I use vhosts for each site and do not use the main htdocs directory of Apache.
I had put the test.php file in the main htdocs directory, and was trying to call it up by httpd://localhost/test.php, Then getting the "404 Not Found" message.

But now comes the surprise:
I made sure that there was no index file in the main htdocs directory, and called up httpd://localhost.
Instead of getting the directory listing, I got the index page of the first registered vhost (in the order the vhosts were entered in to the httpd.conf file.)

I moved the test.php file to one of the vhosts, and everything is fine.

Solved one problem, uncovered another! And, I have no explanation to offer......
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 17th September 2019 - 09:17 AM