Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
960 views
in Q2A Core by

Hello friends!

I did update my server hosting to php 5.5, and i have installed and working Q2A 1.63 there, but i have a problem in header theme: there is any error: 

"Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /homepages/0/xxxxxxxxx/htdocs/qa-include/qa-db.php on line 66."

Code source in qa-db.php line 66 is the next:

if (!is_resource($qa_db_connection)) {
if (QA_PERSISTENT_CONN_DB)
$db=mysql_pconnect(QA_FINAL_MYSQL_HOSTNAME, QA_FINAL_MYSQL_USERNAME, QA_FINAL_MYSQL_PASSWORD);
else
$db=mysql_connect(QA_FINAL_MYSQL_HOSTNAME, QA_FINAL_MYSQL_USERNAME, QA_FINAL_MYSQL_PASSWORD);

 

Whats wrong there in code source??? 

THANKS!!!

Q2A version: 1.6.3

1 Answer

+1 vote
by

Issue - There is nothing wrong with the code . This is because the mysql_connect() is a depracated function . That was there in older PHP versions and in PHP 5 that is deprecated and just kept in the language for backword compactibility . 

FYI , the latest Q2A 1.7 Beta , you wont get this error anymore . The mysql are updated with mysqli . 

If you are still using the q2a 1.6 then use the below method . 

1. Openup the qa-include/qa-db.php 

2. add the below line after the liscence comment (before the actual functions starts )  
     
        error_reporting(E_ALL ^ E_DEPRECATED); 

3. This should solve your issue . 

 

Thanks 

...