server error 500 PLEASE HELP

Status
Not open for further replies.

johnlewi

New Member
Messages
5
Reaction score
0
Points
1
This is my websie http://testingoutmyscript.x10host.com/ . When i try register and then login, it loggs me in but it comes up with server error 500. i hvae tried many scripts but it still comes up with server error 500. It has never happened to me before but suddenly when i try do it after 2months it started happening. There is nothing wrong with my scripts, i have got them checked by many others. so please, can you tell me whats wrong, before i decide moving on to a better hosting server.

Regards,

Mascot.
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
it loggs me in but it comes up with server error 500
if a x10hosting's free-hosting server finds something in one of your [ .htaccess ] files it does not like - it throws a [ 500 Internal Server Error ] - try renaming your [ .htaccess ] file(s) to test if this is the case. This error could also be related to a PHP error and is commonly caused by older out of date scripts.

you might need help by a Admin to find what the issue with your code is
 

johnlewi

New Member
Messages
5
Reaction score
0
Points
1
if a x10hosting's free-hosting server finds something in one of your [ .htaccess ] files it does not like - it throws a [ 500 Internal Server Error ] - try renaming your [ .htaccess ] file(s) to test if this is the case. This error could also be related to a PHP error and is commonly caused by older out of date scripts.

you might need help by a Admin to find what the issue with your code is


How can i get help with an admin? what do i do to come in contact with them
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi,

The error message you are seeing indicates that your PHP script is completing without returning a response. Please check your PHP script for potential problems. Enabling error reporting on your account might help with this. ;)

Thank you,
 

johnlewi

New Member
Messages
5
Reaction score
0
Points
1
Hi,

The error message you are seeing indicates that your PHP script is completing without returning a response. Please check your PHP script for potential problems. Enabling error reporting on your account might help with this. ;)

Thank you,

This is the error im getting now when logging in, :
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/tstin185/public_html/includes/db_connect.php on line 8

in db connect :

<?php
$mysql_server = "localhost";
$mysql_user = "******";
$mysql_password = "*****";
$mysql_database = "******";


$connection = mysql_connect("$mysql_server","$mysql_user","$mysql_password") or die ("Sorry we are having some problems with the server!");
$db = mysql_select_db("$mysql_database") or die ("Sorry we are having some problems with the server!");


?> ( THIS IS LINE 8 )
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi,

Deprecated warnings should not stop the script from executing, and it purely serves as a warning. This should not be interrupting your script. ;)

Thank you,
 

johnlewi

New Member
Messages
5
Reaction score
0
Points
1
still unsure what server error 500 is caused by, i need an admin to fix my code or sort it out :(
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi,

Thank you for the private message. The issue here is that your PHP script is ending without returning any response. When you see the "Server Error", you are actually seeing this as a replacement for the blank page that would have been sent by your script instead.

We are a hosting provider, and although we are happy to help with issues related to x10Hosting, we cannot fix your script for you.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
Blank lines count. Line 8 is the line where you try to use mysql_connect(). Since that's deprecated in PHP 5.5, you are getting a deprecation warning at that point. (Note that the mysql_xxxx() stuff is gone altogether in PHP 7, which will be the next version used.) You can turn off warnings using error_reporting(); see the PHP documentation for the syntax to use.
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
In your PHP script that is throwing the warning - you could add the line below to the top of it (i.e. line #1) to change the error reporting.
[ error_reporting(E_ALL & ~(E_DEPRECATED|E_NOTICE)); ] ( without the [ ])

BUT
as said above "Deprecated warnings should not stop the script from executing"
 
Last edited:

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
They will if they're generated before the headers have been sent.
 
Status
Not open for further replies.
Top