|
аудентификация
|
|||
---|---|---|---|
#18+
Подскажите пожалуйта, какую сделать настройку в Apache или PHP для того, что бы PHP увидел переменные $PHP_AUTH_USER $PHP_AUTH_PASSWORD $_SERVER['PHP_AUTH_USER'] $_SERVER['PHP_AUTH_PASSWORD'] $REMOTE_USER, не видет все варианты испробовала формочка появляется а не логин не пороль не воспринимает. ... |
|||
:
Нравится:
Не нравится:
|
|||
20.08.2003, 19:17 |
|
аудентификация
|
|||
---|---|---|---|
#18+
http://www.php.net/manual/ru/features.http-auth.php ... |
|||
:
Нравится:
Не нравится:
|
|||
21.08.2003, 10:54 |
|
аудентификация
|
|||
---|---|---|---|
#18+
ищи в сети статьи по установке пхп в виде модуля к Apache если английский знаешь - то с пхп идет файл install.txt там этот процесс описан ... |
|||
:
Нравится:
Не нравится:
|
|||
21.08.2003, 10:56 |
|
аудентификация
|
|||
---|---|---|---|
#18+
Спасибо, все работает :) ... |
|||
:
Нравится:
Не нравится:
|
|||
21.08.2003, 13:58 |
|
аудентификация
|
|||
---|---|---|---|
#18+
Настройка PHP4 и PHP3 как модуль Apache отличаюстся Настройка для PHP4 Если вы хотите использовать PHP как модуль в Apache, переместите php4ts.dll в системную директорию windows/system (для Windows 9x/Me) или winnt/system32 (для Windows NT/2000/XP), переписав старый файл. Затем вы должны добавить две следующие строки в conf-файл Apache: LoadModule php4_module c:/php/sapi/php4apache.dll AddType application/x-httpd-php .php .phtml После изменения файла конфигурации не забудьте рестартовать сервер, например, NET STOP APACHE, а затем NET START APACHE, если вы запускаете Apache как службу Windows, или используйте обычные ярлыки. Примечание: Вы можете обнаружить, после использования windows-инсталятора для Apache, что вам нужно определить директиву AddModule для mod_php4.c в файле конфигурации (httpd.conf). Это делается путём добавления AddModule mod_php4.c в список AddModule близко к началу файла конфигурации. Это особенно важно, если определена директива ClearModuleList. Если этого не сделать, PHP не будет зарегистрирован как Apache-модуль. Есть два способа использования возможности объяснения исходного кода, однако работа этой возможности зависит от инсталяции. Если вы сконфигурировали Apache для использования PHP как ISAPI-модуля, то, добавив следующую строку в ваш файл конфигурации, вы сможете воспользоваться этой возможностью: AddType application/x-httpd-php-source .phps ... |
|||
:
Нравится:
Не нравится:
|
|||
22.08.2003, 06:40 |
|
аудентификация
|
|||
---|---|---|---|
#18+
В свое время сляпал вот такую доку по установке: За английский сильно не пинать, я это на англоязычнвй сервак выкладывал и ошибок там тьма! Quick installation of local httpd server using Apache, Perl, MySQL and PHP: 1. - Introduction 1.1. - Whole stuff installation notice 2. - Installing Apache 1.3.x 2.1. - Configuring you httpd.conf file, the brain of whole server 2.1.1. - Section 1: Global Environment 2.1.2. - Section 2: 'Main' server configuration 2.1.3. - Section 3: Virtual Hosts 3. - Installing Perl 5.6.x 3.1. - Installing Perl 5.6.x under Apache Server as a module (mod_perl) 3.2. - Installing Perl 5.6.x under Apache Server as a CGI binary 4. - Installing MySQL 3.23.x 4.1. - General installation notes 4.2. - Configure your MySQL 5. - Installing PHP 4.x 5.1. - Install PHP 4.x under Apache Server as a module 5.2. - Install PHP 4.x under Apache Server as a CGI binary 5.3. - Enable any additional futures: 5.4. - Overall installation instructions 1. - Introduction 1.1. - Whole stuff installation notice All corresponding paths must be valid and updated according programs location on you machine. In this document you never find how to press the 'Next' button, only configuration and maintains workaround information. 2. - Installing Apache 1.3.x 2.1. - Configuring you httpd.conf file, the brain of whole server After you install Apache server you need to configure you httpd.conf file, wich is a brain of httpd server. What you need to change/add in it in order of appearance in distributed httpd.conf file: 2.1.1. - Section 1: Global Environment Listen Allows you to bind Apache to specific IP addresses and/or ports, in addition to the default. If you plan to configure any VirtualHosts listened on different port or/and IP addresses on this machine you need to supply any of IP_Address:Port on which servers will work. Example: Listen 80 Listen 3000 BindAddress This will tell apache on which IP Addresses on your machine to bind Example: BindAddress * or BindAddress 127.0.0.1 2.1.2. - Section 2: 'Main' server configuration Remember values in this directive provide default values for all you VirtualHosts. Port If you plan to use VirtualHosts better to comment this line. Example: # Port 80 ServerAdmin Your address, where problems with the server should be e-mailed. This address appears on some server-generated pages, such as error documents. Example: ServerAdmin admin@company.domain <Directory /> Better to include to options directive following parameters: Includes Indexes Example: <Directory /> Options FollowSymLinks Includes Indexes AllowOverride None </Directory> DirectoryIndex File names you put in this directive will be loaded if no file name is provided in URL query to you server. Example: <IfModule mod_dir.c> DirectoryIndex index.html index.htm index.php </IfModule> AddType text/html .shtml AddHandler server-parsed .shtml This two lines must be uncommented and changed in order to use Server Side Includes (SSI). Also adding to this list .html .htm files will slow performance of you http site. Example: AddType text/html .shtml .html .htm AddHandler server-parsed .shtml .html .htm 2.1.3. - Section 3: Virtual Hosts In this section you should describe you Virtual Hosts if any. <VirtualHost IP_Address:Port> You can supply vary of directives for your Virtual Host. But those one full enough to work properly. ServerAdmin - E-Mail to be showing on any error pages. DocumentRoot - Place holder of you .html files tree. Script Alias - Place holder of you cgi (cgi-bin) files tree. Alias - Alias to any directory to be mapped to you Virtual Host. ErrorLog - Error log file specially for this Virtual Host. CustomLog - Access log file specially for this Virtual Host. Example: <VirtualHost 127.0.0.1:3000> ServerAdmin admin@company.domain DocumentRoot "e:/httpd/www" ScriptAlias /cgi-bin/ "e:/httpd/cgi/" Alias /images/ "e:/httpd/images/" ErrorLog e:/httpd/error.log CustomLog e:/httpd/access.log common </VirtualHost> 3. - Installing Perl 5.6.x 3.1. - Installing Perl 5.6.x under Apache Server as a module (mod_perl) *** This chapter is under construction and testing stage *** Corresponding site link http://perl.apache.org/ If you've got something send to Admin@company.com 3.2. - Installing Perl 5.6.x under Apache Server as a CGI binary If you want to put all of your CGI scripts into one directory, add the following line to your httpd.conf file (You can choose any directory you'd like, but make sure it exists): ScriptAlias /cgi-bin/ "e:/httpd/apache/cgi-bin/" After you have made this change, stop and restart the Apache service. Apache provides an emulation of the UNIX shebang (#!/path/to/perl) syntax, so the next step is easy. You can put you Perl scripts into your cgi-bin directory, as long as you have a path to a valid interpreter at the top. For example: #!/usr/local/perl/bin/perl -w use CGI qw(:standard); print header(); print "Hello, world"; If you want to enable CGI scripts based on an extension, such as .pl, you need to add the following line to srm.conf: AddHandler cgi-script .pl By default, CGI scripts are not allowed in your DocumentRoot directory, but they are allowed in other document directories. Document directories are created with the Alias command in srm.conf: Alias /ResourceKit/ "e:/utilsamp/" You can then include files that end in .pl within a document directory. You will still need to include the #! line with the full path to the perl.exe interpreter, as shown earlier. If you want to allow CGI scripts in the DocumentRoot directory, add the ExecCGI option to the Options directive between the <Directory> and </Directory> entry for your DocumentRoot in access.conf (these appear directly after the comment titled): # This should be changed to whatever you set DocumentRoot to. After you have updated it, your Options directive may look something like: Options Indexes FollowSymLinks ExecCGI It must correspond to your perl binary file. Parameter -w is optional but it's recommended to see warnings in you perl script file. 4. - Installing MySQL 3.23.x 4.1. - General installation notes Copy the file `\mysql\my-xxxxx.cnf' to `C:\my.cnf' and edit it to suit your setup. Note that you should specify all paths with `/' instead of `\'. If you use `\', you need to specify it twice, because `\' is the escape character in MySQL. After that you need to run appropriate executable with --install parameter, according to following table: Executable Description ------------- ------------------------------------------------------------ mysqld Compiled with full debugging and automatic memory allocation checking, symbolic links, BDB and InnoDB tables. mysqld-opt Optimized binary with no support for transactional tables. mysqld-nt Optimized binary for NT with support for named pipes. You can run this version on Win98, but in this case no named pipes are created and you must have TCP/IP installed. mysqld-max Optimized binary with support for symbolic links, BDB and InnoDB tables. mysqld-max-nt Like mysqld-max, but compiled with support for named pipes. 4.2. - Configure you MySQL As was told in chapter 4.1. all default configuration is gathered in file `C:\my.cnf'. This is the first file MySQL Service read when execute. You should include any configuration in it starting from base_dir and port variables. Example of my.cnf: [mysqld] port=3306 default-character-set=cp1251 character-sets-dir=e:/usr/local/mysql/share/charsets basedir=e:/usr/local/mysql datadir=e:/usr/local/mysql/data This is their shortest version of config file which will configure your database for Windows1251 codepage as default. Also don't forget change the base_dir path for you MySQL installation directory and datadir for the directory containing you database files. 5. - Installing PHP 4.x 5.1. - Install PHP 4.x under Apache Server as a module Copy php4ts.dll to c:\winnt\system32 Then you should add the following three lines to your Apache conf file: LoadModule php4_module c:/php/sapi/php4apache.dll AddModule mod_php4.c AddType application/x-httpd-php .php 5.2. - Install PHP 4.x under Apache Server as a CGI binary If you wish to install PHP as a CGI binary, (the sapi is much better) you need to enable the apache security fix in your php.ini by setting cgi.force_redirect = 1. Then, insert these lines to your conf file: ScriptAlias /php/ "c:/php/" AddType application/x-httpd-php .php Action application/x-httpd-php "/php/php.exe" As a further precaution, we recommend you change the "/php/" ScriptAlias to something more random, to prevent any attempts to call your binary (like the Code Red scripts) for returning a response other than 404. 5.3. - Enable any additional futures To use the source code highlighting feature, add the following line to your apache httpd.conf file: AddType application/x-httpd-php-source .phps Note, this will only work when you install php as a sapi module. If you wish to use this feature with the cgi binary, create a new file, and use the show_source("path/to/original_file.php"); function. On Win-Apache all backslashes in a path statement such as: "c:\directory\file.ext", must be converted to forward slashes ex. "c:\directory\file.ext" -> "c:/directory/file.ext" 5.4. - Overall installation instructions Configure and copy php.ini-dist file from you PHP installation directory to windows directory usually c:\winnt. mahoune ... |
|||
:
Нравится:
Не нравится:
|
|||
22.08.2003, 10:01 |
|
аудентификация
|
|||
---|---|---|---|
#18+
Да ладно уж там...попалась бы мне такая дока начал только общаться с пхп и серверами глядишь и не мучался бы полмесяца методом научного тыка ... глядишь сечас бы умнее был ... |
|||
:
Нравится:
Не нравится:
|
|||
22.08.2003, 10:11 |
|
аудентификация
|
|||
---|---|---|---|
#18+
Не подскажете как к Apache припаять RADIUS? ... |
|||
:
Нравится:
Не нравится:
|
|||
22.08.2003, 11:55 |
|
|
start [/forum/topic.php?fid=23&fpage=528&tid=1480454]: |
0ms |
get settings: |
9ms |
get forum list: |
15ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
67ms |
get topic data: |
13ms |
get forum data: |
3ms |
get page messages: |
51ms |
get tp. blocked users: |
2ms |
others: | 12ms |
total: | 180ms |
0 / 0 |