Techware Labs Header

Forums have moved

See this announcement for more details, or just go directly there.

  #1  
Old 08-10-2003, 03:17 AM
Silverhawk
 
Posts: n/a
Default webserver/php problem in need of help desperately!

Hello all

I've had my site up and running for a while already, one day i tried to log into the content management system i wrote, and it kept saying i was giving the wrong password. I double checked and my password was right, later my other staff members were telling me the same thing.

So i thought something was wrong, i made the script call out the md5 encryption of the submitted password, and no matter what input i gave, it came out with the same value.

On inspection i found that the forms were not sending any data at all! This is the code i used to test...
Code:
<html> 
<head> 
   <title>input test</title> 
</head> 
<body> 
<?php 
if (!$HTTP_POST_VARS['submit']) { 
?> 
<form action="<?$PHP_SELF?>" method="post"> 
<input type="text" name="input01"> 
<input type="submit" value="Input" name="submit"> 
</form> 
<? 
} 
else { 
   echo ("$input01"); 
} 
?> 
</body> 
</html>
No matter what i input, the php script will not echo anything at all, its blank. If i fill up the echo without a variable but a normal text, it'll display.

Then just today i realised the scripts that have file.php?id=x is not working either
the code is something like this
Code:
if ($id) { 
display individual item 
} 
else { 
display the list of items 
}
the list displays but when a link is clicked to display the specific item, the page just reloads with the address bar showing http://website/file.php?id=x

All of these scripts worked before, it just stopped working recently. THe problem is driving me nuts. Not to mention not only is it not working on the server, its not working on my pc either However it works on other webservers and also on my cousin's pc(which is running the exact same config as me)

Server :
Apache 2.0
php 4.2.2
Red Hat linux

My pc :
Apache 2.0
php 4.3.2
Windows XP

i even uninstalled apache 2.0 and installed apache 1.3 and the problem is still there. I ruled out the possibility of php being the culprit as the server and my pc use different versions.

If anyone has any ideas... please help
Reply With Quote
  #2  
Old 08-11-2003, 08:01 PM
Uranium-235's Avatar
Uranium-235 Uranium-235 is offline
Administrator
 
Join Date: Nov 2001
Location: Mansfield, TX
Posts: 2,469
Send a message via ICQ to Uranium-235 Send a message via AIM to Uranium-235
Default

sorry the PHP guru has been gone, but I'm back!

the problem sounds like it might be register globals

eather turn it on, or for example in the first script try...

Code:
...
else { 
   echo ($HTTP_POST_VARS["input01"]); 
} 
...
Reply With Quote
  #3  
Old 08-12-2003, 09:49 AM
Silverhawk
 
Posts: n/a
Default

yeah turned out register_globals was turned off :\
didn't even think of that lol silly me

thanks alot
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:58 AM. Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum style by ForumMonkeys.