Jump to content

PHP not working


Amnesia

Recommended Posts

Hi.

 

I have a website at http://www.nixonsoh.co.cc/

Username: nixonsoh

 

I have enabled php server-side parsing in CPanel.

I have included the following codes in index.php.

 

<html>

<head>

<title>PHP Test</title>

</head>

<body>

<?php echo '<p>Hello World</p>'; ?>

</body>

</html>

 

But there was no output. Page source revealed php tags still intact.

What is the problem here? Kindly advise. Thank you.

 

 

And now it prompts me to download an unknown file: application/x-httpd-php5

Link to comment
Share on other sites

byron: I added a custom parser in Apache Handler. But I have removed it already so no issues.

 

wizard: what do you mean by the encoding?

 

Right now i have just put in a very simple index.php page to test it out.

This is its content. It is basically HTML but i still received the 500 Internal Server Error.

 

<!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">

<head>

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

<title>Untitled Document</title>

</head>

 

<body>

 

asdasdasd

 

</body>

</html>

Link to comment
Share on other sites

If your not using your .htaccess file for anything, remove it and then refresh your browsers cache and check your page again.

 

i have deleted .htaccess and refreshed. but still doesn't work. its weird because i tried a project in .shtml and it worked. then i deleted everything and put in this index.php and it doesn't work anymore.

Link to comment
Share on other sites

Right now what im experiencing is that if i rename my page to index.html, the page displays perfectly.

But once i rename the SAME file with the SAME codes to index.php, then the internal server error occurs.

 

Guidance would be appreciated. Thank you!

Link to comment
Share on other sites

I'm seeing your index.php ok now except it's throwing php errors because you don't have a footer page or header page.

 

http://nixonsoh.co.cc/index.php

 

UNescalating.

 

byron thanks for the prompt reply.

it is true that i had an index including a header and footer but i have replaced that with the simple index.php with no content at all. so what should be displayed is a blank page.

 

and im still getting the error on firefox.

the amazing thing is that once i load it in IE, pressing refresh would lead to the error you described but pressing enter on the address bar would result in the internal server error.

Link to comment
Share on other sites

If you'll create the header and footer page your errors will go away. If you remove ALL of the content from the index.php then yes it should display a blank page.

 

Do a hard refresh if your still seeing the 500 error on another browser.

 

 

Link to comment
Share on other sites

  • 6 months later...
If you'll create the header and footer page your errors will go away. If you remove ALL of the content from the index.php then yes it should display a blank page.

 

Do a hard refresh if your still seeing the 500 error on another browser.

 

I don't know what you're talking about headers and footers but I'm new to php and this problem is giving me a MAJOR issue. One second, test.php works with <?php phpinfo(); ?> in it. The next second, it does not work but gives Internal Server Error. This happens after clearing cache, it even happens with an empty index.php file. I have no clue what's wrong but I think it's the file encoding since I use ubuntu linux. Please fix this issue! I cannot work with this intermittent problem. As it stands right now, it's just giving Internal Server Error and I can't get it to work again.

 

Now it's working again. No idea what's going on here. It works, then I wait and reload after awhile, it works only about 5% of the time then it just fails with Internal Server Error and I didn't even change anything. Can you please fix it? I really wanted to use this host but with python2.4 and php working only 5% of the time and no shell access, it's not proving to be an enjoyable experience.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...