Jump to content
php.lv forumi

$_SERVER[PHP_AUTH_USER] mainiigais nav


Recommended Posts

Bet loģiski.

Ieslēdz error_reporting(E_ALL) un paskaties, ko tas $_SERVER[REMOTE_USER] tev pateiks. Varu priekšā pateikt - nedefinēta konstante REMOTE_USER. Ir skaidrs kāpēc? Tb atšķirība starp REMOTE_USER un "REMOTE_USER" ?

Link to comment
Share on other sites

Kaa tika konfigureets php:

 

./configure' '--prefix=/usr/share' '--datadir=/usr/share/php' '--bindir=/usr/bin' '--libdir=/usr/share' '--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib' '--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin' '--disable-debug' '--enable-bcmath' '--enable-calendar' '--enable-ctype' '--enable-dbase' '--enable-discard-path' '--enable-exif' '--enable-filepro' '--enable-force-cgi-redirect' '--enable-ftp' '--enable-gd-imgstrttf' '--enable-gd-native-ttf' '--enable-inline-optimization' '--enable-magic-quotes' '--enable-mbstr-enc-trans' '--enable-mbstring' '--enable-mbregex' '--enable-memory-limit' '--enable-safe-mode' '--enable-shmop' '--enable-sigchild' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid' '--enable-versioning' '--enable-wddx' '--enable-yp' '--with-bz2' '--with-dom=/usr/include/libxml2' '--with-ftp' '--with-gdbm' '--with-gettext' '--with-gmp' '--with-imap=yes' '--with-iodbc' '--with-jpeg-dir=/usr' '--with-ldap=yes' '--with-mcal=/usr' '--with-mcrypt' '--with-mhash' '--with-mysql=/usr' '--with-ndbm' '--with-pgsql=/usr' '--with-png-dir=/usr' '--with-readline' '--with-snmp' '--with-t1lib' '--with-tiff-dir=/usr' '--with-ttf' '--with-freetype-dir=yes' '--with-xml' '--with-xpm-dir=/usr/X11R6' '--with-zlib=yes' '--with-qtdom=/usr/lib/qt3' '--with-gd' '--with-openssl' '--with-curl' '--with-swf=/usr/src/packages/BUILD/swf/dist/' '--with-imap-ssl' '--enable-xslt' '--with-xslt-sablot' '--with-iconv' '--with-mm' '--with-apxs=/usr/sbin/apxs' 'i586-suse-linux'

Link to comment
Share on other sites

Nu kas lai to zin... parādi skriptu vispirms... 100% pārliecināts ka viss pareizi?

 

The $PHP_AUTH_USER, $PHP_AUTH_PW and $PHP_AUTH_TYPE global variables are only available when PHP is installed as a module. If you're using the CGI version of PHP, you will be limited to Web server-based authentication or other custom types of authentication (such as using HTML forms) to match passwords in a database.
Edited by Delfins
Link to comment
Share on other sites

Baigi stulbs jautaajums. Kaa var zinaat vai kaa cgi vai kaa apache module?

Paskaties vai tev http.conf failā ir kaut kas šitāds

LoadModule php4_module modules/libphp4.so

tas nozīmētu ka php ir ielādēts kā apache modulis un tad varētu izmantot HTTP AUTH autorizāciju..

bet vispār jau no configurācijas --with-apxs=/usr/sbin/apxs tā tam vajadzētu būt..

 

 

No otras puses izskatās ka tu izmanto SuSES rpm packages..

Manuprāt likt php no source ir labāk, jo paskatoties jau cik vien visa kā lieka viņi iekļauj (protams saprotams lai būtu universāli un end-userim viss ietu ).

Link to comment
Share on other sites

×
×
  • Create New...