Page 1 of 1

Server Error

Posted: Mon Sep 17, 2007 7:11 am
by SirChick
When i run my script, it hangs and then fails to load.... ive used the script before and it used to work but then decided it doesn't want to work.


this is the error i get but i have no idea what it means:

[notice] Parent: child process exited with status 255 -- Restarting.


Google didn't give me any helpful results when i put that in the search so im hoping some one here knows what the problem is.

Any thoughts?

Posted: Mon Sep 17, 2007 12:43 pm
by Christopher
What kind of server and what kind of script?

Posted: Mon Sep 17, 2007 1:59 pm
by SirChick
Im using the xampp package and im running it on localhost.


This is the script that the url is on when it fails:


Code: Select all

<?

include("homeloginvariables.php");

$CityID = $row['CityID'];
$New = $row['New'];

If ($New == 1)  {


$insertquery = "INSERT INTO houses (HouseType,UserID,HouseNumber,Price,StreetName,Area)
						Values ('Blanket', '{$_SESSION['Current_User']}','0','0','Anywhere!','Anywhere!')";
					mysql_query($insertquery) or die(mysql_error());

$GetHouseID = mysql_query("SELECT HouseID FROM houses WHERE UserID='{$_SESSION['Current_User']}'");
// Fetch the row from the database
if (!($housesrow = mysql_fetch_assoc($GetHouseID))) {
	echo "ID for house not found!";
	exit;
}

$SecondInsert = $housesrow['HouseID'];

$InsertHouseID = "UPDATE userregistration SET HouseID= '$SecondInsert' WHERE UserID='{$_SESSION['Current_User']}'";
mysql_query($InsertHouseID) or die(mysql_error());

$New = 0;
$ChangeNew = "UPDATE userregistration SET New= '$New' WHERE UserID='{$_SESSION['Current_User']}'";
mysql_query($ChangeNew) or die(mysql_error());					
}
If ($CityID == "0")
{
Header ("Location: PickYourCity.php");
}
Else
{
Header ("Location: Homelogin.php");
}





?>

Posted: Mon Sep 17, 2007 2:39 pm
by Christopher
You might want to look in the PHP bugtracker at bugs: 29681 and 31828.

http://bugs.php.net/

Posted: Mon Sep 17, 2007 6:49 pm
by SirChick
Right most of those 2 errors you posted suggest loops but i ain't using any... =/

Posted: Mon Sep 17, 2007 6:59 pm
by Christopher
If your start removing lines at what point does is stop crashing?

Posted: Tue Sep 18, 2007 7:07 am
by SirChick
No. I also made the page load a compelte random page that just had:


<?

Echo 'test';

?>


and it still crashed.

But my login.php always works. It just screws up when the header takes place and it crashes on the page that its header'd to.

Posted: Tue Sep 18, 2007 7:39 am
by VladSun
I'm not sure it will work but please, try giving full path to files and exit after headers are sent:

Code: Select all

If ($CityID == "0")
{
         Header ("Location: http://yoursite.com/PickYourCity.php");
         exit();
}
Else
{
         Header ("Location: http://yoursite.com/Homelogin.php");
         exit();
}

Posted: Tue Sep 18, 2007 9:57 am
by SirChick
The code i provided above doesn't get chance to run.

I know this because the insert's don't occur when the crash happens...so basically it goes:


login page loads.
I press "login" and then longgg loading time... xampp stops responding and the page fails to load on the url of:

check.php which is the code i provided. So its to do with either the new page load or something else....

i could post the login code if needs be also ?

Posted: Tue Sep 18, 2007 11:02 am
by VladSun
SirChick wrote:i could post the login code if needs be also ?
Lets see it :)

Posted: Tue Sep 18, 2007 12:50 pm
by SirChick
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Just figured out its this script (which is part of it) its included....

not sure why it is though i have no loops.. but when i removed this it worked... but this script is kinda needed so Im still not sure how to fix my problem.

Code: Select all

<?
include ("include.php");


$GetUserInfo = mysql_query("SELECT * FROM userregistration
                    WHERE UserID='{$_SESSION['Current_User']}'");
					
                  
// Fetch the row from the database
if (!($row = mysql_fetch_assoc($GetUserInfo))) {
    echo "User not found!";
    exit;
	echo mysql_error();
}







$Jail = $row['JailID'];

If ($Jail == 1) {
Header    ("Location: Londonjail.php");
}

?>

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]