PHP4.03 installation in linux

Source: Internet
Author: User
PHP4.03 installation in linux-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Required Software

PHP4.03 source code C language code
Mysql3.23 alpha source code
Apache 1.3.11 source program
PHPmyadmin_2.0.5 is the best tool for managing MYSQL databases.

   Step 1 download the required program and install the MYSQL3.23 Program

Su creates a directory for root as the directory for program installation, as shown in figure
/Server
Create the directory mysql, apache,
Download the above three files to/usr/src.

Run the following command to unbind the package

Tar-zxvf PHP-4.0b3.tar.gz
Tar-zxvf mysql-3.23.9-alpha.tar.gz
Tar-zxvf apache_1.3.11.tar.gz
Download PHPmyadmin to/server

Run the same
Tar-zxvf PHPMyAdmin_2.0.5.tar.gz

Cd/usr/src/mysql-XXXX
Here, XXXX is the version number of the program, the same below, the system must have installed the C Development Library

./Configure-help
./Configure-prefix =/server/mysql
Make
Make install
Cd/server/mysql/bin
./Mysql_install_db
Mysql has been installed successfully!

Can run mysql database

/Server/mysql/libexec/mysqld &

You can view the current status of the database using the database display program mysqlshow.

/Server/mysql/bin/mysqlshow

   Step 2 install apache and PHP4

If apache is already running in the system, disable this service first.

Killall httpd

Compile apache and PHP4. Each line number is a line.

Cd/usr/src/apache_1.3.x
./Configure -- prefix =/server/apache
Cd./PHP-4.0.x
./Configure -- with-mysql =/server/mysql -- with-apache = ../apache_1.3.x -- enable-track-vars
Make
Make install
Cd ../apache_1.3.x
./Configure -- prefix =/server/apache -- activate-module = src/modules/PHP4/libPHP4.a
Make
Make install
Cd./PHP-4.0.x
Cp PHP. ini-dist/usr/local/lib/PHP. ini
Apache and PHP4 have been installed successfully. Configure apache and PHP4 below

Configure PHP4
The PHP4 configuration file is/usr/local/lib/PHP. ini.

You can use vi for editing. If you have installed MC, you can also use MC for editing.

Modify in [mysql]

Mysql. default_port = 3306
Mysql. default_host = localhost
Mysql. default_user = root

Save the file.

Configure apache
The configuration file of apache is/server/apache/conf/httpd. conf.

Remove
# AddType application/x-httpd-PHP. PHP
The registration number of the row "#" to join the row
AddType application/x-httpd-PHP. PHP3
Save the file.

Configure PHPmyadmin_2.0.5
In/server/PHPmyadmin_2.0.5, find the config. inc. PHP3 file and modify it from row 10th as follows:
$ Incluservers [1] ['host'] = 'localhost ';
$ Export servers [1] ['Port'] = '000000 ';
$ Incluservers [1] ['adv _ auth'] = false;
$ Incluservers [1] ['stduser'] = 'root ';
$ Incluservers [1] ['stdpass'] = '';
$ Incluservers [1] ['user'] = 'root ';
$ Login servers [1] ['Password'] = '';
$ Incluservers [1] ['only _ db'] = '';
$ Define servers [1] ['verbose '] = '';


Modify row 65th
Require ("english. inc. PHP3 ");
Require ("chinese_gb.inc.PHP3 ");
Save the file.

Start apache
/Server/apache/bin/apachectl start

   Step 3 Test

The/server/PHPMyAdmin_2.0.5 directory under/server/apache/htdocs/is admin
Enable http: // localhost/admin/index. PHP3 in the browser to connect to the MYSQL database. You can perform operations on the base. This indicates that the entire system can work normally. You can also create a new PHP file as follows:


File Name info. PHP


// View the system status file.

<? PHPinfo ();?>

// End the file


When you access this page in the browser, you will get the PHP running information.

Note. All content in this article is run on the relevant platform in this article. Different PHP versions may be different.

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.