problems with php on my website

lucasjnjones

New Member
Messages
7
Reaction score
0
Points
0
This issue is usually caused by a misconfigured server; if you're host is x10Hosting, submit a ticket. Otherwise, contact them. First, however, check that:

  • You are using the .php extension for your index.php file
  • Your host supports PHP
  • If you have a .htaccess file, try renaming it and trying again, to make sure it isn't causing the problem.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Have you been editing .htaccess in ~/public_html/ or ~/public_html/faq? If so, what have you done? Post the actual configuration, not just a description of what you were trying to accomplish.

You can try re-enabling PHP processing with:
Code:
AddHandler application/x-httpd-php5 .php

On an unrelated note, your script is wide-open to SQL injection. The best solution is to switch to the PDO driver and prepared statements (searching this forum or the web will provide more info).
 

ekramy

New Member
Messages
14
Reaction score
0
Points
0
@lucasjnjones :am hosting with x10hosting and i have done anything to htaccess files
@mission: i ddint do anything to htaccess files and i know about the injection attacks am just demoing the website now and can you please elaborate more on the reenabling of php processing where do i execute or use that code?
thank you both for your time
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Remove the line

AddType x-mapp-php5 .php

from your .htaccess file. Whatever/whomever put it there should not have.
And try to keep your questions in one thread.
 
Last edited:

xgreenberetx

New Member
Messages
57
Reaction score
1
Points
0
Make sure they have the php tags inside. I do not see the <?php ?> tag on the faq page. Make sure the pages have the .php extension also.
 

Twinkie

Banned
Messages
1,389
Reaction score
12
Points
0
You should give us more information. We don't know your experience with PHP, so we don't know if you are aware that you must keep your files within <?php ?> tags or that it must have a .php extention, or even that it must be on the server to be executed. Try pasting the source code of your PHP file, and the .htaccess file, with files names in the post and then we can help.
 
Last edited:

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
The linked page has an opening <?php tag, which the browser tries to parse as an HTML tag, and an extension of ".php". The page is missing a closing ?>, though that's optional.

Anyway, Bryon already solved this problem. ekramy has been cross-posting.
 
Top