Need a little help

O

OzatuZana

Guest
I found this nice looking login page [Website] and I follows each steps careful but still shows error.
Code:
[09-May-2019 16:01:20 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /home/dhruboz/Indokagure/form-login/config.php:2
Stack trace:
#0 /home/ozatuzana/Indokagure/form-login/login.php(2): include()
#1 {main}
  thrown in /home/ozatuzana/Indokagure/form-login/config.php on line 2

Can some please please tell me, what is the issue ?

Website: https://indokagure.com/form-login/login.php
https://indokagure.com

Pass + username is: admin
 
Last edited by a moderator:

vilaseca

Member
Nov 16, 2018
71
74
18
I found this nice looking login page [Website] and I follows each steps careful but still shows error.
Code:
[09-May-2019 16:01:20 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /home/dhruboz/Indokagure/form-login/config.php:2
Stack trace:
#0 /home/ozatuzana/Indokagure/form-login/login.php(2): include()
#1 {main}
  thrown in /home/ozatuzana/Indokagure/form-login/config.php on line 2

Can some please please tell me, what is the issue ?

Website: https://indokagure.com/form-login/login.php
https://indokagure.com

Pass + username is: admin
I need to see the code in config.php and login.php
 
  • Like
Reactions: tanierlyons
O

OzatuZana

Guest
I need to see the code in config.php and login.php
I used same codes as the tuition
Code:
<?php
mysql_connect ('localhost', ozatuzana_login', 'ozatuzana_login'); // adjust it with your mysql password and username
mysql_select_db ('ozatuzana_login'); // the name of the database that we use you
?>
 

tanierlyons

Well-known member
Staff member
Administrative
Moderator
May 24, 2018
75,198
111,758
120
@Tomz
There is none
open and add this
PHP:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
 

vilaseca

Member
Nov 16, 2018
71
74
18
I used same codes as the tuition
Code:
<?php
mysql_connect ('localhost', ozatuzana_login', 'ozatuzana_login'); // adjust it with your mysql password and username
mysql_select_db ('ozatuzana_login'); // the name of the database that we use you
?>
Try this:


PHP:
<?
function conexion_bd()
{
   $result = mysql_connect("localhost", "user", "password")  or die ("Error al conectar");
   //mysql_set_charset('utf8', $result);
   mysql_query ("SET NAMES 'utf8'");
   if (!$result)
      return false;
   if (!mysql_select_db("name_of_DB",$result))
      return false;

   return $result;
}

?>

Check the username and password on your host.
 
  • Like
Reactions: tanierlyons
O

OzatuZana

Guest
Try this:


PHP:
<?
function conexion_bd()
{
   $result = mysql_connect("localhost", "user", "password")  or die ("Error al conectar");
   //mysql_set_charset('utf8', $result);
   mysql_query ("SET NAMES 'utf8'");
   if (!$result)
      return false;
   if (!mysql_select_db("name_of_DB",$result))
      return false;

   return $result;
}

?>

Check the username and password on your host.
Did not worked

Here is the codes if you want
https://indokagure.com/form-login.zip
 

TassieNZ

Premium Uploader and Sometimes Hacker!
Jan 17, 2019
9,017
19,812
120
New Zealand
@OzatuZana

I presume in the download link you posted, you have removed all the personal data? If you want to PM me the actual files and tell me the database name you created, I'll have a look at it for you.

I need to see exactly what is in your config.php so I can see where it is wrong!

TassieNZ
 
Last edited:
  • Like
Reactions: tanierlyons
E

EvilRocks

Guest
Hi @OzatuZana

If you get this error on a new hosting with PHP 7.0, then you are using deprecated libraries.
mysql_connect — Open a connection to a MySQL Server
Warning
This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used.

More here: http://php.net/manual/en/function.mysql-connect.php

Simplest solution:
Downgrade your PHP version below the 7.0.

Hardest solution:
Transform the PHP code to use MySQLi or PDO_MySQL extension.
 
  • Like
Reactions: tanierlyons

SharkTanker

Tech Guru
Trusted Uploader
Oct 30, 2018
388
648
93
corporatehitech.com.au
I found this nice looking login page [Website] and I follows each steps careful but still shows error.
Code:
[09-May-2019 16:01:20 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /home/dhruboz/Indokagure/form-login/config.php:2
Stack trace:
#0 /home/ozatuzana/Indokagure/form-login/login.php(2): include()
#1 {main}
  thrown in /home/ozatuzana/Indokagure/form-login/config.php on line 2

Can some please please tell me, what is the issue ?

Website: https://indokagure.com/form-login/login.php
https://indokagure.com

Pass + username is: admin
Hello,

I can see you're having some issues, I would love to help but I hate back and forth messages for days, especially that I am very busy these days. Just send me logins and links and tell me the story in full and I will fix it.

Give me Cpanel too if you can. Send it via private message. If you're worried, speak to your hosting provider to create a 2nd Cpanel acc with limited access for me.
 
O

OzatuZana

Guest
Hello,

I can see you're having some issues, I would love to help but I hate back and forth messages for days, especially that I am very busy these days. Just send me logins and links and tell me the story in full and I will fix it.

Give me Cpanel too if you can. Send it via private message. If you're worried, speak to your hosting provider to create a 2nd Cpanel acc with limited access for me.
I will send you the things you needed
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu