Jump to content

Thanks everyone got all server running detail here <<<< cheers


Recommended Posts

 

 

I was programming away in php and i got a http 500 error the browser

went blank and showed a defult missing looking page, i got really streesed out

i thort not agin dam servers............

 

Each time i went to the page i was working on i could not access the page

the browser was telling me that the page does not exist, but i just wrote a

program on the page what going on , i looked on the net to see the solution

to fix this error 500 internal,

 

i had no luck at all so i looked in the apache log and access log and to

my amazement the log told me that my ip was so so but it wassent i also

was told i got a directory in htdocs called myphptag but i havent i was

more then unhappy, what do i do.....

 

I thort this issint correct, all the servers are new, all the os are

fresh and they all work fine,,,,,

 

then i relized the error only happen if there was a mysql_connection on that page

that the broser erroring on..

i thort that weried.......... 

 

 

i continued to look at all the apache settings and php configs they were all ok

i thort there must be a bug here for god sake..........

 

 

i continued to search the net and finally got

the below solution it was ie in the end.........

 

the point off the post is to warn others it might not be your server or php config

could just be simple ie browser........

 

 

what the error looked like..............

 

//////your apache error log will look like this//////

 

[sun Oct 14 21:34:14 2007] [error] [client 85.255.120.130] File does not exist:

C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/MyPHPTag,

referer: http://your-url.com/MyPHPTag/

 

///////Even theo in the htdocs there issint no folder myphptag////////////

 

////even the ip wont be yours above weried ha //////////////////

 

 

 

//// your apache server access log will look simular to this ///////

 

127.0.0.1 - - [14/Oct/2007:22:22:31 +0100] "GET /server_test.php HTTP/1.1" 200 4530

127.0.0.1 - - [14/Oct/2007:22:22:49 +0100] "GET /server_test.php HTTP/1.1" 500 167

127.0.0.1 - - [14/Oct/2007:22:22:50 +0100] "GET /server_test.php HTTP/1.1" 500 167

127.0.0.1 - - [14/Oct/2007:22:23:01 +0100] "GET /server_test.php HTTP/1.1" 200 4576

127.0.0.1 - - [14/Oct/2007:22:23:29 +0100] "GET /server_test.php HTTP/1.1" 500 181

127.0.0.1 - - [14/Oct/2007:22:23:37 +0100] "GET /server_test.php HTTP/1.1" 200 4618

 

 

Fixing the problam..........

 

 

Go in to ie and choose

tools>>internet options >> advanced settings and

untick the checkbox for " show frendly http error message"

 

the problam all gon now and yes apache and php run fine and

mysql run fast thank god on the new servers.......

 

just think it took me hours trying all diffrent os from windows and others i

continue to get the 500 error now finally solved.....

 

thank god to the net .........

Sorry didnt post my code for overs to

update there new external database for test the insert of new records......

 

 

Each time you refresh the page your get a new entry to the external database

this shows that it working and alls ok......

 

<?php

$db=mysql_connect("your ip","root","your password");
mysql_select_db("test",$db);

$name=mysql_real_escape_string($_POST['name']);
$id=mysql_real_escape_string($_POST['id']);

$id=rand(0,15);

$a=array("tom","petter","paul");

shuffle($a);

foreach($a as $name){

$name=$name;
}

$query2="INSERT INTO `members`(id,name) values('$id','$name')";
$result2=mysql_query($query2);

$query3="SELECT * FROM `members`";
$result3=mysql_query($query3);

while($rec3=mysql_fetch_assoc($result3)){

echo "<br><br> Id: ".$rec3['id']." <br><BR> Name: ".$rec3['name']."<br><br> ";

}
?>

 

 

create the following database ....

 


create database test;

use test;

create table members(id int not null,name varchar(30) not null);

 

now just refresh the page and your see a new entry

on your new external database each time........

 

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.