Jump to content

[SOLVED] Can't find server ERROR


odisey

Recommended Posts

This is a parsing  problem - I think.  I have written two pages of code.  One to input new records into a student score data base.  There are 45 questions on the page and about 5000 lines of code.  The second page is an update page which allows an evaluator to update scores already entered into the db.  There are 7000 lines of code.   :);):D;D>:(:(:o8) ??? ::):P:-[ :-X :-\ :-* :'(

 

While creating these pages I've experienced every emoticon.

 

So....

 

The first page executes excellently. 

 

The second page gets a server not found error.....    I am sure all paths are accurate ... absolutely....  Before I post code.... Can anyone think of  a reason an UPDATE table SET $values WHERE $otherValues would return a server not found error?  Something common I have not though of? 

 

Otherwise I will post code....  I've narrowed it down to a few variables,,,,

 

Marc   

Link to comment
Share on other sites

key area of your code.

 

what you recently added when your error occured. we cant read 7000 lines.

 

That was just too simple....   Got right by me..... 

 

Let's look at this first....    The three variables are passed to the page ... that is OK....

 

 

 

 

 


Header code.....................




// Check for a valid user ID, through GET or POST.
if ( (isset($_GET['id'])) && (is_numeric($_GET['id'])) ) { // Accessed through view_users.php
$s_id = $_GET['id'];

} elseif ( (isset($_POST['student_number'])) && (is_numeric($_POST['student_number'])) ) { // Form has been submitted.
$s_id = $_POST['student_number'];
} else { // No valid ID, kill the script.
echo '<h1 id="mainhead">Page Error!!</h1>
<p class="error">This page has been accessed in error 1.</p><p><br /><br /></p>';
include ('includes/footer.html'); 
exit();
}



// Check for year through GET or POST.
if ( (isset($_GET['year'])) && (is_numeric($_GET['year'])) ) { // Accessed through view_users.php
$ye = $_GET['year'];

} elseif ( (isset($_POST['year'])) && (is_numeric($_POST['year'])) ) { // Form has been submitted.
$ye = $_POST['year'];
} else { // No valid ID, kill the script.
echo '<h1 id="mainhead">Page Error!!</h1>
<p class="error">This page has been accessed in error 2.</p><p><br /><br /></p>';
include ('includes/footer.html'); 
exit();
}


// Check for term, through GET or POST.
if ( (isset($_GET['midterm_final']))) { // Accessed through view_users.php
$mf = $_GET['midterm_final'];

} elseif ( (isset($_POST['midterm_final']))) { // Form has been submitted.
$mf = $_POST['midterm_final'];
} else { // No valid ID, kill the script.
echo '<h1 id="mainhead">Page Error!!</h1>
<p class="error">This page has been accessed in error 3.</p><p><br /><br /></p>';
include ('includes/footer.html'); 
exit();
}

    require_once ('mysql_connect_benedum.php'); // Connect to the database.





A lot of code....................




<br>
<b>Student Number</b>
<?php echo '<p>' . $s_id . '</p><br />';?>
<b>Year</b>
<?php echo '<p>' . $ye  . '</p><br />';?>
<b>Term</b>	  
<?php echo '<p>' . $mf . '</p><br />'; ?>

<input name="student_number" type="hidden" maxlength="9" value="<?php echo $s_id; ?>" />
<input name="year" type="hidden" value="<?php echo $ye; ?>" />
<input name="midterm_final" type="hidden" value="<?php echo $mf; ?>" />




A lot of code..................


 

Marc

Link to comment
Share on other sites

The wording of the error indicates in incorrect url or connection address.

 

If you post the actual error, it would help pin down what is going on.

 

I assume that you tested this code as you developed it and you must have some idea what was changed or introduced that triggered the error and what code is being executed when the error is produced.

 

It is your responsibility as the programmer to at least narrow down the problem to a small section of code, at most 20-30 lines. Otherwise you are not really going to get anyone in a Forum to take their time to try and deduce what is going on based on the non specific information provided so far.

 

xyn already asked that you check your web server log for errors. Have you done that?

Link to comment
Share on other sites

The wording of the error indicates in incorrect url or connection address.

 

If you post the actual error, it would help pin down what is going on.

 

I assume that you tested this code as you developed it and you must have some idea what was changed or introduced that triggered the error and what code is being executed when the error is produced.

 

It is your responsibility as the programmer to at least narrow down the problem to a small section of code, at most 20-30 lines. Otherwise you are not really going to get anyone in a Forum to take their time to try and deduce what is going on based on the non specific information provided so far.

 

xyn already asked that you check your web server log for errors. Have you done that?

 

 

The code I posted is part of the most recent update. Additionally, I changed the INSERT query to a UPDATE table SET query on all 45 questions.

 

I have a virtual server I am using for this ... I am searching the admin panel foe the error logs... 

 

 

The actual error is not a php output error.  It is a browser error ..... url not found ,,, page cannot ne displayed error.

 

Cannot find server or DNS Error

Internet Explorer

 

Marc 

Link to comment
Share on other sites

Thanks guys for pointing me to the error logs.

 

I resolved this.  It was actually a syntax error.  The UPDATE table SET query was lacking a few ANDs in the WHERE part.  I have WHERE variables separated by commas. 

 

 

Marc

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.