Server Error

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
SirChick
Forum Contributor
Posts: 125
Joined: Tue Jul 31, 2007 11:55 am

Server Error

Post 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?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

What kind of server and what kind of script?
(#10850)
SirChick
Forum Contributor
Posts: 125
Joined: Tue Jul 31, 2007 11:55 am

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





?>
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

You might want to look in the PHP bugtracker at bugs: 29681 and 31828.

http://bugs.php.net/
(#10850)
SirChick
Forum Contributor
Posts: 125
Joined: Tue Jul 31, 2007 11:55 am

Post by SirChick »

Right most of those 2 errors you posted suggest loops but i ain't using any... =/
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

If your start removing lines at what point does is stop crashing?
(#10850)
SirChick
Forum Contributor
Posts: 125
Joined: Tue Jul 31, 2007 11:55 am

Post 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.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Post 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();
}
There are 10 types of people in this world, those who understand binary and those who don't
SirChick
Forum Contributor
Posts: 125
Joined: Tue Jul 31, 2007 11:55 am

Post 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 ?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Post by VladSun »

SirChick wrote:i could post the login code if needs be also ?
Lets see it :)
There are 10 types of people in this world, those who understand binary and those who don't
SirChick
Forum Contributor
Posts: 125
Joined: Tue Jul 31, 2007 11:55 am

Post 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]
Post Reply