After WAMP is configured, enter the default PHP file name in the browser to download this document.

Source: Internet
Author: User
After WAMP is configured, enter the default PHP file name in the browser and download this document directly. php wmap apache

Apache is running. the main problems are:
Create a new index. php file.

Phpinfo ();
?>

Enter http: // localhost or http: // localhost/index. php in the browser.

Download the document directly if you enter anything,
I use a google browser, and I have tried IE.


Reply to discussion (solution)

To configure the default apache root directory

Open the httpd. conf file
Find documentroot
Write the path to the end of directory.

I don't know how to configure wamp.
However, the default path of apache should be like this

I am not very detailed. you can search for the apache configuration method or tutorial.
The description is more detailed.

Apache php extension not enabled

Http: // is the displayed it works?
No, it should not be properly configured.
Wamp is an integrated server. it can be used after it is installed. you do not need to enable it, and the download will not occur unless you have installed
Apache2 httpd. conf should not be changed,
ServerRoot "d:/wamp/bin/apache/apache2.2.22" this is my wamp. it has not been changed
You can consider reinstalling.

Create test. php
Phpinfo ();
?>
Save it in. then check http: // localhost/test. php.

To configure the default apache root directory

Open the httpd. conf file
Find documentroot
Write the path to the end of directory.

I don't know how to configure wamp.
However, the default path of apache should be like this

I am not very detailed. you can search for the apache configuration method or tutorial.
The description is more detailed.

Thank you. I have configured all the settings based on apache + php on the Internet.

Apache php extension not enabled
How can I enable it ??

Http: // is the displayed it works?
No, it should not be properly configured.
Wamp is an integrated server. it can be used after it is installed. you do not need to enable it, and the download will not occur unless you have installed
Apache2 httpd. conf should not be changed,
ServerRoot "d:/wamp/bin/apache/apache2.2.22" this is my wamp. it has not been changed
You can consider reinstalling.
Apache is displaying it's work! But the php file is downloaded directly.

Then you should put the php file you want to open in the host path and enter localhost/XXX. php in the browser address bar to start your php code.

You cannot drag the php file directly to the browser ....

I don't know if you are doing this, but if you do, the PHP file will be downloaded.


Apache php extension not enabled
How can I enable it ??
Check that there is no LoadModule php5_module in apache configuration. "E:/wamp/bin/php/php5.3.13/php5apache2_2.dll" is changed to your own path.
AddType application/x-httpd-php. php
And this section

Then you should put the php file you want to open in the host path and enter localhost/XXX. php in the browser address bar to start your php code.

You cannot drag the php file directly to the browser ....

I don't know if you are doing this, but if you do, the PHP file will be downloaded.
I entered localhost/XXX. php in the browser address bar.



Apache php extension not enabled
How can I enable it ??
Check that there is no LoadModule php5_module in apache configuration. "E:/wamp/bin/php/php5.3.13/php5apache2_2.dll" is changed to your own path.
AddType application/x-httpd-php. php
And this section
I have changed the path.
Changed to this:
# LoadModule php5_module "F:/Program Files/Apache Software Foundation/php/php5apache2_2.dll"
# PHPIniDir "F:/Program Files/Apache Software Foundation/php"
# AddType application/x-httpd-php. php. html. htm

# LoadModule php5_module "F:/Program Files/Apache Software Foundation/php/php5apache2_2.dll"
# PHPIniDir "F:/Program Files/Apache Software Foundation/php"
# AddType application/x-httpd-php. php. html. htm

This is a comment. Remove the previous # OK

Wamp is integrated and generally does not need to be configured. Where did you put the new file? Is it in the root directory?




Apache php extension not enabled
How can I enable it ??
Check that there is no LoadModule php5_module in apache configuration. "E:/wamp/bin/php/php5.3.13/php5apache2_2.dll" is changed to your own path.
AddType application/x-httpd-php. php
And this section
I have changed the path.
Changed to this:
# LoadModule php5_module "F:/Program Files/Apache Software Foundation/php/php5apache2_2.dll"
# PHPIniDir "F:/Program Files/Apache Software Foundation/php"
# AddType application/x-httpd-php. php. html. htm

# LoadModule php5_module "F:/Program Files/Apache Software Foundation/php/php5apache2_2.dll"
Remove the red font #, # indicates the comment, that is, it does not take effect. Wamp is OK by default. have you manually modified the configuration?

# LoadModule php5_module "F:/Program Files/Apache Software Foundation/php/php5apache2_2.dll"
# PHPIniDir "F:/Program Files/Apache Software Foundation/php"
# AddType application/x-httpd-php. php. html. htm

This is a comment. Remove the previous # OK
After I delete the #, the apache2.2 server cannot be started... What should I do !!

Check that there is no LoadModule php5_module in apache configuration. "E:/wamp/bin/php/php5.3.13/php5apache2_2.dll" is changed to your own path.
AddType application/x-httpd-php. php
And this section
I have changed the path.
Changed to this:
# LoadModule php5_module "F:/Program Files/Apache Software Foundation/php/php5apache2_2.dll"
# PHPIniDir "F:/Program Files/Apache Software Foundation/php"
# AddType application/x-httpd-php. php. html. htm

# LoadModule php5_module "F:/Program Files/Apache Software Foundation/php/php5apache2_2.dll"
Remove the red font #, # indicates the comment, that is, it does not take effect. Wamp is OK by default. have you manually modified the configuration?
After I changed it, the server cannot be started. how can I change it?


Check that there is no LoadModule php5_module in apache configuration. "E:/wamp/bin/php/php5.3.13/php5apache2_2.dll" is changed to your own path.
AddType application/x-httpd-php. php
And this section
I have changed the path.
Changed to this:
# LoadModule php5_module "F:/Program Files/Apache Software Foundation/php/php5apache2_2.dll"
# PHPIniDir "F:/Program Files/Apache Software Foundation/php"
# AddType application/x-httpd-php. php. html. htm

# LoadModule php5_module "F:/Program Files/Apache Software Foundation/php/php5apache2_2.dll"
Remove the red font #, # indicates the comment, that is, it does not take effect. Wamp is OK by default. have you manually modified the configuration?
After I changed it, the server cannot be started. how can I change it?
Wamp is unfamiliar, but why is your php path inconsistent with your wamp? Have you installed php separately?

View apache error logs.
Error/error. log

View apache error logs.
Error/error. log

No error. log file

The error message is logs/error. log.

The error message is logs/error. log.
F:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon. ico
What is the last file? Set the directory path to only htdocs.

How nice it is to directly send all the content of your apache configuration file, saving everyone's guesses.

How nice it is to directly send all the content of your apache configuration file, saving everyone's guesses.
An error occurred when I inserted the following two paragraphs.
LoadModule php5_module "F:/Program Files/PHP/php5apache2_2.dll"
PHPIniDir "F:/Program Files/PHP"

Error log description:
[Fri Jul 26 23:08:41 2013] [warn] pid file F:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd. pid overwritten -- Unclean shutdown of previous Apache run?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.