PHP 4

[ PHP ]

(!!! Teleportom!!!)
: fopen, msql_num_fields, socket_write ...


48.

PHP. PHP / (, , MacOS OSX) web-.

PHP INSTALL, . Windows install.txt. Windows .

1. Unix/Windows: php.ini?
2. Unix: PHP, 'Document Contains No Data'! ?
3. Unix: PHP RPMS, Apache PHP-! ?
4. Unix: PHP RPMS, , ! ?
5. Unix: Apache FrontPage, PHP . PHP FrontPage Apache?
6. Unix/Windows: PHP, PHP- , .
7. Unix/Windows: PHP, PHP- , 500 .
8. : PHP , pache undefined symbol:
[mybox:user /src/php4] root# apachectl configtest
 apachectl: /usr/local/apache/bin/httpd Undefined symbols:
  _compress
  _uncompress
9. Windows: PHP, PHP- :
cgi error:
 The specified CGI application misbehaved by not
 returning a complete set of HTTP headers.
 The headers it did return are:
10. Windows: , PHP IIS - - !

1. Unix/Windows: php.ini?

UNIX /usr/local/lib, <install-path>/lib. --with-config-file-path. , , :
--with-config-file-path=/etc

php.ini-dist /etc/php.ini , .

Windows php.ini Windows. Apache web-, php.ini Apache, , c:\program files\apache group\apache. , php.ini Apache .

. .

2. Unix: PHP, 'Document Contains No Data'! ?

, PHP - . error log , , . , 'gdb', , bug . PHP Apache-, - :

  • httpd-

  • gdb httpd

  • httpd-

  • > run -X -f /path/to/httpd.conf

  • URL, ,

  • > run -X -f /path/to/httpd.conf

  • , gdb

  • type: bt

  • bug. http://bugs.php.net/

(ereg() ), , PHP Apache . PHP Apache 1.3.x.

3. Unix: PHP RPMS, Apache PHP-! ?

, Apache PHP RPM-, http.conf:
# Extra Modules
AddModule mod_php.c
AddModule mod_php3.c
AddModule mod_perl.c

# Extra Modules
LoadModule php_module         modules/mod_php.so
LoadModule php3_module        modules/libphp3.so     /*  PHP 3 */
LoadModule php4_module        modules/libphp4.so     /*  PHP 4 */
LoadModule perl_module        modules/libperl.so

:

AddType application/x-httpd-php3 .php3    /*  PHP 3 */
AddType application/x-httpd-php .php      /*  PHP 4 */

... /global properties VirtualDomain, PHP.

4. Unix: PHP RPMS, , ! ?

- PHP 3 /build PHP RPM. PHP 4. PHP 3 , INSTALL.REDHAT PHP. RPM- PHP 3, ...

RPM RPMS , - , RPMS /usr/ /usr/local/. RPM spec-, , .

MySQL mod- Apache.

, , PHP. , MySQL Apache RPMS.

  • mod_php3 :
    rpm -e mod_php3

  • rpm , --rebuild
    rpm -Uvh mod_php3-3.0.5-2.src.rpm

  • , /usr/src/redhat/SPECS/mod_php3.spec

    %build /path.

    MySQL
    --with-mysql=/usr \

    %build :

    ./configure --prefix=/usr \
    	--with-apxs=/usr/sbin/apxs \
    	--with-config-file-path=/usr/lib \
    	--enable-debug=no \
    	--enable-safe-mode \
    	--with-exec-dir=/usr/bin \
    	--with-mysql=/usr \
    	--with-system-regex
  • , rpm :
    rpm -bb /usr/src/redhat/SPECS/mod_php3.spec

  • rpm
    rpm -ivh /usr/src/redhat/RPMS/i386/mod_php3-3.0.5-2.i386.rpm

Apache, PHP 3 MySQL RPM. , , , /build tarball PHP 3 INSTALL.REDHAT, .

5. Unix: Apache FrontPage, PHP . PHP FrontPage Apache?

PHP FrontPage. , FrontPage Apache, PHP. PHP ( 'make clean ; make') FP .

6. Unix/Windows: PHP, PHP- , .

'view source' , , , PHP-. , web- PHP . - - PHP.

7. Unix/Windows: PHP, PHP- , 500 .

, PHP. , PHP (php.exe Windows) php -i. PHP, , . , html ( phpinfo()), PHP , , .

8. : PHP , pache undefined symbol:
[mybox:user /src/php4] root# apachectl configtest
 apachectl: /usr/local/apache/bin/httpd Undefined symbols:
  _compress
  _uncompress

PHP , MySQL. --with-zlib, - . MySQL FAQ.

9. Windows: PHP, PHP- :
cgi error:
 The specified CGI application misbehaved by not
 returning a complete set of HTTP headers.
 The headers it did return are:

, PHP . , PHP (php.exe Windows) php -i. PHP, , . , html ( phpinfo()), PHP .

PHP , . -, :

  • PHP- php.exe, php4ts.dll, php.ini PHP, , , internet ISUR_<machinename> .

  • (, , , , web root). IIS 'check file exists' Internet Services Manager. , 404. , IIS NTLanMan .

10. Windows: , PHP IIS - - !

, PHP- php.exe! IIS anonymous (), IIS. php.exe. php.exe. IIS4, PHP .


Delphi

: 3119 .

: - |  -