How can I test if PHP + apache is successfully installed?
Source: Internet
Author: User
How can I test if PHP + apache is successfully installed? I use apache2.2, php & nbsp; 5.3.1, and I follow the steps & nbsp; to configure 1. under & nbsp; apache & nbsp; conf & nbsp; httpd. conf & nbsp; This file contains the & nbsp; lines of code PHP + apache installed successfully. how can this problem be solved?
I used apache2.2 and php 5.3.1. I configured this according to the steps below.
1. add these lines of code to the httpd. conf file under apache conf.
# LoadModule vhost_alias_module modules/mod_vhost_alias.so
# ------ Add start
# Load apache into the PHP processing module
LoadModule php5_module C:/myseverce/php-5.3.1/php5apache2_2.dll
# Note that php5apache2_2.dll is not php5apache2. dll.
PHPIniDir "C:/myseverce/php-5.3.1"
# PHPIniDir PHP Installation Path
AddType application/x-httpd-php. php. phtml
# --- End of adding
2. set
Php. ini-development file renamed php. ini
3. add a piece of code to the php. ini file.
; Directory in which the loadable extensions (modules) reside.
Http://php.net/extension-dir
; Extension_dir = "./"
; On windows:
; Add
Here we need to specify the PHP extension path
Extension_dir = "C:/myseverce/php-5.3.1/ext"
; End adding here
; Whether or not to enable the dl () function. The dl () function does NOT work
5. I will test
A file test. php is written under apache htdocs.
This line of code
No problem with apache restart
The result of browsing http: // localhost/test. php is the line of code I wrote.
Is the configuration not successful?
Thank you!
------ Solution --------------------
// What is the situation?
------ Solution --------------------
PHP is not configured properly.
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