Newsgroup: it.comp.www.php
Titolo: problemi nel passaggio di parametri con "get"

Salve ho appena installato apache e php4 su una nuova macchina,
funziona tutto tranne che ho un problema:
Quando, tramite form, passo dei dati da una pagina all'altra col
metodo get, il php della pagina di destinazione non vede le variabili
relative. (fare isset() su quelle variabili da sempre false).
Lo stesso sito su un'altro pc funzionava correttamente, quindi non
riesco a capire quale sia il problema. temo di aver dimenticato di
settare qualche cosa su php.
allego di seguito il phpinfo che ho fatto per debug.
grazie
Giulio
---------------------------------
PHP Version 4.2.3 
System Windows 95/98 4.10 
Build Date Sep 6 2002 10:38:51 
Server API CGI 
Virtual Directory Support enabled 
Configuration File (php.ini) Path C:\WINDOWS\php.ini 
Debug Build no 
Thread Safety enabled 
 This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.2.0, Copyright (c) 1998-2002 Zend Technologies
 
--------------------------------------------------------------------------------
PHP 4 Credits
--------------------------------------------------------------------------------
Configuration
PHP Core 
Directive Local Value Master Value 
allow_call_time_pass_reference
 On On 
allow_url_fopen
 1 1 
always_populate_raw_post_data
 0 0 
arg_separator.input
 & & 
arg_separator.output
 & & 
asp_tags
 Off Off 
auto_append_file
 no value no value 
auto_prepend_file
 no value no value 
browscap
 no value no value 
default_charset
 no value no value 
default_mimetype
 text/html text/html 
define_syslog_variables
 Off Off 
disable_functions
 no value no value 
display_errors
 On On 
display_startup_errors
 Off Off 
doc_root
 no value no value 
enable_dl
 On On 
error_append_string
 no value no value 
error_log
 no value no value 
error_prepend_string
 no value no value 
error_reporting
 2039 2039 
expose_php
 On On 
extension_dir
 ./ ./ 
file_uploads
 1 1 
gpc_order
 GPC GPC 
highlight.bg
 #FFFFFF #FFFFFF 
highlight.comment
 #FF8000 #FF8000 
highlight.default
 #0000BB #0000BB 
highlight.html
 #000000 #000000 
highlight.keyword
 #007700 #007700 
highlight.string
 #DD0000 #DD0000 
html_errors
 On On 
ignore_user_abort
 Off Off 
implicit_flush
 Off Off 
include_path
 .;c:\php4\pear .;c:\php4\pear 
log_errors
 Off Off 
magic_quotes_gpc
 On On 
magic_quotes_runtime
 Off Off 
magic_quotes_sybase
 Off Off 
max_execution_time
 30 30 
open_basedir
 no value no value 
output_buffering
 no value no value 
output_handler
 no value no value 
post_max_size
 8M 8M 
precision
 12 12 
register_argc_argv
 On On 
register_globals
 Off Off 
safe_mode
 Off Off 
safe_mode_exec_dir
 no value no value 
safe_mode_gid
 Off Off 
safe_mode_include_dir
 no value no value 
sendmail_from
 
m...@localhost.com
 
m...@localhost.com
 
sendmail_path
 no value no value 
short_open_tag
 On On 
SMTP
 localhost localhost 
sql.safe_mode
 Off Off 
track_errors
 Off Off 
unserialize_callback_func
 no value no value 
upload_max_filesize
 2M 2M 
upload_tmp_dir
 no value no value 
user_dir
 no value no value 
variables_order
 EGPCS EGPCS 
xmlrpc_error_number
 0 0 
xmlrpc_errors
 Off Off 
y2k_compliance
 On On 
standard
Regex Library Bundled library enabled 
Dynamic Library Support enabled 
Internal Sendmail Support for Windows enabled 
Directive Local Value Master Value 
assert.active
 1 1 
assert.bail
 0 0 
assert.callback
 no value no value 
assert.quiet_eval
 0 0 
assert.warning
 1 1 
safe_mode_allowed_env_vars
 PHP_ PHP_ 
safe_mode_protected_env_vars
 LD_LIBRARY_PATH LD_LIBRARY_PATH 
url_rewriter.tags
 a=href,area=href,frame=src,input=src,form=,fieldset=
a=href,area=href,frame=src,input=src,form=,fieldset=
bcmath
BCMath support enabled 
calendar
Calendar support enabled 
com
Directive Local Value Master Value 
com.allow_dcom
 Off Off 
com.autoregister_casesensitive
 On On 
com.autoregister_typelib
 Off Off 
com.autoregister_verbose
 Off Off 
com.typelib_file
 no value no value 
ftp
FTP support enabled 
mysql
MySQL Support enabled 
Active Persistent Links 0 
Active Links 0 
Client API version 3.23.39 
Directive Local Value Master Value 
mysql.allow_persistent
 On On 
mysql.default_host
 no value no value 
mysql.default_password
 no value no value 
mysql.default_port
 no value no value 
mysql.default_socket
 no value no value 
mysql.default_user
 no value no value 
mysql.max_links
 Unlimited Unlimited 
mysql.max_persistent
 Unlimited Unlimited 
odbc
ODBC Support enabled 
Active Persistent Links 0 
Active Links 1 
ODBC library Win32 
Directive Local Value Master Value 
odbc.allow_persistent
 On On 
odbc.check_persistent
 On On 
odbc.default_db
 no value no value 
odbc.default_pw
 no value no value 
odbc.default_user
 no value no value 
odbc.defaultbinmode
 return as is return as is 
odbc.defaultlrl
 return up to 4096 bytes return up to 4096 bytes 
odbc.max_links
 Unlimited Unlimited 
odbc.max_persistent
 Unlimited Unlimited 
pcre
PCRE (Perl Compatible Regular Expressions) Support enabled 
PCRE Library Version 3.4 22-Aug-2000 
session
Session Support enabled 
Directive Local Value Master Value 
session.auto_start
 Off Off 
session.cache_expire
 180 180 
session.cache_limiter
 nocache nocache 
session.cookie_domain
 no value no value 
session.cookie_lifetime
 0 0 
session.cookie_path
 / / 
session.cookie_secure
 Off Off 
session.entropy_file
 no value no value 
session.entropy_length
 0 0 
session.gc_maxlifetime
 1440 1440 
session.gc_probability
 1 1 
session.name
 PHPSESSID PHPSESSID 
session.referer_check
 no value no value 
session.save_handler
 files files 
session.save_path
 /tmp /tmp 
session.serialize_handler
 php php 
session.use_cookies
 On On 
session.use_trans_sid
 0 0 
xml
XML Support active 
XML Namespace Support active 
EXPAT Version 1.95.2 
wddx
WDDX Support enabled 
Additional Modules
Environment
Variable Value 
COMSPEC C:\WINDOWS\
COMMAND.COM
 
DOCUMENT_ROOT c:/programmi/apache group/apache/htdocs 
HTTP_ACCEPT */* 
HTTP_ACCEPT_ENCODING gzip, deflate 
HTTP_ACCEPT_LANGUAGE it 
HTTP_CONNECTION Keep-Alive 
HTTP_HOST localhost 
HTTP_REFERER 
http://localhost/catalogo.php
 
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) 
PATH C:\WINDOWS;C:\WINDOWS\COMMAND 
REDIRECT_QUERY_STRING marca=3&submit=vai 
REDIRECT_STATUS 200 
REDIRECT_URL /modelli.php 
REMOTE_ADDR 127.0.0.1 
REMOTE_PORT 1064 
SCRIPT_FILENAME c:/programmi/apache group/php4/php.exe 
SERVER_ADDR 127.0.0.1 
SERVER_ADMIN 
AD...@AGENZIAINFORMATICA.COM
 
SERVER_NAME localhost 
SERVER_PORT 80 
SERVER_SIGNATURE <ADDRESS>Apache/1.3.27 Server at localhost Port
80</ADDRESS>
 
SERVER_SOFTWARE Apache/1.3.27 (Win32) 
WINDIR C:\WINDOWS 
GATEWAY_INTERFACE CGI/1.1 
SERVER_PROTOCOL HTTP/1.1 
REQUEST_METHOD GET 
QUERY_STRING marca=3&submit=vai 
REQUEST_URI /modelli.php?marca=3&submit=vai 
SCRIPT_NAME /php4/php.exe 
PATH_INFO /modelli.php 
PATH_TRANSLATED c:\programmi\apache group\apache\htdocs\modelli.php 
PHP Variables
Variable Value 
_GET["marca"] 3  
_GET["submit"] vai  
_SERVER["COMSPEC"] C:\\WINDOWS\\
COMMAND.COM
 
_SERVER["DOCUMENT_ROOT"] c:/programmi/apache group/apache/htdocs  
_SERVER["HTTP_ACCEPT"] */*  
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate  
_SERVER["HTTP_ACCEPT_LANGUAGE"] it  
_SERVER["HTTP_CONNECTION"] Keep-Alive  
_SERVER["HTTP_HOST"] localhost  
_SERVER["HTTP_REFERER"] 
http://localhost/catalogo.php
 
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows
98)
_SERVER["PATH"] C:\\WINDOWS;C:\\WINDOWS\\COMMAND  
_SERVER["REDIRECT_QUERY_STRING"] marca=3&submit=vai  
_SERVER["REDIRECT_STATUS"] 200  
_SERVER["REDIRECT_URL"] /modelli.php  
_SERVER["REMOTE_ADDR"] 127.0.0.1  
_SERVER["REMOTE_PORT"] 1064  
_SERVER["SCRIPT_FILENAME"] c:/programmi/apache group/php4/php.exe  
_SERVER["SERVER_ADDR"] 127.0.0.1  
_SERVER["SERVER_ADMIN"] 
AD...@AGENZIAINFORMATICA.COM
 
_SERVER["SERVER_NAME"] localhost  
_SERVER["SERVER_PORT"] 80  
_SERVER["SERVER_SIGNATURE"] <ADDRESS>Apache/1.3.27 Server at localhost
Port 80</ADDRESS>
 
_SERVER["SERVER_SOFTWARE"] Apache/1.3.27 (Win32)  
_SERVER["WINDIR"] C:\\WINDOWS  
_SERVER["GATEWAY_INTERFACE"] CGI/1.1  
_SERVER["SERVER_PROTOCOL"] HTTP/1.1  
_SERVER["REQUEST_METHOD"] GET  
_SERVER["QUERY_STRING"] marca=3&submit=vai  
_SERVER["REQUEST_URI"] /modelli.php?marca=3&submit=vai  
_SERVER["SCRIPT_NAME"] /php4/php.exe  
_SERVER["PATH_INFO"] /modelli.php  
_SERVER["PATH_TRANSLATED"] c:\\programmi\\apache
group\\apache\\htdocs\\modelli.php
_SERVER["PHP_SELF"] /modelli.php  
_SERVER["argv"] Array
(
    [0] => marca=3&submit=vai
)
 
_SERVER["argc"] 1  
_ENV["COMSPEC"] C:\\WINDOWS\\
COMMAND.COM
 
_ENV["DOCUMENT_ROOT"] c:/programmi/apache group/apache/htdocs  
_ENV["HTTP_ACCEPT"] */*  
_ENV["HTTP_ACCEPT_ENCODING"] gzip, deflate  
_ENV["HTTP_ACCEPT_LANGUAGE"] it  
_ENV["HTTP_CONNECTION"] Keep-Alive  
_ENV["HTTP_HOST"] localhost  
_ENV["HTTP_REFERER"] 
http://localhost/catalogo.php
 
_ENV["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)
_ENV["PATH"] C:\\WINDOWS;C:\\WINDOWS\\COMMAND  
_ENV["REDIRECT_QUERY_STRING"] marca=3&submit=vai  
_ENV["REDIRECT_STATUS"] 200  
_ENV["REDIRECT_URL"] /modelli.php  
_ENV["REMOTE_ADDR"] 127.0.0.1  
_ENV["REMOTE_PORT"] 1064  
_ENV["SCRIPT_FILENAME"] c:/programmi/apache group/php4/php.exe  
_ENV["SERVER_ADDR"] 127.0.0.1  
_ENV["SERVER_ADMIN"] 
AD...@AGENZIAINFORMATICA.COM
 
_ENV["SERVER_NAME"] localhost  
_ENV["SERVER_PORT"] 80  
_ENV["SERVER_SIGNATURE"] <ADDRESS>Apache/1.3.27 Server at localhost
Port 80</ADDRESS>
 
_ENV["SERVER_SOFTWARE"] Apache/1.3.27 (Win32)  
_ENV["WINDIR"] C:\\WINDOWS  
_ENV["GATEWAY_INTERFACE"] CGI/1.1  
_ENV["SERVER_PROTOCOL"] HTTP/1.1  
_ENV["REQUEST_METHOD"] GET  
_ENV["QUERY_STRING"] marca=3&submit=vai  
_ENV["REQUEST_URI"] /modelli.php?marca=3&submit=vai  
_ENV["SCRIPT_NAME"] /php4/php.exe  
_ENV["PATH_INFO"] /modelli.php  
_ENV["PATH_TRANSLATED"] c:\\programmi\\apache
group\\apache\\htdocs\\modelli.php

 ha scritto nel messaggio
news:c6e72be5.02111...@posting.google.com...


Prova con isset($HTTP_GET_VARIABLES["nome_var"])
Lo sai che hai quotato 455 righe per aggiungerne 4?
Outlook impedisce proprio di usare il cervello per postare su usenet?

 Prova con isset($HTTP_GET_VARIABLES["nome_var"])
grazie per l'aiuto:
ho provato, quell'isset da false, come posso fare a cambiare la
configurazione in modo che dia true? 
ho cercato HTTP_GET_VARIABLES su 
php.net
 ma non trova nulla.
grazie
Giulio
***************************************
messaggio inviato tramite HostSearch.it
---------------------------------------
---> 
http://www.hostsearch.it/newsgroup
***************************************

ho risolto.. 
nelle versioni recenti di php in php.ini le variabili globali sono
disabilitate.. 
basta cambiare da off a on e va.
grazie comunque


ho cercato HTTP_GET_VARIABLES su 
php.net
 ma non trova nulla.
if(isset($_GET["nomevariabile"]));
http://it.php.net/manual/it/language.variables.predefined.php