Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: apache stopping only one .php file |
|
Author |
|
kshitiz.singh
Joined: 14 Apr 2011 Posts: 2
|
Posted: Thu 14 Apr '11 22:57 Post subject: apache stopping only one .php file |
|
|
ok guyz i am a newbie so pls be soft...
so the problem is i can visit any other php file except for the one which i want to visit...
it gives 500 internal server error...
it correct redirects to phpinfo page and all...
here's d coding for d target page (i figure that's where d problem is)...
<?php
$MySQLHost="xxxxxxxxxxx";
$MySQLUsername="xxxxxxxxxx";
$MySQLPassword="xxxxxxxxx";
$MySQLDbName="xxxxxxxxxx";
$MySQLTableName="Users";
mysql_connect("$MySQLHost", "$MySQLUsername", "$MySQLPassword")or die(mysql_error());
mysql_select_db("$MySQLDbName")or die(mysql_error());
if (isset($_POST['submit'])) {
if(!$_POST['Username'] | !$_POST['Password']) {
die('You did not fill in a required field.');
}
}
$DbUsername=$_POST['Username'];
$DbPassword=$_POST['Password'];
$DbUsername = stripslashes($DbUsername);
$DbPassword = stripslashes($DbPassword);
$DbUsername = mysql_real_escape_string($DbUsername);
$DbPassword = mysql_real_escape_string($DbPassword);
$DbPassword = md5($DbPassword);
$SQLResult=mysql_query("SELECT * FROM $MySQLTableName WHERE username='$DbUsername'") or die(mysql_error());
$ResultRowCount=mysql_num_rows($SQLResult);
if($ResultRowCount==0){
die('User Does Not Exist');
}
while($DbArray = mysql_fetch_array($SQLResult)){
$DbArray['Password'] = stripslashes($DbArray['Password']);
if ($DbPassword != $DbArray['Password']) {
die('Incorrect password, please try again.');
}
else {
$DbHour = time() + 3600;
setcookie(CkUsername, $DbUsername, $DbHour);
setcookie(CkPassword, $DbPassword, $DbHour);
header("location:CheckLogin.php");
}
}
?> |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Fri 15 Apr '11 6:26 Post subject: |
|
|
I'll assume the Apache error log in this case is useless, but have you checked it anyway? For instance, if mod_security was getting in the way for whatever reason, it would show there. What about the PHP error log ... anything there? You pasted the code but if there's errors in it, php's error log would tell you. |
|
Back to top |
|
kshitiz.singh
Joined: 14 Apr 2011 Posts: 2
|
Posted: Fri 15 Apr '11 19:50 Post subject: thnx |
|
|
i don't know what the problem was i just reconfigured every single thing and it started working again...
anyway thanks for trying to help... |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 16 Apr '11 9:12 Post subject: Re: thnx |
|
|
kshitiz.singh wrote: | i just reconfigured every single thing |
Please share what it was |
|
Back to top |
|
|
|
|
|
|