Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[conf] php & apache no party! [risolto]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Tiro
l33t
l33t


Joined: 14 Feb 2003
Posts: 752
Location: italy

PostPosted: Thu Nov 04, 2004 12:39 pm    Post subject: [conf] php & apache no party! [risolto] Reply with quote

ciao a tutti,
è da ieri sera che sbatto la testa per far funzionare un semplicissimo script php su apache2 ma senza fortuna.. :(
Pare che il browser non riesca a passare le variabili alla pagina php. Il php funziona perchè le variabili interne vengono visualizzate mentre quelle passate con metodo post o get no. Per maggior chiarezza:

Questa è la pagina dei form che passano le variabili:

Quote:
<html>
<body>


<form action="info.php" method="get">
A: <input type=text name=A><br>
B: <input type=text name=B><br>
<input type=submit value=Send>
</form>


</body>
</html>


Questa è la pagina php che visualizza le variabili:

Quote:
<html>
<body>
<?php echo "Hello World"; ?><br>
A=<?php echo "$A";?><br>
B=<?php echo "$B";?><br>
YourBrowser: <?php echo $HTTP_USER_AGENT; ?>
</body>
</html>


...il problema è che "Hello World" me lo visualizza correttamente mentre $A $B $HTTP... no. Non sono molto pratico ma credo che sia giusto...ho idea che mi sfugga qlcs dalla configurazione di mod_php...

apache è configurato per girare con mod_php:

Code:
 # ps ax | grep apache
 1846 ?        Ss     0:00 /usr/sbin/apache2 -k start -D SSL -D PHP5
 1848 ?        S      0:00 /usr/sbin/apache2 -k start -D SSL -D PHP5
 1849 ?        S      0:00 /usr/sbin/apache2 -k start -D SSL -D PHP5
 1850 ?        S      0:00 /usr/sbin/apache2 -k start -D SSL -D PHP5
 1851 ?        S      0:00 /usr/sbin/apache2 -k start -D SSL -D PHP5
 1852 ?        S      0:00 /usr/sbin/apache2 -k start -D SSL -D PHP5
 1853 ?        S      0:00 /usr/sbin/apache2 -k start -D SSL -D PHP5
 1855 ?        S      0:00 /usr/sbin/apache2 -k start -D SSL -D PHP5
 1861 ?        S      0:00 /usr/sbin/apache2 -k start -D SSL -D PHP5


la pagina di prova è qui:

http://80.116.152.45


Last edited by Tiro on Thu Nov 04, 2004 1:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
Merlink
Tux's lil' helper
Tux's lil' helper


Joined: 01 Sep 2004
Posts: 104
Location: Agrigento, Italy

PostPosted: Thu Nov 04, 2004 1:05 pm    Post subject: Reply with quote

prova a scrivere
<? echo $_GET['A']; ?>
,
<? echo $_GET['B']; ?>
e
<? echo $_SERVER['HTTP_USER_AGENT']; ?>

e' ormai da un bel po' che il register_global (voce del php.ini) e' settata ad off di default (e se leggi sopra, cpisci il perche').

Saluti
Back to top
View user's profile Send private message
Tiro
l33t
l33t


Joined: 14 Feb 2003
Posts: 752
Location: italy

PostPosted: Thu Nov 04, 2004 1:17 pm    Post subject: Reply with quote

mitico! funziona alla perfezione! :)

...grazie! ;) mò me guardo il php.ini ..
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum