We help IT Professionals succeed at work.
Get Started

What is replacement syntax for:  "Deprecated: mysql_pconnect(): The mysql extension is deprecated"

Larry Biederman
Last Modified: 2015-03-28
Hi Experts,
I am new to php and mySQL.

I am using Dreamweaver CS6 with Apache/2.4.9 (Win64) PHP/5.5.12 and MySQL  5.6.17.
When I run the webpage I receive this error:
"Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\wamp\www\holland2\Connections\holland.php on line 9".

It seems mysql_pconnect() needs to be replaced with mysqli or PDO syntax after php 5.0.
The syntax needs to be replaced in 2-3 lines in index.php and holland.php.
Apparently my versions of php and mySQL are mismatched.

Both files are attached, as well as the screen with the error.
Can you please show me the full replacement lines of code?

Thanks so much,
Watch Question
Fixer of Problems
Most Valuable Expert 2014
This problem has been solved!
Unlock 6 Answers and 13 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE