How to install apache+php4+mysql+phpmyadmin under Win98

Source: Internet
Author: User
Tags php tutorial php3 file phpmyadmin
1. Installing PHP4

Software Download:

Http://www.php.net;

Http://www.phpchina.com

Http://phpuser.com

After you get the compressed package, unzip it to the C:\PHP4 directory.


Copy Php4ts.dll,msvcrt.dll to C:\windows\system
Rename php.ini-dist to php.ini copy to C:\windows\
Editing this file is simple, just change a few options.
Extension_dir = C:\PHP4
Extension =php_ldap.dll
Extension =php_zlib.dll
Extension =php_calendar.dll
Extension =php_exif.dll
Extension =php_ftp.dll
Extension =php_mssql70.dll
Extension =php_imap.dll
Remove the semicolon from the front and don't add it yourself. It is recommended that you do not change this section before you are prone to errors.
Here appears:

x-powered-by:php/4.0.0
Content-type:text/html

Because it is specified in the php.ini file that an invalid or nonexistent Php_*.dll file is loaded, loading these error messages may also cause the browser to find the server. After a long and arduous wait, ie said to you:
Brother! Server not found! Please my condolences the way. Ha ha!
It's going to be that simple.
If you are using a Web server that is PWS, then change a place!
Browscap = C:\windows\system\inetsrv\browscap.ini
and modify the Pws-php4.reg file
". php" = "[PUT PATH Here]\\php4isapi.dll")
Switch
". php" = "C:\\php4\\php4isapi.dll"
Simply indicate the location of the Php4isapi.dll file
You can also add to the other suffix name, the specific file is:
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
\w3svc\parameters\script Map]
". php" = "C:\\php4\\php4isapi.dll"
". PhP3" = "C:\\php4\\php4isapi.dll"
". PhP4" = "C:\\php4\\php4isapi.dll"
". phtml" = "C:\\php4\\php4isapi.dll"

Save exit, double click to execute, write to registry!
Other detail settings:
Asp_tags = on; Allows the use of ASP-style markup <%%>
Upload_max_filesize = 2097152; maximum bytes of uploaded file
Mysql.default_host = localhost;
Mysql.default_user = root;
Mysql.default_password= yourpasswd;
The above settings for MySQL can be done in my.cnf. Here only gives a very few parts, other content of the setup also depends on everyone to explore!
include_path = \path1;\path2;\path3 ....
When you use the Include function, only the files that are in the specified directory can be included.
About the Setup method for Doc_root and User_dir.
After setting the Doc_root, only the php file under the Doc_root directory can be executed!
Like Doc_root=c:\php4\test.
Then PHP files can only be interpreted and executed under this directory.
When User_dir is not set, the controlled file reads Doc_root.
such as http://localhost/doc.php3 this URL, open the c:\php4\test\ below the doc.php3 file, not C:\PRogram
Files\....\htdocs\ the following doc.php3 file. About the User_dir setup problem, I still did not make clear, hope Master advice!
2. Installing APACHE1.3.12

Software obtained: Http://www.apache.org;http://www.phpchina.com;http://phpuser.com;http://www.phpsite.net.

The installation of the software is very simple, after downloading the direct double-click to perform the installation.
Configure the httpd.conf file under the Conf directory.
#BindAddress * Change to bindaddress 127.0.0.1
#Servername new.host.name to Servername localhost
A similar error may have occurred because the ServerName was not specified.
"Cannot determine local host name,use servername to set it manually"

Well, your Apache is ready to run!
Run your Apache. Should show:
apache/1.3.12 (WIN32) running ...
Note that this assumes that your Apache is installed in the default directory:
C:/Program Files/apache Group/apache
Otherwise, ServerRoot and Docmentroot in the document are also changed. For example, you are installed under the C:\apache.
ServerRoot = C:/apache Docmentroot = C:/apache/htdocs
Other options in turn
If your machine also has other server programs installed, and you want them to work together for you then you have to change the port, default to 80, you can change to 81 or 8080. Do not use other commonly used ports such as 21, 23,
25 ET (nonsense ^_^).

Okay, let's get your Apache to support PHP4. Add the following sentence, basically you can!

scriptalias/php4/"c:/php4/"
AddType application/x-httpd-php4. php
AddType APPLICATION/X-HTTPD-PHP4. php3
AddType APPLICATION/X-HTTPD-PHP4. PhP4
Action application/x-httpd-php4 "/php4/php.exe"

; Do not write
; Action application/x-httpd-php4 "C:/php4/php.exe"
; otherwise it will go wrong.
Find similar lines in httpd.conf, add them in, so it's easier to maintain some. About the default startup document: Apache's default boot document is Index.html DirectoryIndex
Index.html change it to the default boot document you want
You want to support more documents like this:
DirectoryIndex index.htm
DirectoryIndex index.php
DirectoryIndex index.php3
DirectoryIndex INDEX.PHP4
It's done! Write a test file:

Phpinfo ();
?>
Save As Info.php

Enter http://localhost/info.php in the browser
Don't forget to run Apache first!
3. Installing PWS
Software obtained: WIN98 CD-ROM in ADD-ONS\PWS directory. Oh, direct setup on it, no need to configure! After installation, run PWS, click Advanced to create a virtual directory, click Edit Properties to modify its properties. The default is read and the script is also executed in the middle, tick the front and select it. The PHP4 file under this directory will run!

Note In the php.ini file, set the
Browscap = C:\windows\system\inetsrv\browscap.ini
If not set, PHP4 is impossible to run up.
4. Install MySQL (mysql-3.23.21-beta-win)

Software obtained: foreign http://www.mysql.com; domestic http://www.phpchina.com;http://phpuser.com,http://www.phpsite.net.

Run the setup file to perform the installation and there should be no prompt when MySQL
has been installed in your system, the default directory is: C:\mysql
Under C:\mysql There is a file my-example.cnf renamed MY.CNF Copy to C: \ below.
No need to modify!!!
Can add user name, password, login host, database and port information!
to the C:\mysql\bin directory. Double-click Mysqld to execute! Normally, the DOS window flashes past. It is recommended to open an MS-DOS window at the c:\mysql\bin> prompt to enter
Mysqld
Execute the MySQL daemon!
[If there is no mysqld there should be mysqld-shareware.exe execute it also the same]
If there is no hint, there is no error! Your MySQL has started running! You can try typing a few commands to test:

C:\mysql\bin>mysqladmin Ping
Mysqld is alive
C:\mysql\bin>mysqlshow
+-----------+
| Databases |
+-----------+
| MySQL |
| Test |
+-----------+


The above is the normal situation!
Enter MySQL to log in!

C:\mysql\bin>mysql C:\mysql\bin>mysql-u Root-p
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 8 to server Version:3.23.21-beta-debug
Type ' help ' for help.
Mysql>
Remember to run mysqld before you log in, or you will get this error message:

Can ' t connect to MySQL server on ' localhost ' <10061>
Well, have you ever met? Anyway, when I started running MySQL, that was it!
5. Install phpMyAdmin VER: (phpmyadmin_2.1.0)

This is a PHP-written application, directly copied to the executable PHP directory to run. For example,
C:/Program Files/apache group/apache/htdocs/phpmyadmin/
Modify the Config.inc.php3 file to

Require ("english.inc.php3");
Switch
Require ("chinese_gb.inc.php3");

If your e-text is good enough, do not change it! Anyway, my e-text is ^@#^%^%$&^&^*@$#@$#&*&*&* (() (#@!

Oh!
OK, let's do the task of building a table and see if it's good to use!!!
I have finished speaking, this is my practice! Built debugging environment can also! I haven't found any problems yet! Because I am also a beginner php, so the mistakes of the text will inevitably, I hope that the experts are more critical!




The above describes the method of installing apache+php4+mysql+phpmyadmin under Win98, including the Win98, the installation of Apache content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.