Jump to content


Photo

Can't POST GET on Apache ## HELP ! ##


  • Please log in to reply
4 replies to this topic

#1 Sl4ckB0t

Sl4ckB0t
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationUSA

Posted 02 April 2003 - 05:07 PM

I\'m Not a Newbie but new to SUSE. I set up Suse 8.1 pro on a new server. I\'m having the most aggravating computer problem ever, here goes:

installed apache: works (serves pages)
installed php: works ( php code is executed properly at shell )
installed phpmod: works ( php/html code is executed properly and served by apache)
installed phpMyAdmin: works (can login, create and change databases)

So what\'s the problem you ask ???? Even though phpMyAdmin and also Mpanel work flawlessly I can not post or get a simple test form. The form works fine on other servers.

----- test.php ------

<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<meta http-equiv=\"content-type\" content=\"text/html; charset=ISO-8859-1\">
<title><? echo \"Freakin Test\"; ?></title>
</head>
<body>
Test Form<br>
<form method=\"post\" action=\"post.php\">
<input type=\"text\" name=\"textbox\" maxlength=\"12\" />
<input type=\"submit\" value=\"Submit\" />
</form>
</body>
</html>

--------

------ post.php ------

<html>
<? echo \"Test:\" ?><br>
<? echo \"<br>$textbox<br>\" ?>
<a href=\"./test.php\">back</a>
</html>

--------

I\'m on my third day and still stuck, Please Help!!
Computers are like air conditioners -- they stop working properly if you open WINDOWS

#2 hexzero

hexzero
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 02 April 2003 - 09:33 PM

This may be a shot in the dark, but I had to make sure the following was set in the php.ini-dist

register_globals = on

It should be on or around line 355

I found this fix somewhere in this forum earlier when I had the same type of problem when trying to get a form to work.

Hope that works for you...

Hexzero

#3 DocSeuss

DocSeuss
  • Members
  • PipPipPip
  • Advanced Member
  • 73 posts
  • LocationTexas, USA

Posted 02 April 2003 - 11:44 PM

that will prolly get your variable to work but that isn\'t the best solution

as of version 4.2.0 register globals were set to be off by default for security reasons.

If you intend to write alot of php code, download others php code, or share the code that you write in php I would suggest going with the new standard.

leave register_globals off
when you want to use the variable from your form in post.php
access it like this

$_POST[\'textbox\'];

if your form method was GET you would use

$_GET[\'textbox\']

good luck.
"Unlimited budget? Great, for $5,000,0000 we will run your ad banner for one year"  ----Rasmus Lerdorf

#4 hexzero

hexzero
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 03 April 2003 - 12:47 AM

Thanks, I appreciate the tip....

#5 Sl4ckB0t

Sl4ckB0t
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationUSA

Posted 03 April 2003 - 02:30 PM

Worked Great Thanks :)
Computers are like air conditioners -- they stop working properly if you open WINDOWS




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users