Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,604 members, 7,809,194 topics. Date: Friday, 26 April 2024 at 04:23 AM

Database Error! - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Database Error! (1194 Views)

Getting Started With Firebase Realtime Database On The Web / Please How Do I Print This Data From MY Database. MYSQL, PHP (2) (3) (4)

(1) (Reply) (Go Down)

Database Error! by asadul549(m): 7:06pm On Oct 26, 2016
I recently upgraded my server php to 5.6.25 & MySQL to 5.5.49 & from then I'm getting a kind of error like this on specific page.

Warning: mysql_query(): Access denied for user 'yury97'@'localhost' (using password: NO) in /home/yury97/public_html/wp-content/themes/Avada/template-member_list.php on line 22

Warning: mysql_query(): A link to the server could not be established in /home/yury97/public_html/wp-content/themes/Avada/template-member_list.php on line 22


Warning: mysqli_fetch_object() expects parameter 1 to be mysqli_result, boolean given in /home/yury97/public_html/wp-content/themes/Avada/template-member_list.php on line 27


I also was exported my database & then delete & created new & then imported on server & set new user & pass on wp-config.php file on wordpress. My database host is now set to localhost.

What can be the solution now? Will appreciate your help. Thanks in advance!
Re: Database Error! by Whytelyon(m): 7:24pm On Oct 26, 2016
1.) Paste the code, we'll help you.

2.) if you doing this for a big company,i suggest you switch platform and don't use PHP for most industry standard apps anymore. Your code exposed a flaw for Sql injection and it's vulnerable.

If a hacker gets foothold of your site, consider yourself a goner,you've lost the contract.
Re: Database Error! by asadul549(m): 7:44pm On Oct 26, 2016
code form where?
From that template where the error is occurring?
Re: Database Error! by Whytelyon(m): 8:46pm On Oct 26, 2016
asadul549:
code form where?
From that template where the error is occurring?

Your source code that gave that error
Re: Database Error! by ANTONINEUTRON(m): 10:39pm On Oct 26, 2016
I Might Suggest U Are Using Mysql And Mysqli Together
Or Ur Connection Method Is Wrong.
Post Ur Code Here (wisely) E Go Easy To See People Wey Go Help U
Re: Database Error! by asadul549(m): 6:28pm On Oct 29, 2016
I will appreciate you guys help man. This is template source code where I'm getting error
Re: Database Error! by seunex4real: 6:44pm On Oct 29, 2016
Kindly use mysqli, you are using MySQL to query and mysqli to get results. MySQL is deprecated

Print out the error Using mysqli_error($connection). And the kill the page with die().

Also watch Out for sql injection .

Hope it helps.

1 Like

Re: Database Error! by gloryz24: 7:25pm On Oct 29, 2016
Looks like you're mixing mysql_ with mysqli_ commands and that won't work. So if you're migrating from mysql_ to mysqli_ the differnece is not just in that one one letter... It's much bigger and you should consult php mysqli documentation:
http://php.net/manual/en/book.mysqli.php
Re: Database Error! by asadul549(m): 7:41pm On Oct 29, 2016
I recently upgraded Mysql from 5.4.something to 5.5.49
Re: Database Error! by asadul549(m): 7:45pm On Oct 29, 2016
I already tried once by replacing mysqli to mysql on that template. But then it says on the page-
Re: Database Error! by asadul549(m): 8:00pm On Oct 29, 2016
sad

(1) (Reply)

Free Email And Phone Number Extractor / URGENT: I Need UDEMY Account Holder To Help With Certain Transaction In Dollars / What Programming Language Should START With?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.