After configuring Wamp, the browser enters the default php file name to download the document directly

Source: Internet
Author: User
Tags apache error log apache php phpinfo
PHP WMAP Apache

Apache is already running, the main problems are:
I'm creating a new index.php file.

Phpinfo ();
?>

Then enter http://localhost or http://localhost/index.php in the browser

Enter everything and download the document directly,
I use the browser is Google Browser, I have tried IE is like this


Reply to discussion (solution)

To configure the default root directory for Apache

Open httpd.conf File
Find DocumentRoot
Then write the path behind the directory (path)

I'm not sure how wamp to match me.
But Apache's default path should match

I'm not talking very much about it. You can search the Apache configuration method or tutorial
That's more detailed.

Apache PHP extension does not open

Http://localhost is the display of it works?
No, it's not supposed to match.
Wamp is an integrated server, ready to use, without opening anything, no download problems, unless you install the
There should be no change in apache2 httpd.conf,
ServerRoot "d:/wamp/bin/apache/apache2.2.22" This is my wamp. Not changed.
may consider reloading.

Create a new test.php
Phpinfo ();
?>
Save it in there. and look at http://localhost/test.php.

To configure the default root directory for Apache

Open httpd.conf File
Find DocumentRoot
Then write the path behind the directory (path)

I'm not sure how wamp to match me.
But Apache's default path should match

I'm not talking very much about it. You can search the Apache configuration method or tutorial
That's more detailed.

Thank you, I've been configuring the apache+php on the Internet.

Apache PHP extension does not open
How to open ah??

Http://localhost is the display of it works?
No, it's not supposed to match.
Wamp is an integrated server, ready to use, without opening anything, no download problems, unless you install the
There should be no change in apache2 httpd.conf,
ServerRoot "d:/wamp/bin/apache/apache2.2.22" This is my wamp. Not changed.
may consider reloading.
Apache is showing it's work! , but you can download it directly using the PHP file.

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

Can not directly drag the php file into the browser ....

I don't know if you're doing this, but if you do, it's going to happen. Download PHP file


Apache PHP extension does not open
How to open ah??
Look Apache configuration has this paragraph did not LoadModule Php5_module "E:/wamp/bin/php/php5.3.13/php5apache2_2.dll" changed to their own path
AddType application/x-httpd-php. php
And this part.

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

Can not directly drag the php file into the browser ....

I don't know if you're doing this, but if you do, it's going to happen. Download PHP file
I did this by typing localhost/xxx.php in the browser's address bar.



Apache PHP extension does not open
How to open ah??
Look Apache configuration has this paragraph did not LoadModule Php5_module "E:/wamp/bin/php/php5.3.13/php5apache2_2.dll" changed to their own path
AddType application/x-httpd-php. php
And this part.
I've changed, it's my own path.
Change 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. Get rid of the front #, okay?

Wamp are all in one outfit, generally do not need how to configure. Where did you put the new file? Did you put it in the root directory?




Apache PHP extension does not open
How to open ah??
Look Apache configuration has this paragraph did not LoadModule Php5_module "E:/wamp/bin/php/php5.3.13/php5apache2_2.dll" changed to their own path
AddType application/x-httpd-php. php
And this part.
I've changed, it's my own path.
Change 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"
The # of the red font is removed, #表示注释, which will not take effect. Wamp default OK, have you ever manually modified the configuration it?

#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. Get rid of the front #, okay?
After I delete the #, the apache2.2 server won't start ... What to do!!

look Apache configuration has this paragraph did not LoadModule Php5_module "E:/wamp/bin/php/php5.3.13/php5apache2_2.dll" to change to their own path
AddType application/x-httpd-php. PHP
and this section of
I have changed, it's my own 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 Soft Ware foundation/php/php5apache2_2.dll "
Red font # is removed, #表示注释, that is, will not take effect. Wamp default OK, have you ever manually modified the configuration it?
I changed, the server can not boot, how to change it


Look Apache configuration has this paragraph did not LoadModule Php5_module "E:/wamp/bin/php/php5.3.13/php5apache2_2.dll" changed to their own path
AddType application/x-httpd-php. php
And this part.
I've changed, it's my own path.
Change 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"
The # of the red font is removed, #表示注释, which will not take effect. Wamp default OK, have you ever manually modified the configuration it?
After I changed, the server can not start, how to change it
Wamp unfamiliar, but why your PHP path is not consistent with your wamp? Have you installed PHP alone?

Look at the Apache error log, specifically what the error message is.
Error/error.log

Look at the Apache error log, specifically what the error message is.
Error/error.log

No Error.log this file

Wrong, it's logs/error.log.

Wrong, it's logs/error.log.
F:/program Files/apache Software Foundation/apache2.2/htdocs/favicon.ico
What's the last file? Set that directory path to Htdocs only.

It's good to have all the content of your Apache configuration file directly, and save everyone's guessing.

It's good to have all the content of your Apache configuration file directly, and save everyone's guessing.
I made a mistake when I inserted the following two paragraphs.
LoadModule php5_module "F:/program files/php/php5apache2_2.dll"
Phpinidir "F:/program files/php"

The error log says:
[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 PR Evious Apache run?

  • Related Article

    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.