still have a problem! please, please help...!

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

still have a problem! please, please help...!

Postby deanosrs » 16. January 2006 11:21

This is my problem. I've installed xampp and it seems to work. I have enabled SSI and it works. But the server will still not let me put data into a php script using a url.

For example, here is a simple php script I wrote to test it:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<?php
print("$action");
?>
</body>
</html>


And when I access this file from this url:

"localhost/test.php?action=hello"

It does not print hello - and it should!

I have no idea why xampp is doing this. The same file on a different server does print "hello". If anyone could help I would be very grateful.
deanosrs
 
Posts: 8
Joined: 13. January 2006 20:27

Postby cj_nza » 16. January 2006 11:41

Check the value for register_globals in your php.ini file.

You will note that in the php.ini file the following is stated:

You should do your best to write your scripts so that they do not require
register_globals to be on; Using form variables as globals can easily lead
to possible security problems, if the code is not very well thought of.


With register_globals = off your code could look like:

Code: Select all
<?php
print ($_GET['action']);
?>


And when I access this file from this url:

"localhost/test.php?action=hello"

It does print hello - as it should!
cj_nza
 
Posts: 53
Joined: 06. September 2005 11:49

Postby deanosrs » 16. January 2006 13:47

It's still not working! I changed it to "On" in all the php.ini files I could find, yet I still have to use the line in your code above...

I am correct in thinking that, the security problem that the file is talking about is that people could just put whatever they want into the url rather than just clicking a link? If so I write all my scripts with this in mind anyway.
deanosrs
 
Posts: 8
Joined: 13. January 2006 20:27

Postby cj_nza » 16. January 2006 21:39

Check -
the applicable php.ini file is from memory in the .. /apache/bin directory.
the server requires restart for changes to php.ini to take affect.
cj_nza
 
Posts: 53
Joined: 06. September 2005 11:49


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 113 guests