Openwebmail i "Premature end of script headers"

Transkrypt

Openwebmail i "Premature end of script headers"
This page was exported from - Adam Kucza
Export date: Wed Mar 1 23:11:39 2017 / +0000 GMT
Openwebmail i "Premature end of script headers"
Aby nasze systemy i aplikacje dzia?a?y prawid?owo lubimy je aktualizowa? do najnowszych wersji. Aczkolwiek s? ró?ne 'szko?y':
jedni aktualizuj? a drudzy podziwiaj? zalety ostatnich zainstalowanych wersji systemów serwerowych nietykaj?c aktualizacji.
Nale?? do tej pierwszej grupy i zach?cam jednak do korzystania z wszelkich dost?pnych aktualizacji istniej?cych w sieci.
Ale oczywi?cie wszystko z g?ow?.
Ostatnio postanowi?em zaktualizowa? Perla do wersji 5.8.8 i dzi?ki temu przesta? dzia?a? Openwebmail.
W logach webowego serwera apache widzia?em tylko komunikaty typu:
Premature end of script headers: openwebmail.pl
Prawa dost?pu do katalogu by?y ustawione prawid?owo, alias skryptowy CGI (ScriptAlias) równie?.
Pojawi?a si? wi?c zagadka.
Szukaj?c odpowiedzi w sieci natrafi?em na ciekaw? informacj? dotycz?c? wykonywania skryptów CGI na serwerze apache:
The most common cause of this problem is the script dying before sending the complete set of headers, or possibly any at all, to the
server. To see if this is the case, try running the script standalone from an interactive session, rather than as a script under the server.
If you get error messages, this is almost certainly the cause of the "premature end of script headers" message. Even if the CGI runs
fine from the command line, remember that the environment and permissions may be different when running under the web server.
The CGI can only access resources allowed for the User and Group specified in your Apache configuration. In addition, the
environment will not be the same as the one provided on the command line, but it can be adjusted using the directives provided by
mod_env.
?ród?o: http://httpd.apache.org/docs/1.3/misc/FAQ.html#premature-script-headers.
Chodzi o to, ?e wykonywane skrypty CGI na serwerze musz? mie? dost?p do otoczenia (environment), które jest przez te skrypty
zmieniane, a co za tym idzie musi by? za?adowany modu? mod_env.
Brakuj?cy modu? doinstalowa?em z portu php5-extensions-1.1. Jednak sama instalacja modu?u nie pomog?a rozwi?za? problem.
Okazuje si?, ?e w momencie wykonywania skryptów Perl korzysta z takiej opcji jak SUIDPERL (Set User ID PERL), tj. przydziela
identyfikator u?ytkownika na czas wykonania skryptu.
Mo?na si? o tym dowiedzie? czytaj?c informacje o zmianach w nowej wersji Openwebmaila.
Najistotniejsza informacja dla nas:
(...) Perl automatically runs in suid mode if the suid bit is set on the running script AND perl is compiled with the DOSUID option.
The openwebmail-*.pl scripts still require suid, so please make sure they are properly chmod'd 4755 as usual (...)
?ród?o: http://openwebmail.org/openwebmail/doc/changes.txt.
Lecz ma?o kto wie, ?e w wersji 5.8.8 Perla opcja SUIDPERL standardowo jest wy??czona.
Musimy przeinstalowa? Perla (z portów) z opcj? SUIDPERL w nast?puj?cy sposób:
cd /usr/ports/lang/perl5.8
make deinstall
make ENABLE_SUIDPERL=YES install clean
Gdy krypty perlowe Openwebmaila nadal generuj? te same b??dy, nale?y jeszcze przeinstalowa? Openwebmaila.
Powodzenia!
Output as PDF file has been powered by [ Universal Post Manager ] plugin from www.ProfProjects.com
| Page 1/1 |

Podobne dokumenty