Win98SE + Apache 1.3.24 + PHP 4.1.2
Van egy php scriptem ami olyan fejlécet küld vissza, hogy a felhasználót azonosítni kellene, de a szerver belső hibára utaló
hibaüzenetet küld.
Tudna valaki segíteni, hogy hogy tudnám megoldani a problémát?
Fontos lenne.
Íme a script:
<?php
if(!isset($PHP_AUTH_USER))
{
header("WWW-Authenticate: Basic realm=\"Azonositás indoka\"");
header("HTTP/1.0 401 Unauthorized");
echo "Ez jelenik meg, ha a Cancel gombot nyomja a felhasználó\n";
exit;
}
else
{
echo "<p>Helló $PHP_AUTH_USER.</p>";
echo "<p>A megadott jelszavad: $PHP_AUTH_PW.</p>";
}
?>
A server meg ezt mondja:
"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, hdd##kukac##nc-studio.com and inform them of the time the error occurred
and anything you might have done that may have caused the
error.
More information about this error may be available in the server
error log."
Error.log:
"[Mon Apr 29 20:59:34 2002] [error] [client 192.168.0.2] malformed header from script. Bad header=HTTP/1.0 401
Unauthorized: c:/php/php.exe"
Gép konfiguráció:
486DX4
Win98SE
Apache 1.3.24
PHP 4.1.2
■ hibaüzenetet küld.
Tudna valaki segíteni, hogy hogy tudnám megoldani a problémát?
Fontos lenne.
Íme a script:
<?php
if(!isset($PHP_AUTH_USER))
{
header("WWW-Authenticate: Basic realm=\"Azonositás indoka\"");
header("HTTP/1.0 401 Unauthorized");
echo "Ez jelenik meg, ha a Cancel gombot nyomja a felhasználó\n";
exit;
}
else
{
echo "<p>Helló $PHP_AUTH_USER.</p>";
echo "<p>A megadott jelszavad: $PHP_AUTH_PW.</p>";
}
?>
A server meg ezt mondja:
"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, hdd##kukac##nc-studio.com and inform them of the time the error occurred
and anything you might have done that may have caused the
error.
More information about this error may be available in the server
error log."
Error.log:
"[Mon Apr 29 20:59:34 2002] [error] [client 192.168.0.2] malformed header from script. Bad header=HTTP/1.0 401
Unauthorized: c:/php/php.exe"
Gép konfiguráció:
486DX4
Win98SE
Apache 1.3.24
PHP 4.1.2
Re: Win98SE + Apache 1.3.24 + PHP 4.1.2
nálam is... :( Nem lehet, hogy
header("WWW-Authenticate: Basic realm=\"Azonositás indoka\"");
header("HTTP/1.0 401 Unauthorized");
nem jó headert ad ki??? Nem tudom, csak kérdezem...
Re: Win98SE + Apache 1.3.24 + PHP 4.1.2
Csak az ithoni szerveren nem mennek mert a neten lévő szerveren jól működik.
Re: Win98SE + Apache 1.3.24 + PHP 4.1.2
Re: Win98SE + Apache 1.3.24 + PHP 4.1.2
A PHPInfo szerint:
System: Linux
Server API: Apache
Az FTP-nél Debian-t ír ki.
Re: Win98SE + Apache 1.3.24 + PHP 4.1.2
Viszont én nem cgi-ként, hanem modulként futtatom a PHP-t, míg te a hibaüzenet alapján cgi-ként, de a kézikönyv csak az IIS/CGI kombinációt nem ajánlja. Ettől függetlenül én azt javasolnám, hogy konfiguráld be a PHP-d inkább modulként, ennél többet most sajnos nem tudok segíteni :( ...
Re: Win98SE + Apache 1.3.24 + PHP 4.1.2
LoadModule php4_module c:/php/php4apache.dll
Az error.log -ban sajnos ezt találtam de nem értem mire vonatkozik csak sejtem, hogy ez lehet a gond:
[Wed May 01 09:42:11 2002] [error] Cannot remove module mod_php4.c: not found in module list
Re: Win98SE + Apache 1.3.24 + PHP 4.1.2
Az volt a baj, hogy rossz hejre írtam egy sort.
Leírom ode is hátha küzd valaki hasonló gondal.
[...]
Action application/x-httpd-php "/php/php.exe"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
LoadModule php4_module c:/php/php4apache.dll
[...]
ClearModuleList
AddModule mod_php4.c
[...]
Re: Win98SE + Apache 1.3.24 + PHP 4.1.2
Merthogy te most először CGI-ként kötöd a PHP-t az Apache-hoz (Action application/x-httpd-php "/php/php.exe"), majd három sorral lejjebb modulként is (LoadModule php4_module c:/php/php4apache.dll)... Szóval itt nem ÉS, hanem VAGY kapcsolatnak kellene fennállnia... :D
Másrészt Windowson (a PHP doksi szerint) a AddType application/x-httpd-php-source .phps sor teljesen felesleges, mert nem működik, csak Linux/Unix alatt...
Harmadszor pedig, normális esetben az AddModule mod_php4.c sor is teljesen felesleges.
A ClearModuleList-ről nem nyilatkozom, mert fogalmam sincs, mit csinál.
Szóval a PHP kézikönyvben szereplő beállításokkal (php.exe nélkül!) miért nem működik modulként a PHP?
Re: Win98SE + Apache 1.3.24 + PHP 4.1.2
Csak nézegettem a PHP install.txt -ét és próbálkoztam.
Kösz!
Re: Win98SE + Apache 1.3.24 + PHP 4.1.2