Tài liệu về học lập trình web bằng ngôn ngữ PHP cho tất cả mọi người.
[...]... application/x-httpd -php3 php3 However for PHP 4 the entry should be: AddType application/x-httpd -php php The AddType directive causes Apache to recognize files with the extension php3 to be PHP scripts and use the PHP module to interpret them In this book we use mainly the php extension, so you can set the AddType directive to php with either PHP 3 or PHP 4 The argument application/xhttpd -php3 (application/x-httpd -php. .. application/x-httpd -php php3 php AddType application/x-httpd -php3 -source phps # for PHP4 this should be AddType application/x-httpd -php3 -source phps # if compiled the stand-alone version, uncomment the following line #Action application/x-httpd -php3 /cgi-bin /php # use Action application/x-httpd -php /cgi-bin /php for PHP 4 # if compiled as a loadable module, uncomment the following line #LoadModule php_ module... from the PHP manual is below: Library Description php3 _calendar.dll Calendar conversion functions php3 _crypt.dll Crypt functions php3 _dbase.dll DBase functions php3 _dbm.dll GDBM emulation via Berkely DB2 library php3 _filepro.dll Read-only access to filepro databases php3 _gd.dll GD Library functions for gif manipulation php3 _hyperwave.dll HyperWave functions php3 _imap4r2.dll IMAP 4 functions php3 _ldap.dll... cp php3 .ini-dist /usr/web/server /php3 / Independently of which method you used, you will need to add statements to the Apache configuration file (usually httpd.conf), so the server will know what to do when requests for PHP scripts come: ❑ Add a PHP type, and the appropriate directives in case you compiled the stand-alone or the loadable version of PHP: AddType application/x-httpd -php3 php3 php #for PHP. .. php3 _imap4r2.dll IMAP 4 functions php3 _ldap.dll LDAP functions php3 _msql1.dll MSQL 1 client php3 _msql2.dll MSQL 2 client php3 _mssql.dll MSSQL client (requires MSSQL DB-Libraries php3 _mysql.dll MySQL functions (available on PHP4 too as php_ mysql.dll ) php3 _nsmail.dll Netscape mail functions php3 _oci73.dll Oracle 7.3 functions A word on browser capability detection - PHP 3 has a feature that allows scripts to be aware... php_ module modules/mod _php. so ❑ Add a directive so index .php3 or index .php can be also used by the server just like index.html is used as the default : TEAM FLY PRESENTS DirectoryIndex index.html index.shtml index.cgi index .php3 index .php ❑ Add a directive so the appropriate icon is shown when listing files in a directory: AddIcon /icons/script.gif conf sh shar csh ksh tcl php3 php phps ❑ And add a directive... // (this allows documents be stored under directories other than the web // server’s root) AddType application/x-httpd -php3 php3 Action application/x-httpd -php3 " /php3 /php. exe" // (provided that the PHP interpreter is in the php3 directory under the web // server’s root) To install PHP 4 with IIS 5 on Windows 2000 you will need to set your options using the MMC (Microsoft Management Console) Select... the Distribution You could obtain PHP distributions by: Methods ❑ HTTP ❑ FTP ❑ From an anonymous CVS server Formats ❑ Binary tar file ❑ RPMs ❑ Source code The core PHP distribution is available from the official PHP home at http://www .php. net PHP is available over FTP or HTTP from a number of mirror sites (for a site closest to you, check the list at the PHP homepage) PHP is distributed as source distributions... RPM installation for a PHP binary distributed as something like php. 3.xx.prm would be as simple as: #rpm –Uvh php. 3.xx.rpm TEAM FLY PRESENTS Remember to add the following entries to the Apache configuration file httpd.conf (usually /etc/httpd/conf/httpd.conf) and restart Apache: # Under "Extra modules" add the following lines AddModule mod _php3 LoadModule php3 _module modules/libphp3.so # Under global... a directory, like C:\Program Files \PHP Make sure you have all the DLLs (see previous table) for all the add-on modules that you need Copy these into C:\Program Files \PHP We need to create PHP s configuration file php3 .ini, from the sample configuration file phpdist.ini and then copy it into your Windows directory Now for the customization itself We need to edit the php3 .ini file: ❑ The variable extension_dir