Big bug with $_GET

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Big bug with $_GET

Postby zairakai » 20. October 2010 12:13

Hi all, I use xampp with ubuntu 10.01 LTS. No probleme first but I try to use $_GET variable. And the PHP can"t found this. I try the same code online and it's working. Do tou know how to turn on the get systeme for php?
Thanks a lot.

P.S: I'm French, and not really good in English, sorry about that.
zairakai
 
Posts: 7
Joined: 20. October 2010 11:22

Re: Big bug with $_GET

Postby Altrea » 20. October 2010 17:01

Maybe you want to show us your code?
very common this is a short_open_tags issue
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Big bug with $_GET

Postby zairakai » 20. October 2010 18:29

yes if you want;
I call http://localhost/index.php?toto=azerty
on my index.php
if have
Code: Select all
<?php
      if(isset($_GET['toto'])){
            echo $_GET['toto'];
      }else{
            echo 'error';
      }
?>


and when i see the answer, I have :
Code: Select all
Notice: Undefined variable: codecom in /opt/lampp/htdocs/index.php on line 2
error


And I try this code whith WAMP no probleme and online, no probleme.
I try too POST and SESSION no probleme with that only with GET.
zairakai
 
Posts: 7
Joined: 20. October 2010 11:22

Re: Big bug with $_GET

Postby Altrea » 20. October 2010 19:06

zairakai wrote:
Code: Select all
Notice: Undefined variable: codecom in /opt/lampp/htdocs/index.php on line 2

Are you really really sure, that this is the error message with the script you postet here?
Please doublecheck that.

There is no "codecom" variable anywhere in your example script
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Big bug with $_GET

Postby zairakai » 20. October 2010 19:39

it's the same. it's not my code, it's working on another serveur.

It's jeut xampp not suporte the GET.

I want to use the get with xampp (if not, it's not a good webserver than wampp (windows)).
Do you kow how to make that?
zairakai
 
Posts: 7
Joined: 20. October 2010 11:22

Re: Big bug with $_GET

Postby Altrea » 20. October 2010 19:52

xampp supports GET out of the box.

Are you sure xampp Apache webserver is running and not any other webserver of your Linux distribution?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Big bug with $_GET

Postby zairakai » 20. October 2010 20:44

Yes, all xampp was run and I install (with apt-get xampp) only xammp. If ubuntu has not another apache, Normaly it"s ok.
zairakai
 
Posts: 7
Joined: 20. October 2010 11:22

Re: Big bug with $_GET

Postby Altrea » 20. October 2010 20:48

please take a look at this file: /opt/lampp/htdocs/index.php

Is this your file you posted here?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Big bug with $_GET

Postby zairakai » 20. October 2010 21:05

/opt/lampp/htdocs/index.php
yes it was that
zairakai
 
Posts: 7
Joined: 20. October 2010 11:22

Re: Big bug with $_GET

Postby Altrea » 20. October 2010 21:12

I just can't believe php throws a notice for a variable which don't exists anywhere.
php don't create ghost variables :shock:
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Big bug with $_GET

Postby Altrea » 20. October 2010 21:21

btw: there is no xampp package which you can install with apt-get.
AFAIK the XAMPP package can only be downloaded from apachefriends or sourceforge
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Big bug with $_GET

Postby zairakai » 20. October 2010 21:24

what do you want to say?


I install xampp with this tuto http://doc.ubuntu-fr.org/xampp
I download XAMPP Linux 1.7.3a on http://www.apachefriends.org/fr/xampp-linux.html
I used this
Code: Select all
<?php echo $_GET['toto']; ?>


and I call
http://localhost/index.php?toto=1

And I receive

Notice: Undefined variable: toto in /opt/lampp/htdocs/index.php on line 1
zairakai
 
Posts: 7
Joined: 20. October 2010 11:22

Re: Big bug with $_GET

Postby Altrea » 20. October 2010 21:28

zairakai wrote:what do you want to say?

That your descriptions must be the truth.
I can't see whats on your screen.
I don't know your system.
I don't know anything about the tuts you follow.

I just know what you tell us in this board!

Don't know what i want to say? :

Code: Select all
Notice: Undefined variable: codecom in /opt/lampp/htdocs/index.php on line 2


IS NOT THE SAME AS

Code: Select all
Notice: Undefined variable: toto in /opt/lampp/htdocs/index.php on line 1
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Big bug with $_GET

Postby Altrea » 20. October 2010 21:35

Next thing i can't believe:

If i use your sourcecode and provoke an error (error_reporting at highest level, don't give an argument in the address line) i get this message:
Code: Select all
Notice: Undefined index: toto in C:\xampp\htdocs/get.php on line 2


not undefined variable, undefined index!

I don't know whats going wrong with your installation.
Maybe someone else knows.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Big bug with $_GET

Postby zairakai » 20. October 2010 21:41

Do you know where can I found a tuto for using apache mysql php ftp ... Simply (not like xampp but it have a bug with that).
zairakai
 
Posts: 7
Joined: 20. October 2010 11:22

Next

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 27 guests