Techwarelabs Community

Techwarelabs Community (https://www.techwarelabs.com/community/index.php)
-   Software - Applications, Programming, and Games (https://www.techwarelabs.com/community/forumdisplay.php?f=13)
-   -   webserver/php problem in need of help desperately! (https://www.techwarelabs.com/community/showthread.php?t=4157)

Silverhawk 08-10-2003 03:17 AM

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 :)

Uranium-235 08-11-2003 08:01 PM

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"]);
}
...


Silverhawk 08-12-2003 09:49 AM

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

thanks alot :D


All times are GMT -5. The time now is 11:22 AM.

Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.