Highlighted

Adobe Dreamweaver CS6 - MySQLi Server Behaviors

Community Beginner ,
Apr 13, 2018

Copy link to clipboard

Copied

Hello,

I can use this extension:

http://www.webassist.com/dreamweaver-extensions/mysqli

in Adobe Dreamweaver CS6 to cancel this error:

01.png

???

Thank you!

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

Yes.  Use the MySQLi (improved) extension to replace the current connection code.

It will look something like this.

<?php require_once('Connections/myConnect_i.php'); ?>

<?php require_once('webassist/mysqli/rsobj.php'); ?>

TOPICS
How to

Views

4.8K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Adobe Dreamweaver CS6 - MySQLi Server Behaviors

Community Beginner ,
Apr 13, 2018

Copy link to clipboard

Copied

Hello,

I can use this extension:

http://www.webassist.com/dreamweaver-extensions/mysqli

in Adobe Dreamweaver CS6 to cancel this error:

01.png

???

Thank you!

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

Yes.  Use the MySQLi (improved) extension to replace the current connection code.

It will look something like this.

<?php require_once('Connections/myConnect_i.php'); ?>

<?php require_once('webassist/mysqli/rsobj.php'); ?>

TOPICS
How to

Views

4.8K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 13, 2018 0
Adobe Community Professional ,
Apr 13, 2018

Copy link to clipboard

Copied

Yes.  Use the MySQLi (improved) extension to replace the current connection code.

It will look something like this.

<?php require_once('Connections/myConnect_i.php'); ?>

<?php require_once('webassist/mysqli/rsobj.php'); ?>

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 13, 2018 0
Community Beginner ,
Apr 27, 2018

Copy link to clipboard

Copied

Does the site work even with this error?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 27, 2018 0
Adobe Community Professional ,
Apr 27, 2018

Copy link to clipboard

Copied

Ideally you should change your code. In the meantime you can try adding the following to the top of the page and fingers crossed that the site will still work.

<?php error_reporting( E_ALL ^ E_DEPRECATED ); ?>

Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 27, 2018 0
Community Beginner ,
Apr 28, 2018

Copy link to clipboard

Copied

What does this code mean?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2018 0
Adobe Community Professional ,
Apr 28, 2018

Copy link to clipboard

Copied

It tells your server to report all errors except deprecated error warnings.

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2018 0
Community Beginner ,
Apr 28, 2018

Copy link to clipboard

Copied

So it will not display errors?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2018 0
Adobe Community Professional ,
Apr 28, 2018

Copy link to clipboard

Copied

It will not display the   "mysql_pconnect() is deprecated" warnings "  but that's not 100% reliable if your server does not support old MySQL.   Going forward, you must learn to code in PDO or MySQLi.

Below is a script that connects to your database with MySQLi.  Change values in bold as required.

<?php

$con = mysqli_connect("localhost","username","password","database");

// Check connection

if (mysqli_connect_errno())

  {

  echo "Failed to connect to MySQL: " . mysqli_connect_error();

        }

        else echo "Successfully connected, happy coding!"

?>

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2018 0
Community Beginner ,
Apr 28, 2018

Copy link to clipboard

Copied

My connection file looks like this:

<? php

# FileName = "Connection_php_mysql.htm"

# Type = "MYSQL"

# HTTP = "true"

$ hostname_site_d = "localhost";

$ database_site_d = "site_avancado";

$ username_site_d = "root";

$ password_site_d = "";

$ site_d = mysql_pconnect ($ hostname_site_d, $ username_site_d, $ password_site_d) or trigger_error (mysql_error (), E_USER_ERROR);

?>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2018 0
Adobe Community Professional ,
Apr 28, 2018

Copy link to clipboard

Copied

MySQL connections are outdated code.   You should no longer use them.

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2018 0
Community Beginner ,
Apr 28, 2018

Copy link to clipboard

Copied

To make no mistake, just change the connection archiving?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2018 0
Adobe Community Professional ,
Apr 28, 2018

Copy link to clipboard

Copied

Copy & paste this code into a new PHP file and save as test.php

<?php

$con = mysqli_connect("localhost","root","","site_avancado");

// Check connection

if (mysqli_connect_errno())

  {

  echo "Failed to connect to MySQL: " . mysqli_connect_error();

        }

        else echo "Successfully connected, happy coding!"

?>

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2018 0
Community Beginner ,
Apr 28, 2018

Copy link to clipboard

Copied

It worked ...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2018 0
Adobe Community Professional ,
Apr 28, 2018

Copy link to clipboard

Copied

Glad it worked.  Now read up on MySQLi (improved).

'MySQLi' for Beginners - Codular

php mysqli tutorial for beginners with example source code

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2018 0
Adobe Community Professional ,
Apr 28, 2018

Copy link to clipboard

Copied

If you're still seeing errors, it's because the old MySQL code cannot be mixed with newer MySQLi code.

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2018 0