Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Название темы: отрубается php на httpd!! help!
Показать сообщение отдельно
mar mar вне форума

Аватара для mar

just mar


Moderator


Сообщения: 3904
Благодарности: 163

Профиль | Отправить PM | Цитировать


FrIcE
это второй апач - у него некоторые вещи в конфиге не на привычных местах

sub
если опять будет дурить, попробуйте половить в это время загрузку сервера (например - top).

А может быть дело все-таки именно во втором апаче (вернее в директиве MultiViews): вот, почитайте: по запросу в гугле (apache2+php+problems) вылезла иетересная статья: Apache 2 and PHP (mod_php) on Linux. Вот, в частности, что там говорится:
Цитата:
# Add these directives are in /usr/local/apache/conf/httpd.conf (if already there, verify they are correct):

# Make sure there's only **1** line with this directive:
LoadModule php4_module modules/libphp4.so

# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php

# Uncomment one of the following (but not both)
# Use for PHP 4.x:
AddHandler php-script php
# Use for PHP 5.x:
#AddHandler php5-script php

AddType text/html php

# PHP Syntax Coloring
# (optional but useful for reading PHP source for debugging):
AddType application/x-httpd-php-source phps


Note 1: The php documentation recommends AddType application/x-httpd-php php instead of the above. However, it causes problems with the "MultiViews" feature of HTTP. That is, if the .php extension is left off a URL, and with certain browser Accept headers, Apache will not know .php (application/x-httpd-php) is HTML and will return a 406 Not Acceptable error. Using the AddType and AddHandler as shown above fixes this problem. For details see Mark Tranchant's webpage, "Using Apache's MultiViews with PHP whilst avoid 406 errors," and PHP bug 28023.

Note 2: PHP Syntax coloring isn't required, but it's very nice for looking at your php source while debugging. Here's an example.

Note 3: just for completeness I'll mention that you should be able to use SetOutputFilter / SetInputFilter instead of AddType, but you can't use both. However, SetOutputFilter / SetInputFilter no longer works for me. It used to work with an earlier PHP 4.x or Apache 2 version, but not with Apache 2.0.47/PHP 4.3.3. I understand this (PHP as an Apache 2 filter) is experimental, so I don't use it anymore:

<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
MultiViews определять представление ресурса в зависимости от предпочтений клиента (тип носителя, язык, набор символов кодировка).
Цитата:
Механизм MultiViews позволяет выбрать из имеющихся файлов, имена которых начинаются с локальной части URI, наиболее подходящий на основе типа, языка, набора символов и метода кодирования, определяемых модулем mime по суффиксам файлов
(Bog BOS: Apache 2: HTTP сервер. Установка, настройка) - так что тут действительно могут быть проблемы.
Вариант лечения - отрубить этот самый MultiViews, или попробовать прописать все про mime-типы php, как выше.

Отправлено: 20:36, 03-06-2005 | #14

Название темы: отрубается php на httpd!! help!