Log In · Register

 
php is giving me 500 error
Maccabee
post Aug 29 2009, 06:17 PM
Post #1


Senior Member
*******

Group: Official Designer
Posts: 5,880
Joined: Nov 2007
Member No: 593,382



Im not sure why, but the php isnt working on my site. the other php page son my site are working but this page isnt if I name it index.html it works but not index.php. It shows the 500 error. But php displays html just like html pages do.

So whats wrong? its at josephbcohen.com. Ill be trying to fix it.
 
 
Start new topic
Replies (1 - 11)
Maccabee
post Aug 29 2009, 08:36 PM
Post #2


Senior Member
*******

Group: Official Designer
Posts: 5,880
Joined: Nov 2007
Member No: 593,382



bump. Its working on my localhost but not on my server. Is it my servers fault?
 
mipadi
post Aug 29 2009, 09:05 PM
Post #3


Senior Member
******

Group: Administrator
Posts: 2,648
Joined: Apr 2008
Member No: 639,265



QUOTE(jcp @ Aug 29 2009, 09:36 PM) *
bump. Its working on my localhost but not on my server. Is it my servers fault?

Probably help if showed the error or the code for your script. I went to your URL but all I saw was a blank page.
 
Maccabee
post Aug 29 2009, 10:33 PM
Post #4


Senior Member
*******

Group: Official Designer
Posts: 5,880
Joined: Nov 2007
Member No: 593,382



I have set an index.php. I havnt gotten any errors. The reason it is blank is because I made a custom 500 error page then deleted it. Ill show you a screenshot of the file directory when i get back to my computer.
 
Maccabee
post Aug 29 2009, 10:47 PM
Post #5


Senior Member
*******

Group: Official Designer
Posts: 5,880
Joined: Nov 2007
Member No: 593,382




ill change the 500 error page so you can see.
do you know how to get the default one? I believe a 500 error is something about a server issue.
 
mipadi
post Aug 29 2009, 11:13 PM
Post #6


Senior Member
******

Group: Administrator
Posts: 2,648
Joined: Apr 2008
Member No: 639,265



QUOTE(jcp @ Aug 29 2009, 11:33 PM) *
I have set an index.php. I havnt gotten any errors. The reason it is blank is because I made a custom 500 error page then deleted it. Ill show you a screenshot of the file directory when i get back to my computer.

An HTTP 500 error indicates a server-side error. You got that because there was something wrong with your PHP script.
 
Maccabee
post Aug 29 2009, 11:37 PM
Post #7


Senior Member
*******

Group: Official Designer
Posts: 5,880
Joined: Nov 2007
Member No: 593,382



Should I show you the index.php code and the includes?
Well i will...

index.php:
CODE
<?php $title = "Joseph Cohen";
$description = "The website of Freelancer, Joseph Cohen.";
$keywords = "Joseph, Cohen, Joseph Cohen, Freelance, web, graphic, design, programming, social, jewsih, teenager";
include("includes/header.php");
?>
<center><br><br><br><img src="images/splash.png">
<br><a style="cursor:default;" href="#"><img border="0" src="images/noenter.png"></a></center>

<?php include("includes/footer.php"); ?>


header.php:
CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<title><?php echo $title; ?></title>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<meta name="description" content="<?php echo $description ?>" />

<meta name="keywords" content="<?php echo $keywords ?>" />

<link rel="shortcut icon" href="/images/favicon.ico" />

<link rel="stylesheet" type="text/css" href="/stylesheet.css" />

</head>

<body>


footer.php:
CODE
</body></html>
 
synapse
post Aug 30 2009, 02:21 AM
Post #8


Live long and prosper.
********

Group: Staff Alumni
Posts: 10,142
Joined: Apr 2007
Member No: 514,926



500 is an Internal Server Error, have you made an .htaccess file? Are your error pages noted in that, since I don't think you can just add them the same way you do for normal site pages. I've never used php but maybe this info has to be the first thing on the index.php page...

CODE
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
Maccabee
post Aug 30 2009, 05:53 PM
Post #9


Senior Member
*******

Group: Official Designer
Posts: 5,880
Joined: Nov 2007
Member No: 593,382



There is an .htaccess file.

Any other takers?
 
allvanishing
post Aug 30 2009, 10:14 PM
Post #10


simple and clean...
****

Group: Official Designer
Posts: 149
Joined: Nov 2006
Member No: 478,009



Check what the .htaccess contains. It might be set to show that page.
 
Maccabee
post Aug 30 2009, 10:44 PM
Post #11


Senior Member
*******

Group: Official Designer
Posts: 5,880
Joined: Nov 2007
Member No: 593,382



its just blank.
 
medic
post Aug 31 2009, 05:59 AM
Post #12


Seoul Rocks!
*****

Group: Member
Posts: 936
Joined: Jun 2005
Member No: 155,811



Was the script working before hand?

If other PHP pages are working correctly then it's more than likely not a server side error in general. Did you do any updating to the script that would have caused this issue? Also, check with BlueHost to see if they did any PHP updates to your server.
 

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: