?
Solved

PHP4 and Apache2 and Windows XP - no success yet

Posted on 2004-11-04
4
Medium Priority
?
231 Views
Last Modified: 2010-03-04
Hi all,

I installed PHP4 and Apache 2 on my Windows XP machine, I created phptest.php file which contains
<? phpinfo(); ?>

But when I click on that WExplorer just wants to either open it or save it.

Obviously it does not process the file as PHP file.

Can you plz help?

Thanks

Vladimir
0
Comment
Question by:vladobb
  • 2
4 Comments
 
LVL 12

Expert Comment

by:minichicken
ID: 12491692
Hi

in your httpd.conf, you need to set your documentRoot directory, this is where all your PHP files should sit under.
Example:
DocumentRoot "C:/Program Files/Apache/Apache2/htdocs"

and also setup your # To use server-parsed PHP files
Example:
AddType application/x-httpd-php .php .php3 .php4 .phtml
0
 

Expert Comment

by:mogrify
ID: 12495027
If you are using php as a module rather than cgi you also need to add a line like this one:

LoadModule php4_module "c:/path/to/php/sapi/php4apache2.dll"

You can put it with the other LoadModule lines.
If you used the executable installer from php.net (instead of the zip version) then you are using CGI and can disregard my post :)
0
 
LVL 9

Accepted Solution

by:
ronan_40060 earned 750 total points
ID: 12542195
do check again pls
In order to enable PHP to run on Apache
To enable php on apache
Open your httpd.conf file and look for the following lines:
LoadModule php4_module  
libexec/libphp4.so
The above line loads the module.  Then you also need to have a line to tell it to process the .php file.  The line for this is:
AddType application/x-httpd-php .php
There should be sections for each of these lines.  
The AddType line is usually present, but commented (#) out.
You can also add more extensions that you want to process as well, like .php .php3 .php4 etc.
After adding these lines you need to restart your apache server.  
Good Luck
Ronan
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12573174
check out another good resources for PHP
http://www.sitepoint.com/subcat/php-tutorials
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month16 days, 20 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question