suPHP (После установки suPHP Apache начал отдавать файлы)

Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.

Модераторы: SLEDopit, Модераторы разделов

Аватара пользователя
dobs
Сообщения: 175
ОС: Fedora

suPHP

Сообщение dobs »

Всем привет, типа поставил suPHP но он начал мне просто отдавать на загрузку php файлы, подскажите в чем может быть трабла?
Home server
Latest Fedora
MB Intel BLKD945GCLF2 Atom 330
2 Gb RAM
500 GB RAID 1
Smolts
Linux registered user #545937
Спасибо сказали:
alfss
Сообщения: 262

Re: suPHP

Сообщение alfss »

Неправильно настроил.
Советую выкинуть suPHP.
Спасибо сказали:
Kreept
Сообщения: 107
ОС: Linux

Re: suPHP

Сообщение Kreept »

Проверьте или хендлеры корректно прописаны:

<IfModule mod_suphp.c>
AddHandler x-httpd-php5 .inc .php .php3 .php4 .php5 .phtml .html
<Location />
suPHP_Engine on
suPHP_AddHandler x-httpd-php5
</Location>
</IfModule>


alfss и чем Вам так не угодил suPHP?
Спасибо сказали:
alfss
Сообщения: 262

Re: suPHP

Сообщение alfss »

Тем как грузит систему. FastCGI быстрее работает и меньше жрет.
Спасибо сказали:
Аватара пользователя
dobs
Сообщения: 175
ОС: Fedora

Re: suPHP

Сообщение dobs »

Прописал то что сказал Kreept но возникла следующая ошибка

[an error occurred while processing this directive] The server encountered an internal error and was unable to complete your request. [an error occurred while processing this directive] Error message:
Premature end of script headers: index.php [an error occurred while processing this directive]

Читал FAQ
Why do my scripts not work and why do I get an "Premature end of script headers" in the error_log?
You probably have installed the CLI version of PHP, but you need the CGI version. Copy the file /build/path/sapi/cgi/php to /where/ever/you/have/installed/bin/php to use the CGI version.

Но чет не врублюсь че за файл надо копирунть...
:wacko2:
Home server
Latest Fedora
MB Intel BLKD945GCLF2 Atom 330
2 Gb RAM
500 GB RAID 1
Smolts
Linux registered user #545937
Спасибо сказали:
Kreept
Сообщения: 107
ОС: Linux

Re: suPHP

Сообщение Kreept »

Выложите suphp.conf.
Спасибо сказали:
Аватара пользователя
dobs
Сообщения: 175
ОС: Fedora

Re: suPHP

Сообщение dobs »

У вас нет необходимых прав для просмотра вложений в этом сообщении.
Home server
Latest Fedora
MB Intel BLKD945GCLF2 Atom 330
2 Gb RAM
500 GB RAID 1
Smolts
Linux registered user #545937
Спасибо сказали:
Kreept
Сообщения: 107
ОС: Linux

Re: suPHP

Сообщение Kreept »

<IfModule mod_suphp.c>
AddHandler x-httpd-suphp .inc .php .php3 .php4 .php5 .phtml .html
<Location />
suPHP_Engine on
suPHP_AddHandler x-httpd-suphp
</Location>
</IfModule>
Спасибо сказали:
Аватара пользователя
dobs
Сообщения: 175
ОС: Fedora

Re: suPHP

Сообщение dobs »

Добавил в suphp.conf
ребутнул апач но ничего не поменялось :(
Home server
Latest Fedora
MB Intel BLKD945GCLF2 Atom 330
2 Gb RAM
500 GB RAID 1
Smolts
Linux registered user #545937
Спасибо сказали:
Kam
Сообщения: 67
ОС: Fedora, CentOS

Re: suPHP

Сообщение Kam »

Лично я настраивал так:

suphp.conf
[global]
;Path to logfile
logfile=/usr/local/apache/logs/suphp_log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=nobody

;Path all scripts have to be in
docroot=/

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=false

;Send minor error messages to browser
errors_to_browser=false

;PATH environment variable
env_path=/bin:/usr/bin

;Umask to set, specify in octal notation
umask=0022

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100


[handlers]
;Handler for php-scripts
application/x-httpd-php="php:/usr/local/php-cgi/bin/php-cgi"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"


httpd.conf
<VirtualHost ..>
......
<IfModule mod_suphp.c>
suPHP_UserGroup qqqq qqqq
</IfModule>
......
</VirtualHost


LoadModule suphp_module modules/mod_suphp.so

AddHandler application/x-httpd-php .php .html .htm .phtml
AddType application/x-httpd-php .php .html .htm .phtml

<IfModule mod_suphp.c>
suPHP_Engine on
<Directory />
suPHP_AddHandler application/x-httpd-php
</Directory>
</IfModule>


Попробуйте со своими путями/итд.
Спасибо сказали:
Аватара пользователя
dobs
Сообщения: 175
ОС: Fedora

Re: suPHP

Сообщение dobs »

Вот мой


Я такую штукень прописал на вирт хост panel но при заходе получаю еррор
[an error occurred while processing this directive] The server encountered an internal error and was unable to complete your request. [an error occurred while processing this directive] Error message:
Premature end of script headers: index.php [an error occurred while processing this directive]
У вас нет необходимых прав для просмотра вложений в этом сообщении.
Home server
Latest Fedora
MB Intel BLKD945GCLF2 Atom 330
2 Gb RAM
500 GB RAID 1
Smolts
Linux registered user #545937
Спасибо сказали: