Nauka programowania php

Prosty kurs dla amatorów

Runtime Configuration

Rozdział 9. Runtime Configuration

The configuration file

The configuration file (called php3.ini in PHP 3, and simply php.ini as of PHP 4) is read when PHP starts up. For the server module versions of PHP, this happens only once when the web server is started. For the CGI and CLI version, it happens on every invocation.

php.ini is searched in these locations (in order):

  • SAPI module specific location (PHPIniDir directive in Apache 2, -c command line option in CGI and CLI, php_ini parameter in NSAPI, PHP_INI_PATH environment variable in THTTPD)

  • The PHPRC environment variable. Before PHP 5.2.0 this was checked after the registry key mentioned below.

  • As of PHP 5.2.0, the following registry locations are searched in order: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y.z\IniFilePath, HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y\IniFilePath and HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x\IniFilePath, where x, y and z mean the PHP major, minor and release versions.

  • HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry location)

  • Current working directory (except CLI)

  • The web server's directory (for SAPI modules), or directory of PHP (otherwise in Windows)

  • Windows directory (C:\windows or C:\winnt) (for Windows), or --with-config-file-path compile time option

If php-SAPI.ini exists (where SAPI is used SAPI, so the filename is e.g. php-cli.ini or php-apache.ini), it's used instead of php.ini. SAPI name can be determined by php_sapi_name().

Notatka: The Apache web server changes the directory to root at startup causing PHP to attempt to read php.ini from the root filesystem if it exists.

The php.ini directives handled by extensions are documented respectively on the pages of the extensions themselves. The list of the core directives is available in the appendix. Probably not all PHP directives are documented in the manual though. For a complete list of directives available in your PHP version, please read your well commented php.ini file. Alternatively, you may find the the latest php.ini from CVS helpful too.

Przykład 9-1. php.ini example

; any text on a line after an unquoted semicolon (;) is ignored
[php] ; section markers (text within square brackets) are also ignored
; Boolean values can be set to either:
;    true, on, yes
; or false, off, no, none
register_globals = off
track_errors = yes

; you can enclose strings in double-quotes
include_path = ".:/usr/local/lib/php"

; backslashes are treated the same as any other character
include_path = ".;c:\php\lib"

Since PHP 5.1.0, it is possible to refer to existing .ini variables from within .ini files. Example: open_basedir = ${open_basedir} ":/new/dir".


Newsy:

Nowości z listy dyskusyjnej

drugsxxx: Test (C/C++)
Mam taki test i co prawa ju¿ go pisa³em ale nie wiem jakie s± dobre odpowiedzi moze kto¶ mi pomo¿e??

http://www.kolejland.rail.pl/iz/Forum%20-%...wania/jipp2.jpg

Moje odpowiedzi to:

1. a
2. abc
3. bc
4. d
5. ad
morphix: Programik do wy¶wietlania informacji na pulpicie (Windows Programming)
Plisss bardzo potrzebny nam jest taki program!!!
fressbie: [C++, Assembler] Zlece napisanie lub modyfikacje (Oferujê pracê)
Witam,

Jak w temacie zlecê napisanie od nowa lub zmodyfikowanie istniej±cej ju¿ wersji programu do obliczania sum md5. Zainteresowanych proszê o kontakt.
bear007: Polska strona rozwa¿a przej¶cie na Open Source (Server-Side)
Autor strony Polishwords rozwa¿a przej¶cie na model Open Source. Aby u³atwiæ sobie decyzjê umie¶ci³ ankietê, w której mo¿na zag³osowaæ za albo przeciwko przej¶ciu na Open Source. Pomó¿my autorowi!

Strona Polishwords jest przeznaczona dla programistów i ogó³ informatyków. Zawiera filmy instrukta¿owe z programowania i zarz±dzania baz± danych. Autor rozwa¿a obecnie przej¶cie na model Open Source i opublikowanie kodu strony. Chcia³by przez to osi±gn±æ szybszy rozwój strony i zaanga¿owanie wiêkszej liczby programistów PHP.

W umieszczonej ankiecie mo¿na zag³osowaæ czy autor powinien przej¶æ na model Open Source. Pomó¿ podj±æ dobr± decyzjê autorowi.

Wiêcej na: http://polishwords.com.pl/blog/2008/polishwords-open-source/
webcoder: Program typu klient-serwer (Delphi/Pascal)
Witam pisze program klient-serwer. Próba nr.1:
Skorzysta³em z najprostszech komponentów tego rodzaju czyli ClientSocket i ServerSocket. Posutawialem porty oraz ip w kliencie.
Je¿eli wpsize ip localhosta (127.0.0.1) to klient polaczy sie z serwerem. Jezeli wpisze IP wewnetrzne tez sie polaczy. Ale jezeli wpisze juz ip zewnetrzne to wyskauje blad asynohrous socket error 10061.
Podejscie nr.2
Zmieni³em komponenty na Indy. Wszystko zosta³o odpowiednio skofigurowane. Wiec sytuacja jest identyczna jak powyzej wszystko dziala na ip wewnetrznym i na localhoscie a na zewnetrznym juz. Prosze o pomoc w tej sprawie.

Mo¿e jeszcze dodam, ¿e jest w sieci typu WLan.
Pozdro
Prosze o jak najszybsza odpowiedz

Jak nie znasz jezyka C++ i wskaznikow i programowania obiektowego, to sobie daruj programy okienkowe. Jezeli znasz to wszystko co wymienilem, to w sumie powinienes tez wiedziec jak, badz przy pomocy czego da sie tworzyc programy okienkowe piszac w C++

Kurs

Kurs powstał w celu nauki podstawowych zagadnień z dziedziny php.


Losowe tagi:

magicquotes
apc
informix
pspell
tcpwrap