The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Warnings, PHP accessing a database
tudsy
post Oct 12 2015, 07:31 PM
Post #1


Advanced Member
****

Group: Members
Posts: 166
Joined: 30-September 14
Member No.: 21,611



Hi

I am trying to use php to access a database and get these warnings:



Warning: mysql_query(): Headers and client library minor version mismatch. Headers:50540 Library:100017 in /home/ecovibdc/public_html/ECOVIB2D/subscribe/confirm.php on line 8

Warning: mysql_query(): Access denied for user 'root'@'localhost' (using password: NO) in /home/ecovibdc/public_html/ECOVIB2D/subscribe/confirm.php on line 8

Warning: mysql_query(): A link to the server could not be established in /home/ecovibdc/public_html/ECOVIB2D/subscribe/confirm.php on line 8

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/ecovibdc/public_html/ECOVIB2D/subscribe/confirm.php on line 9
You are trying to confirm an invalid comment.

Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50540 Library:100017 in /home/ecovibdc/public_html/ECOVIB2D/subscribe/capture.php on line 33
Access denied for user 'ecovibdc_Tudsy99'@'localhost' to database 'ecovibdc_Subscribers'


Any help would be appreciated.


Adrian T


Attached File(s)
Attached File  capture.php ( 3.71k ) Number of downloads: 190
Attached File  confirm.php ( 780bytes ) Number of downloads: 161
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
masonh928
post Oct 12 2015, 07:53 PM
Post #2


Serious Coder
*****

Group: Members
Posts: 250
Joined: 17-August 13
From: Indiana
Member No.: 19,570



don't use mysql_*() functions. PHP 5.5 deprecated, removed in PHP 7 upcoming.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
tudsy
post Oct 12 2015, 07:59 PM
Post #3


Advanced Member
****

Group: Members
Posts: 166
Joined: 30-September 14
Member No.: 21,611



QUOTE(masonh928 @ Oct 13 2015, 10:23 AM) *

don't use mysql_*() functions. PHP 5.5 deprecated, removed in PHP 7 upcoming.



Hi


Thanks for that.

What do I use instead of MySQL_*()?

Thanks.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
masonh928
post Oct 14 2015, 10:02 PM
Post #4


Serious Coder
*****

Group: Members
Posts: 250
Joined: 17-August 13
From: Indiana
Member No.: 19,570



PDO or MySQLi... I recommend PDO! tongue.gif

Get started here! http://php.net/manual/en/book.pdo.php
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
tudsy
post Oct 17 2015, 11:16 PM
Post #5


Advanced Member
****

Group: Members
Posts: 166
Joined: 30-September 14
Member No.: 21,611



QUOTE(masonh928 @ Oct 15 2015, 12:32 PM) *

PDO or MySQLi... I recommend PDO! tongue.gif

Get started here! http://php.net/manual/en/book.pdo.php



Hi

Thanks for that.
I was wondering. What is this error >


Fatal error: Non-static method PDO::query() cannot be called statically in /home/ecovibdc/public_html/ECOVIB2D/subscribe/confirm.php on line 8

My knowledge of PDO is limited.

Thanks.

Adrian T


Attached File(s)
Attached File  confirm.php ( 794bytes ) Number of downloads: 132
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
tudsy
post Oct 19 2015, 12:33 AM
Post #6


Advanced Member
****

Group: Members
Posts: 166
Joined: 30-September 14
Member No.: 21,611



Problem solved. rolleyes.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd February 2019 - 11:47 PM