Jump to content


Photo

Error 500 on files connecting to MySQL DB

php MySQL error500 database

  • Please log in to reply
7 replies to this topic

#1 mishra

mishra

    Newbie

  • Members
  • 2 posts

Posted 05 August 2019 - 03:34 PM

My domain is www.madhusudanmishra.in. All index.php files are working fine but when files which have to make connection with the database are called it shows error 500.

 

For eg: www.madhusudanmishra.in/register is working fine but when someone tries to make a login attempt (file signin.php works) and shows error 500.

 

All php file permissions are set to 644 as well as db user has all privilege given. 

 

The same works fine on the localhost xampp. Please help and thanks in advance.

 

 



#2 Luigi123

Luigi123

    Rank X Member

  • Moderators
  • 1,843 posts
  • Gender:Male
  • Location:Winnipeg, Manitoba, Canada

Posted 05 August 2019 - 04:43 PM

Moved to Customer Service.
Posted ImagePosted ImagePosted Image
Posted ImagePosted ImagePosted Image

#3 qsgt

qsgt

    Rank II Member

  • Members
  • PipPip
  • 83 posts
  • Gender:Male

Posted 05 August 2019 - 07:21 PM

Without posting your password, please share the code you are using to connect to your database.

#4 mishra

mishra

    Newbie

  • Members
  • 2 posts

Posted 06 August 2019 - 12:59 AM

<?php
 
$dbServername = "localhost";
$dbUsername = "msm_admin";
$dbPassword = "db pass";
$dbName = "msm_loginsystem";
 
$conn = mysqli_connect($dbServername, $dbUsername, $dbPassword, $dbName);
 
trial login credentials: username > madhusudan 
pass > test@123


#5 qsgt

qsgt

    Rank II Member

  • Members
  • PipPip
  • 83 posts
  • Gender:Male

Posted 06 August 2019 - 04:34 AM

Your PHP database connection statement looks OK to me. Additionally, my login attempt did not generate a 500 error. I did notice that your signup page sent me to https://www.madhusud.../signup.inc.php and displayed an "Email not sent" message though. 



#6 sohamb03

sohamb03

    Rank VIII Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 762 posts
  • Gender:Male
  • Location:India
  • Interests:Web Designing

Posted 06 August 2019 - 08:50 AM

Yeah same here @qsgt. Yesterday when I was trying to login on his site it showed the 500 error. However that didn't happen today.

Rather I too encountered the 'Mail not sent' error.

Sayan Bhattacharyya


#7 flazepe

flazepe

    Rank IX Member

  • Moderators
  • 967 posts
  • Gender:Male

Posted 06 August 2019 - 11:55 AM

It's 500, not 505. I got it too. Now it's saying "Mail not sent" which is presumably better.

#8 sohamb03

sohamb03

    Rank VIII Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 762 posts
  • Gender:Male
  • Location:India
  • Interests:Web Designing

Posted 06 August 2019 - 12:33 PM

Sorry... Corrected that in my previous post. That happened due to my mobile's keyboard auto-fill. The error was '500 server gone wild'.

Sayan Bhattacharyya






Also tagged with one or more of these keywords: php, MySQL, error500, database

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users