OT: Apache a PHP - nepredani parametru

Jiri Mikulas konfer at mikulas.com
Fri Jan 9 16:37:21 CET 2004


zdravim
pravdepodobne tento pripad
zkontrolujte si nastaveni v php.ini (nastavit na On)

; - register_globals = Off         [Security, Performance]
;     Global variables are no longer registered for input data (POST, 
GET, cookies,
;     environment and other server variables).  Instead of using $foo, 
you must use
;     you can use $_REQUEST["foo"] (includes any variable that arrives 
through the
;     request, namely, POST, GET and cookie variables), or use one of 
the specific
;     $_GET["foo"], $_POST["foo"], $_COOKIE["foo"] or $_FILES["foo"], 
depending
;     on where the input originates.  Also, you can look at the
;     import_request_variables() function.
;     Note that register_globals is going to be depracated (i.e., turned 
off by
;     default) in the next version of PHP, because it often leads to 
security bugs.
;     Read http://php.net/manual/en/security.registerglobals.php for further
;     information.

pripadne pouzivat pole $_GET[], $_POST[] atd ..
mik

Jan Moravec wrote:

>Zdravim a omlouvam se za OffTopic.
>
>Je to dozajista trivialni, ale nejak jsem se na tom zaseknul a ne se hnout dal.
>Nainstaloval jsem FreeBSD 4.9, z portu php4-4.3.3 a s tim i apache. Zadne zasadni konfigurace jsem neprovadel.
>
>Odkaz v nize prilozenem souboru test.php  odkazuje na sebe s parametrem "par=12". Ale po odkliknuti se parametr nepreda, resp. prikaz "echo ..." ho nevypise. Soubor lezi v adresari "data" (htdocs).
>
>V cem je, prosim, chyba?
>
>V adresari cgi-bin/... predavani parametru mezi skripty funguje.
>
>Dekuji za radu.
>
>			Honza
>
>PS: Jakekoliv dalsi informace obratem rad doplnim.
>
>--- test.php ---
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Final//EN">
><HTML>
><HEAD>
><TITLE>test</TITLE>
></HEAD>
><BODY>
>Odkaz: <A HREF="test.php?par=12">test?par=12</A><BR>
><?
>    echo "parametr: $par\n";
>?>
></BODY>
></HTML>
>--- test.php ---
>
>  
>

-- 
FreeBSD mailing list (users-l at freebsd.cz)
http://www.freebsd.cz/listserv/listinfo/users-l



More information about the Users-l mailing list