At present, PHP5 releases the third candidate version, and it is estimated that official version will soon release it. The installation process should not change, the following article content will tell the configuration of the PHP environment under Windows2000 / XP / 2003 (not recommended to establish a PHP environment under Windows 98), the server selection Apache
2.0.49
Database Select the mysql version 4.0.20 version. Need to download a few packages:
PHP5 RC3 2. Apache
2.0.49
3. MySQL 4.0.20 Download Package 1. The download address of PHP5 RC3 PHP is: http://www.php.net/downloads.php, find two packages in the download box. Among them, PHP 5.0.0RC3 Zip packages are PHP5 software packages, and Collection of PECL MODULES for PHP 5.0.0RC3 is a PHP5 PECL extension module set package. After the download is complete, put it on the C disk.
PHP5 RC3 2. Apache
2.0.49
3. MySQL 4.0.20 Download Package 1. PHP5 RC3
PHP
The download address is:
http://www.php.net/downloads.php
, Find the two packages in the following image, download two packages in the box. Among them, PHP 5.0.0RC3 Zip packages are PHP5 software packages, and Collection of PECL MODULES for PHP 5.0.0RC3 is a PHP5 PECL extension module set package.
After downloading, put it on
C
Disc forced to use.
2. Apache
2.0.49
Apache official download address is: http://httpd.apache.org/download.cgi, find the following image, download for Windows MSI installation package, saved in the C disk.
Apache
The official download address is:
http://httpd.apache.org/download.cgi
, Find the following picture location, download
For Windows
of
MSI
Install the package, save
C
Disc forced to use.
3. MySQL
4.0.20
MySQL official download address is: http://dev.mysql.com/downloads/mysql/4.0.html, find the Windows Downloads section, download the WITHOUT Installer package and save it in the C drive, as shown below:
Installing PHP5 assumes that your system is installed in a C drive, otherwise the following directory must be changed to the directory of the corresponding disk. PHP5 RC3 (PHP-) will be downloaded
5.0.0
RC3-WIN32.ZIP) Unzip to C: / PHP5 / Directory. Unzip all files in the PECL extension module package to the C: / PHP5 / EXT / Directory. Copy the php5ts.dll file under the C: / PHP5 / directory to C: / Windows / (if it is a Windows 2000 operating system, it is a C: / WinNT / Directory, the same, no repeated instructions). Copy the following DLL files in the C: / PHP5 / directory in C: / Windows / System32 / Directory:
Fdftk.dllfribidi.dllgds32.dllibeay32.dllibintl-1.dllibmhash.dllibmysql.dllibmysqli.dllnTwdblibmysqli.dllnTwdblib.dllNTwdblib.dllyaz.dll
Where libMysql.dll is extended by MYSQL 4.1, libmysqli.dll is the extension support for the version of MySQL 4.1. Because I downloaded mySQL4.0.20 above.
Therefore, it can be replicated to replicate libmysql.dll. Copy the php.ini-dist file in the C: / PHP5 / directory to the C: / Windows / Directory, and renamed PHP.INI, and open the editor with Notepad: Nearly two lines:
Directory in which the loadable extensions (modules) reside.extension_dir = "./"
Modify the following line points to the C: / PHP5 / EXT / directory, then modified as follows:
Directory in which the loadable extensions (modules) Reside.extension_dir = "c: / php5 / ext /"
Located to the following two lines:
Windows Extensions; Note That ODBC Support is Built IN, SO No DLL IS NEEDEDIT.
It can be seen that all of the following supporting extensions are listed below, we can remove the previous semicolons to support PHP support the corresponding extension. I tested it, support the following extensions, or you can configure it according to the selection.
extension = php_bz2.dllextension = php_cpdf.dllextension = php_curl.dllextension = php_dba.dll; extension = php_dbase.dllextension = php_dbx.dll; extension = php_exif.dllextension = php_fdf.dllextension = php_filepro.dllextension = php_gd2.dllextension = php_gettext.dll; extension = php_iconv.dll; extension = php_ifx.dllextension = php_iisfunc.dllextension = php_imap.dll; extension = php_interbase.dllextension = php_ldap.dllextension = php_mbstring.dll; extension = php_mcrypt.dllextension = php_mhash.dllextension = php_mime_magic.dllextension = php_ming. dll; extension = php_mssql.dll; extension = php_msql.dllextension = php_mysql.dll; extension = php_oci8.dllextension = php_openssl.dll; extension = php_oracle.dllextension = php_pdf.dll; extension = php_pgsql.dllextension = php_shmop.dllextension = php_snmp. dllextension = php_sockets.dll; extension = php_sybase_ct.dllextension = php_tidy.dll; extension = php_w32api.dllextension = php_xmlrpc.dllextension = php_xsl.dll; extension = php_yaz.dllextension = php_zip.dll save the file and exit.
Install Apache
2.0.49
Ready to download Apache_2.x.x-win32-x86-no_ssl.msi. Start the installation after double-click. One step next, agree to the license agreement, there will be a page that fills in the server information, local debugging, two input localhost. as follows:
All the way next, install the default path - Of course, you can also choose the path you need. Apache will automatically install and launch relevant services. And run an Apache monitor in the lower right corner of the task bar:
We can restart, stop, start Apache service from this monitor. Double-click the small icon to open the control interface:
Next, the Apache's configuration file is configured, and the C: / Program files / apache group / apache2 / conf / Apache group / apache2 / conf / (I am using the default installation path), and the back settings will be changed according to their own installation path) The httpd.conf file under the directory is positioned below:
DirectoryIndex index.html index.html.var
Add a PHP default page later, usually index.php, as follows:
DirectoryIndex index.html index.html.var index.php
To make APACHE identify PHP-related extensions, search and locate this section:
Add the following two lines later:
AddType Application / X-httpd-php .php .phtml .php3 .php4 addtype application / x-httpd-php-source .phps
Specify the PHP module and locate it to the following line:
#LoadModule SSL_Module Modules / Mod_ssl.so
Add a line below:
LoadModule PHP4_MODULE C: /PHP5/php5apache2.dll
Let it point to the php5apache2.dll file under the PHP5 directory, the path must be accurate. In order to specify Apache recognition Chinese, we specify that GB2312 is the default code. Should be found and positioned below this line
AddDefaultCharset ISO-8859-1
Modify it to:
AdddefaultCharset GB2312
Also, if you want to ban directory browsing, find and locate it below:
Remove a few lines of INDEXES that follows the row below, modify:
OK, save the httpd.conf file and follow the Apache server. Install mysql
4.0.20
Compress MySQL-4.0.20-WIN-NOINSTALL.ZIP folder to the root directory of the C drive (note: Use this version of Mysql must put the decompression file folder in the root directory of the C drive), can decompress it can be in C Find a folder called MySQL-XXX under the root directory. The name is named mysql. Enter the bin directory, find the winmysqladmin.exe file, open it. The first run will prompt to enter a new username and password. Here you can choose the username and password input you need, as the default user name and password of My.ini. As shown below:
After clicking OK, WinMysqladmin will narrow down to the taskbar of the lower right corner:
Let's take a look at whether the mysql service is started. Open "Control Panel" and open "Management Tool" and open "Service". If everything goes well, we will see information that mysql has started, as shown below:
It is very simple to go here. Test whether PHP is configured successfully: Open Notepad, enter the following line code:
php phpinfo ();?>>
Saved as a phpinfo.php file, stored in the apache2 / htdocs / directory, remember to save the type "All Files", as shown below:
Ok, open your browser, type in the address bar: http://localhost/phpinfo.php and enter, if everything goes well, you will see the following page, to this PHP5 configuration is very good: Note: This article is not from Safety and performance discuss the configuration of the server, please refer to other manuals, this article is only the configuration of the PHP5 environment. As a premise of learning php5, this article cannot be used as a server configuration article. For example, there is no setting here. MySQL's root user password will result in a large security hazard, so please set it by the reader. About the Author
Deep Sky (Shenkong) Personal Homepage: www.openphp.cn, contact mail: kim@openphp.cn
[
Click here to favor this article]
Published on August 06, 2004 2:09 PM
HREF = "http://blog.9cbs.net/shimizu/services/pingback.aspx" Rel = "pingback" />
Maxcai published in
2004-08-10 5:54 PM
LoadModule PHP4_MODULE C: /PHP5/php5apache2.dll
I can't do this.
"
Syntax Error Online 173 of D: / Program Files / Apache Group / Apache2 / Conf / httpd.con
f:
CAN't Locate API Module Structure `PHP4_Module 'in file c: / php5/php5apache2.dll:
No Error
Note The Errors Or Messages Above, and Press The
"
How to set it?
Using XP Apache_2.0.50 php5 Final
Air ball is published
2004-08-10 9:27 PM
LoadModule PHP4_MODULE C: /PHP5/php5apache2.dll
changed to
LoadModule PHP5_MODULE C: /PHP5/php5apache2.dll
Maxcai published in
2004-08-11 8:01 AM
Thank you, the balloon ~~
MIMAX Published
2004-08-22 12:11 am
Why is it safe? ? ?
ServerAdmin Takes One Argument, this Email address of the server administrator Note The Error ...
Fat man published
2004-08-22 3:59 PM
I use it.
XP Apache_2.0.50-Win32-x86-NO_SSL MYSQL-5.0.0A-Alpha-win
After this, Apache can't start, and it is still not possible to have a few times. strange.
Apache is installed in C: / Apache / apache2
Fat man published
2004-08-22 4:35 PM
After careful and again,
Is joining in Apache
LoadModule PHP4_MODULE C: /PHP5/php5apache2.dll
Sometimes wrong
PHP Startup: Unable to load dynamic library'c: / php/extensions/php_iconv.dll' - The specified module is not found.
PHP Startup: Unable to load dynamic library'c: /php/extensions/php_w32api.dll' - The specified module is not found. PHP Startup: Unable to load dynamic library'c: /php/extensions/php_xslt.dll' - The specified module is not found.
PHP Startup: unable to load dynamic library'c: /php/extensions/php_yaz.dll' - The specified module is not found.
PHP Startup: Unable to load dynamic library'c: /php/extensions/php_mysql.dll' - The specified module is not found.
.
....
You can start. I don't know if there will be no effect.
Note: Change C: / PHP / EXT to C: / PHP / Extensions
It is now possible to see the test page.
Aruoo Published
2004-08-27 4:10 PM
Error
prompt:
PHP Startup: Unable to load dynamic library'c: /php/ext/php_curl.dll' - Can't find the specified module.
PHP Startup: Unable to load dynamic library'c: /php/ext/php_ldap.dll' - Can't find the specified module.
PHP Startup: Unable to load dynamic library'c: /php/ext/php_openssl.dll' - Can't find the specified module.
But Apache can start and see the test page.
What is going on this error?
Obviously there is C: /PHP/EXT/PHP_CURL.DLL these modules ~~~ Why can't it find it? Does this error prompt have an impact?
Thank you!
Aruoo Published
2004-08-27 4:12 PM
And ask a relatively mentally issue, how to replace the Apache test page, because my test page is "Is this not the page you want to see?". . . . . . How is it good?
Piaofeng Published
2004-09-02 12:26 PM
My apache can be started, I also saw it.
But when I entered http://localhost/phpinfo.php in the browser
But there is a dialog that prompts me to save, I can't see a page you said.
Hope to advise, thank you
Small new publication
2004-09-03 10:47 AM
Very good, the formulation is very successful, thank you deep space, I hope to give me a lot of advice.
Can you contact you E-mail? ?
Small new publication
2004-09-03 10:49 AM
My apache can be started, I also saw it.
But when I entered http://localhost/phpinfo.php in the browser
But there is a dialog that prompts me to save, I can't see a page you said.
Hope to advise, thank you
Reply:
That is said that your PHP has not been installed successfully.
Fat man published
2004-09-05 9:35 PM
All my questions is solved.
I use the software for use.
Apache-2.0.50-Win32-x86-no_ssl.exe
PHP5-Win32-Latest
PHPMYADMIN 2.6.0-beta2
Mysql-5.0.1-alpha-snapshost-win
About opening http: //localhost/phpinfo.php The saving interface is because
Not added to the httpd file
AddType Application / X-httpd-php .phpaddType Application / X-httpd-php .php4
AddType Application / X-httpd-php .php3
AddType Application / X-httpd-php .phtml
AddType Application / X-httpd-php-source .phps
LoadModule PHP5_Module "C: /PHP5/php5apache2.dll"
This problem can be solved. There is absolutely no problem.
If you have any questions, please ask.
Fat man published
2004-09-05 9:39 PM
Search in httpd
Document root
Change the path behind your web to your webpage. Show the interface for your webpage.
Deep-hollow
2004-09-07 10:48 PM
Halo, how are my here, and not a revision, a mistake above
LoadModule PHP4_MODULE C: /PHP5/php5apache2.dll
changed to
LoadModule PHP5_MODULE C: /PHP5/php5apache2.dll
SS published
2004-09-09 12:31 PM
I have been testing the page and there is no error in the address bar: http://localhost/phpinfo.php just Php phpinfo ();?>>
What is the reason?
Darinliu published
2004-09-12 6:17 PM
I also encountered such a problem? How to do?
Rookie published
2004-09-13 8:31 PM
My apache can be started, I also saw it.
But when I entered http://localhost/phpinfo.php in the browser
But there is a dialog that prompts me to save, I can't see a page you said. This is not understood according to the above, I can't teach me.
OLED published
2004-09-15 4:14 PM
Regarding the problem that the PHP cannot be opened, the answer to the "fat" is correct!
Rookie published
2004-09-16 7:28 PM
Hello, your configuration method is very good, but there is a place wrong is that apache's import PHP file should be 5.0 instead of 4.0 I hope you can change it, this can bring a lot of configuration to everyone.
Rookie published
2004-09-16 7:31 PM
My PHP configuration successfully runs, but it is red.
Highlight.comment # ff8000 # ff8000
Highlight.default # 0000bb # 0000bb
HIGHLIGHT.html # 000000 # 000000
HIGHLIGHT.KEYWORD # 007700 # 007700
Highlight.string # dd0000 # dd0000
Ask the expert guidance, there is no better
Big fat sheep
2004-09-20 4:21 PM
What should I do? Where did you make a mistake?
Rookie published
2004-09-24 12:47 PM
I put it on the above method, but the comment has dropped the module. It is very good. Now I have to use the MySQL module. I will take it off. Why does the APACH server always can't pour into the module, I want to ask the expert guidance
Rookie published
2004-09-27 2:57 PM
Why does the master do not run in a php5 environment, I always have the error of the 90th line, please ask the master to solve this problem "urgent !!
################
# Calendar.php - Create a calendar GIF image for high brightness on the day.
# Use the GD function inventory and TTF font - can be changed to PNG format pictures, of course, if # you want is an except for images with a transparent background, this change can be easily
# Complete, finally, let's write the picture to a directory called the dategif /, and use the date of the same day.
# Name the name of the image. (, Such as: 20000204.gif) This GIF picture generally has 5K or
# Is the size of 7K.
#
# This program You can use anywhere, this document or support is free for everyone, but please
# Don't use the program for sale, you can cut, copy or destroy this program, as long as you like,
# And, you don't have to pay me for it in order to use it! If you need help or you really like this
#, Please give me a letter to let me know, are you optimistic?
# February 4 4, 2000 by matt florell (mattf@mail.com)
################
Header ("Content-Type: Image / GIF");
# Create a picture
$ IM = ImageCreate (156, 142);
# Set color
$ black = imagecolorlocate ($ IM, 50, 50, 50);
$ white = imagecolorlocate ($ IM, 255, 255, 255);
$ orange = imagecoloralloccate ($ IM, 255, 200, 0);
$ yelow = imagecolorallocate ($ IM, 255, 255, 0);
$ Tan = ImageColoralLocate ($ IM, 255, 255, 190);
$ GREY = ImageColoralLocate ($ IM, 205, 205, 205);
$ DKGREY = ImageColoralLocate ($ IM, 140, 140, 140);
### 线 ###
# Border line
ImageERECTANGLE ($ IM, 1, 1, 155, 141, $ DKGREY);
# Horizontal line
ImageERECTANGLE ($ IM, 1, 22, 155, 39, $ DKGREY);
ImagesRectangle ($ IM, 1, 56, 155, 73, $ DKGREY);
ImageRectangle ($ IM, 1, 90, 155, 107, $ DKGREY);
ImagesRectangle ($ IM, 1, 107, 155, 124, $ DKGREY);
#Vertical line
ImageERECTANGLE ($ IM, 23, 22, 45, 141, $ DKGREY);
ImageRectangle ($ IM, 67, 22, 89, 141, $ DKGREY);
ImagesRectangle ($ IM, 111, 22, 133, 141, $ DKGREY);
### White line ###
# 外 线
ImageERECTANGLE ($ IM, 0, 0, 154, 140, $ White);
# Horizontal line
ImageERECTANGLE ($ IM, 0, 21, 154, 38, $ White);
ImageERECTANGLE ($ IM, 0, 55, 154, 72, $ White);
ImageERECTANGLE ($ IM, 0, 89, 154, 106, $ White);
ImageERECTANGLE ($ IM, 0, 106, 154, 123, $ White);
#Vertical line
ImageERECTANGLE ($ IM, 22, 21, 44, 140, $ White);
ImageRectangle ($ IM, 66, 21, 88, 140, $ White); ImageRectangle ($ IM, 110, 21, 132, 140, $ WHITE);
### Write a number above
$ TODAY = DATE ("D");
$ MONTH = DATE ("M");
$ year = Date ("y");
$ datecode = date ("ymd");
$ GIF = '.gif';
$ first = mktime (0,0,0, $ month, 1, $ year);
$ MON_YR = Date ("f y", $ first);
$ wd = Date ("w", $ first);
#if ($ wd == 0) {$ wd = 7;
$ lastday = Date ("D", Mktime (0,0,0, $ month 1, 0, $ year));
$ CUR = - $ WD 0;
$ VER_POSITION = 50;
For ($ k = 0; $ k <6; $ k ) {
$ day_position = 5;
$ last_row_used = 0;
For ($ I = 0; $ i <7; $ i ) {
$ CUR ;
$ SING_ADD = 0;
IF ($ Cur <= 0) || ($ CUR> $ LastDay) $ day_position = ($ day_position 22);
Else
{
$ day_color = $ grey;
IF ($ Day_Position <10) $ day_color = $ tan;
IF ($ CUR == $ Today) $ day_color = $ yellow;
IF (Strlen <2) {$ Sing_ADD = 4;
$ FIN_POSITION = ($ Day_Position $ Sing_ADD);
ImageTfText ($ IM, 12, 0, $ FIN_POSITION, $ VER_POSITION, $ Day_COLOR, "./fonts/arialbd.ttf", "$ CUR");
$ day_position = ($ day_position 22);
$ last_row_used = 1;
}
}
$ day_position = 5;
IF ($ last_row_used) $ VER_POSITION = ($ VER_POSITION 17);
}
# 月 and years (Arial font, bold, huen)
$ SPC = 23;
$ ST_ADD = 0;
$ ST = "$ mon_yr";
$ ST_LEN = Strlen ($ ST);
$ ST_MARGIN = (14 - $ ST_LEN);
IF ($ ST_MARGIN> 0) {$ ST_ADD = ($ ST_MARGIN * 4);
$ SPC = ($ SPC $ ST_ADD);
ImageTfText ($ IM, 14, 0, $ SPC, 15, $ White, "./fonts/rialbd.ttf", "$ ST");
# Week's name
Imagestring ($ IM, 2, 3, 23, "Sun", $ ORANGE);
Imagestring ($ IM, 2, 25, 23, "MON", $ ORANGE); ImageString ($ IM, 2, 47, 23, "Tue", $ ORANGE);
Imagestring ($ IM, 2, 69, 23, "WED", $ ORANGE);
Imagestring ($ IM, 2, 91, 23, "THU", $ Orange);
Imagestring ($ IM, 2, 113, 23, "FRI", $ ORANGE);
Imagestring ($ IM, 2, 135, 23, "SAT", $ ORANGE);
IF ($ VER_POSITION <140)
{
$ IM_OUT = ImageCreate (156, 125);
$ out_black = imagecolorallocate ($ IM_OUT, 50, 50, 50);
ImageERECTANGLE ($ IM, 1, 124, 155, 124, $ DKGREY);
ImageCopyResized ($ IM_OUT, $ IM, 0, 0, 0, 0, 156, 125, 156, 125);
ImageColorTransparent ($ IM_OUT, $ OUT_BLACK);
Imagegif ($ IM_OUT, "./dategif/ $datecode and $gif");
ImageGIF ($ IM_OUT);
ImageDestroy ($ IM);
ImageDestroy ($ IM_OUT);
}
Else
{
ImageColorTransparent ($ IM, $ Black);
Imagegif ($ IM, "./dategif/$Datecode and paid - beast);
ImageGIF ($ IM);
ImageDestroy ($ IM);
}
?>