$_SERVER['PHP_SELF'] und php5

Apache, Lighttpd, nginx, Cherokee
Post Reply
james004
Posts: 10
Joined: 2005-01-10 23:00
 

$_SERVER['PHP_SELF'] und php5

Post by james004 »

Hallo,

nach installation von php5 (selbst compiliert mit

Code: Select all

./configure --prefix=/usr/share --datadir=/usr/share/php --bindir=/usr/bin --libdir=/usr/share --includedir=/usr/include --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-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-memory-limit --enable-safe-mode --enable-shmop --enable-sigchild --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-trans-sid --enable-versioning --enable-wddx --with-bz2 --with-dom=/usr/include/libxml2 --with-ftp --with-gdbm --with-gettext --with-gmp --with-imap=yes --with-jpeg-dir=/usr --with-ldap=yes --with-mcal=/usr --with-mcrypt --with-mysql=/usr --with-ndbm --with-png-dir=/usr --with-qtdom=/usr/lib/qt2 --with-t1lib --with-tiff-dir=/usr --with-ttf --with-freetype-dir=yes --with-xml --with-xpm-dir=/usr/X11R6 --with-zlib=yes --with-gd --with-openssl --with-curl --with-swf=./dist/ --with-imap-ssl --enable-xslt --with-xslt-sablot --with-mm i586-suse-linux
läuft zwar alles soweit prima, nur ein Problem hab ich noch: PHP_SELF ist nicht nur der name des Skripts, sondern mit angehängtem querystring:

Wenn ich also phpinfo.php aufrufe erscheint $_SERVER['PHP_SELF'] korrekt als phpinfo.php. Wenn ich aber phpinfo.php?p=m aufrufe erscheint $_SERVER['PHP_SELF'] eben als phpinfo.php?p=m, was ja IMHO falsch ist.

Liegts am configure-string oder an der php.ini, oder evtl. doch an was ganz anderem?

Es läuft Apache2 mit php5 und suphp auf Suse 8.1

Danke und Gruß
Peter
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: $_SERVER['PHP_SELF'] und php5

Post by Roger Wilco »

Was hast du gegen $_SERVER["SCRIPT_NAME"]?
james004
Posts: 10
Joined: 2005-01-10 23:00
 

Re: $_SERVER['PHP_SELF'] und php5

Post by james004 »

gegen $_SERVER["SCRIPT_NAME"] habe ich gar nix, und solange ich die scripte selber schreibe hab ich auch kein Problem das herzunehmen. Aber sobald ich fertige skripte einsetzen will, kann ich das nicht mehr (ohne großen Aufwand) beeinflussen.

Im übrigen ist das IMHO ein Fehler in meiner Installation, und ein fehlerhaftes PHP kanns nicht sein!

PS: $_SERVER["SCRIPT_NAME"] ist übrigens genauso falsch und liefert auch den Querystring mit
Post Reply