WE ROCK!!

  ?
MySQL + PHP Installation
Links
 

 
 

 vv
vv
20- ,
vv
2-


 

MySQL PHP herhen suulgah we?

 

v

2002 2- 18.

8-10 v , Open Source Software (OSS) . Linux 쿿, vv . Linux (UNIX) 쿿 .

̺ " 뺺 " () . "server side scripting languages" 뿿 㺺, , PHP ( ) ( PHP , ). Server side scripting language PHP :

  • Javascript- HTML
  • *.php, *.php3 . .
  • PHP executor (javascript- execute ). Yv 㿿 PHP , PHP executor !
  • HTML 뿿 HTML .

PHP- ( ), Linux CGI , , Apache- .. PHP- 쿿 , , authentication, XML, dynamic image creation, WDDX, shared memory support, dynamic PDF document creation 㺺, .. PHP , .

PHP- Nemesis- v PHP ? v vv.

MySQL PHP- . Linux (UNIX) MySQL multithread ( ) , Windows NT, y2k , Windows 95/98/ME . PHP - MySQL , , , 100% vvvvv .. PHP MySQL Oracle, Sybase, PostgreSQL .

Linux, PHP, MySQL "YY" , "" , , , ..

㿿 PHP, MySQL- (Windows, Linux v vv), , , . vv , v , , , 뿿 , vv, vv.

, . !

PHPTriad-

Windows Apache, PHP, MySQL, Perl, PHPMyAdmin PHPTriad 㺺, Windows . PHPTriad- http://www.phpgeek.com/ 㺺, .

, Windows, Unix 쿿 PHP, MySQL- , Windows v PHPTriad v .

MySQL-

MySQL- http://www.mysql.com/ , MySQL- . Windows ZIP , mysql/bin mysqld- vv.. UNIX- binary code ..

MySQL OSS , 쿿 binary vv .

, gzip tar . :

gunzip < mysql-xxxx.tar.gz | tar xvf -

xxxx . vv mysql-xxxx . cd mysql-xxxx README, INSTALL v 뿿 .

MySQL- , vv . v ./configure , , v , vv ./configure --help . : compile ./configure ---with-low-memory vv . ̺ vvv --prefix MySQL- ..

/usr/local/mysql MySQL- . Yv :

./configure --prefix=/usr/local/mysql

configure vv v, . . UNIX threading library , MIT-pthreads, LinuxThread - . vv Linux .

v 㺺 , make , . compile vv 㺺, v vv.. MySQL- v .

, make install 㺺 . MySQL- vv . MySQL v default permission (v ) , vv scripts/mysql_install_db .

! vv vv . (MySQL)- , mysql.server start , mysql.server stop . , v MySQL (/usr/local/mysql) bin/safe_mysqld & .

MySQL , PHP- .

PHP .

Windows

Windows PHP , http://www.php.net PHP- , Downloads -> Windows Binaries -> PHP- vv . v PHP , , vv . http://www.php.net/downloads.php Windows Binaries , PHP 4.1.1 , PHP 4.1.1 zip package [4,953Kb] - 03 January 2002, 㺺 PHP 4.1.1 installer [909Kb] - 03 January 2002 . vv v, PHP 4.1.1 installer- , IIS, PWS Windows vv . :

  • IIS, PWS Adminstration wwwroot ( php ) Permission- Executable , vv "" .
  • Apache , PHP- 㺺v , C:\Program Files\Apache Group\Apache\conf\ httpd.conf . - ,

# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client. The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
ScriptAlias /cgi-bin/ "C:/Apache/cgi-bin/"

.

ScriptAlias /php4/ "C:/php4/"

:

# AddType allows you to tweak mime.types without actually editing it, or to
# make certain files to be certain types.
#
# For example, the PHP3 module (not part of the Apache distribution)
# will typically use:
#
#AddType application/x-httpd-php3 .phtml
#AddType application/x-httpd-php3-source .phps

vv :

AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

vv , :

#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#

:

Action application/x-httpd-php /php4/php.exe

( v PHP- "C:\php4\" , MySQL- "C:\mysql" , , vv)

v Zip package- 㺺, .

PHP Open Source Software , , vv http://www.php4win.de/ . PHP- Windows- , Latest Build . v PHPTriad ..


Windows PHP

  • Linux - Apache PHP . Linux PHP , .. Php.net , Apache, PHP- . Apache http://www.apache.org . (eg: http://apache.org/dist/httpd/apache_1.3.23.tar.gz)
  • http://www.php.net Downloads Latest Source Code . : php-4.1.1.tar.gz .. /usr/local/ , /usr/local/downloads . ( )
  • Installation Instructions (Apache Shared Module Version) for PHP 4

1. gunzip apache_xxx.tar.gz

2. tar -xvf apache_xxx.tar

3. gunzip php-xxx.tar.gz

4. tar -xvf php-xxx.tar

5. cd apache_xxx

6. ./configure --prefix=/www --enable-module=so

7. make

8. make install

9. cd ../php-xxx

10. ./configure --with-mysql --with-apxs=/www/bin/apxs

11. make

12. make install

, 3 . 濿 Apache- restart , Apache- .

11. cp php.ini-dist /usr/local/lib/php.ini

.ini PHP- , ,

--with-config-file-path=/path 8- .

12. httpd.conf srm.conf , comment :

AddType application/x-httpd-php .php

LoadModule php4_module libexec/libphp4.so

, .php . .html , .php3 Php- ..

LoadModule statement- path PHP module- . .

13. Apache server- 뿿 . ( restart , HUP USR1 reload .)

Apache install, Unix , restart . apache/unix vvv. /path/to/ - .

1. Linux, SysV :
/etc/rc.d/init.d/httpd restart

2. apachectl :
/path/to/apachectl stop/path/to/apachectl start

3. httpdctl, httpsdctl (OpenSSL-) apachectl- :
/path/to/httpsdctl stop/path/to/httpsdctl start

4. mod_ssl SSL server , v :
/path/to/apachectl stop/path/to/apachectl startssl

UNIX "" v v , v vv .

PHP, MySQL-

Notepad , ,

<?php phpinfo(); ?>

, test.php httdocs, wwwroot .

v vv:

http://localhost/test.php

v , PHP v v. vv PHP v 㺺, MySQL phpinfo v MySQL . v v v vv.

 

& Links

 

 

 
 
 
v . Feb 18. 2002.