Topic: mysql_connect() to be replaced with mysql, how?

Hi,

I just upgraded from 1.4 to 1.4.4 (run on a PHP 5.6). I still get the

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead 

What do I need to change and how? I've googled and I've searched here, but nothing related to punk. Must be some lousy searcher I am. sO now this post. Pls help.

btw, what extension is used here that shows the nice buttons for bold, italic etc when posting?

Re: mysql_connect() to be replaced with mysql, how?

config.php:

$db_type = 'mysql';

-->

$db_type = 'mysqli';

Changelog for mysql: http://php.net/manual/en/changelog.mysql.php

ForkBB
I speak only Russian  :P

Re: mysql_connect() to be replaced with mysql, how?

btw, what extension is used here that shows the nice buttons for bold, italic etc when posting?

pun_bbcode
http://punbb.informer.com/extensions/

Re: mysql_connect() to be replaced with mysql, how?

Visman wrote:

config.php:

$db_type = 'mysql';

-->

$db_type = 'mysqli';

I did that but still get the same error

5 (edited by PanBB.Ru 2016-11-09 06:30)

Re: mysql_connect() to be replaced with mysql, how?

you update the database after the upgrade?

your-forum.com/admin/db_update.php

Re: mysql_connect() to be replaced with mysql, how?

PanBB.Ru wrote:

you update the database after the upgrade?

your-forum.com/admin/db_update.php

Yes. www.hotsailsmaui.com/forum/

Re: mysql_connect() to be replaced with mysql, how?

This is my config. no usr/pwd/hostnames of course smile

<?php

$db_type = 'mysqli';
$db_host = 'mysqldomainname.com';
$db_name = 'mydbname';
$db_username = 'myuser';
$db_password = 'mypwd';
$db_prefix = 'bb_';
$p_connect = true;

$base_url = 'http://mydomain.com/forum';

$cookie_name = 'punbb_cookie';
$cookie_domain = '';
$cookie_path = '/';
$cookie_secure = 0;

define('FORUM', 1);

8 (edited by PanBB.Ru 2016-11-09 10:15)

Re: mysql_connect() to be replaced with mysql, how?

why the connection is true? I have forums like this:

$db_type = 'mysqli';
$db_host = 'localhost';

== //  ==

$p_connect = false;

Re: mysql_connect() to be replaced with mysql, how?

For mysql there is no difference between $p_connect = true and false.

ForkBB
I speak only Russian  :P

10

Re: mysql_connect() to be replaced with mysql, how?

No ideas what might be wrong?

11

Re: mysql_connect() to be replaced with mysql, how?

What error at the moment?

ForkBB
I speak only Russian  :P

12

Re: mysql_connect() to be replaced with mysql, how?

Still the same connection warning regwrding mysql_connect() vs mysqli. And I also have a deprecation error in the posts, regarding the #e parameter

13 (edited by PanBB.Ru 2016-11-09 21:35)

Re: mysql_connect() to be replaced with mysql, how?

In what file this error?
In the file mysqli.php such a function does not exist. Maybe this error comes from the extension?

14

Re: mysql_connect() to be replaced with mysql, how?

Still the same connection warning regwrding mysql_connect() vs mysqli.

In what file this error?
In the file mysqli.php such a function does not exist. Maybe this error comes from the extension?

-----------------------

And I also have a deprecation error in the posts, regarding the #e parameter

It is necessary to update expansions which add new bb-codes for v 1.4.4.

ForkBB
I speak only Russian  :P

15 (edited by nicky6 2016-11-10 22:21)

Re: mysql_connect() to be replaced with mysql, how?

It happens during connection, so I guess it's the config.php, and that has been updated with dbtype = mysqli

Regarding "e#", all extensions are updated. I get the following message:

Warning: preg_replace_callback(): Modifier /e cannot be used with replacement callback in /home/hotsailsmauishop/hotsailsmaui.com/forum/include/parser.php on line 811

Re: mysql_connect() to be replaced with mysql, how?

Your list extensions?

17

Re: mysql_connect() to be replaced with mysql, how?

pun_tags
pun_poll
private messages
posts rss feed
post karma
last topic title
jquery
fancy video tag
fancy stop spam
fancy similar topics
fancy link icons
fancy query addons
fancy image
fancy alerts
bcode buttons
attahment

18 (edited by PanBB.Ru 2016-11-11 08:54)

Re: mysql_connect() to be replaced with mysql, how?

fancy video tag
private messages

Here are these two extensions may be a problem with the modifier. Disconnect see whether the problem has been resolved?

19

Re: mysql_connect() to be replaced with mysql, how?

It was the fancy videotag! Thanks!

Still haven't been able to get rid of the database connection error though.

20

Re: mysql_connect() to be replaced with mysql, how?

I see now it's possibly man old connection string from the original website that is messing up.

In what file is the db-connection functions for the forum?