Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2015-06-13 14:06:05

Otomatic
FluxBB Donor
From: Paris - France
Registered: 2010-01-26
Posts: 548
Website

PHP 7 and FluxBB

Hi,

Bonjour,
With PHP 7, mysql does not exist; you must use mysqli or PDO_MYSQL.
Moreover the constructor can not have the same name as the class, so in include\dblayer\mysqli.php replace

function DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect)

by

function __construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect)

Ce n'est pas parce que l'erreur se propage qu'elle devient vérité. Ghandi
An error does not become truth by reason of multiplied propagation. Ghandi

Offline

#2 2015-06-13 19:00:56

TigerAero
Member
From: WI, USA
Registered: 2009-02-01
Posts: 458
Website

Re: PHP 7 and FluxBB

Would you hear that? Upon arrival of PHP 7 MySQL vanished from the Earth.

Dark times are upon us.

Offline

#3 2015-06-13 19:33:51

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 1,292
Website

Re: PHP 7 and FluxBB

It's just about time MySQL is properly removed too; it's been far too on-going. I must say, that's the change I'm most pleased about.

Offline

#4 2015-06-14 08:23:39

Otomatic
FluxBB Donor
From: Paris - France
Registered: 2010-01-26
Posts: 548
Website

Re: PHP 7 and FluxBB

Hi,

https://wiki.php.net/rfc/remove_depreca … ty_in_php7
The following extensions are deprecated:
ext/mysql (since PHP 5.5; use ext/mysqli or ext/pdo_mysql instead)

https://github.com/php/php-src/blob/php … /UPGRADING
4. Deprecated Functionality
========================================
- Core
  . PHP 4 style constructors, where the constructor name is the same as the
    class name, are now deprecated.


Ce n'est pas parce que l'erreur se propage qu'elle devient vérité. Ghandi
An error does not become truth by reason of multiplied propagation. Ghandi

Offline

#5 2015-06-14 11:18:40

Studio384
Developer
From: Belgium
Registered: 2012-04-11
Posts: 681
Website

Re: PHP 7 and FluxBB

If that are the only changes that have to be maid to FluxBB to get it working for PHP 7, then I say wow, not to bad.

Offline

#6 2015-06-14 13:29:20

Otomatic
FluxBB Donor
From: Paris - France
Registered: 2010-01-26
Posts: 548
Website

Re: PHP 7 and FluxBB

Studio384 wrote:

If that are the only changes that have to be maid to FluxBB to get it working for PHP 7, then I say wow, not to bad.

Hi,

It seems that there is only this to change. Nevertheless, I have not tested everything and it is only the Alpha 1 release.


Ce n'est pas parce que l'erreur se propage qu'elle devient vérité. Ghandi
An error does not become truth by reason of multiplied propagation. Ghandi

Offline

#7 2015-06-14 19:21:13

cyberman
Member
From: Germany
Registered: 2010-01-11
Posts: 297
Website

Re: PHP 7 and FluxBB

By the way - have checked FluxBB with PHP 5.6.8, NginX and HHVM ... works like a charm!!!

Offline

#8 2015-06-16 19:14:27

eric235u
Member
From: free software land
Registered: 2008-05-10
Posts: 132
Website

Re: PHP 7 and FluxBB

Very cool!

Offline

#9 2015-06-16 19:16:50

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,548
Website

Re: PHP 7 and FluxBB


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#10 2016-01-14 10:06:36

arnaud
Member
From: Lyon, France
Registered: 2014-06-03
Posts: 32
Website

Re: PHP 7 and FluxBB

Thank you Automatic, i saw the same thing in HHVM which is compatible.


Ok, my french is down... But PHP is universal, so let's talk PHP together !

Offline

#11 2016-01-14 17:38:20

TigerAero
Member
From: WI, USA
Registered: 2009-02-01
Posts: 458
Website

Re: PHP 7 and FluxBB

Franz wrote:

Soon ™

^ Fixed. big_smile

Last edited by TigerAero (2016-01-14 17:39:33)

Offline

#12 2016-01-14 21:51:36

TheBritain
Member
Registered: 2015-12-20
Posts: 51

Re: PHP 7 and FluxBB

I am in the process of making our install PHP7 compliant. It will take some time, I am also thinking about going full ajax with the entire site.

Offline

#13 2016-01-14 21:57:22

TigerAero
Member
From: WI, USA
Registered: 2009-02-01
Posts: 458
Website

Re: PHP 7 and FluxBB

TheBritain wrote:

I am in the process of making our install PHP7 compliant. It will take some time, I am also thinking about going full ajax with the entire site.

Read up on ajax and web spiders. Tough to get the two to link up. Unless you don't mind your pages not getting indexed...idk. I ajax'ed my forum before and I went from 18k listings to 3 pages. Homepage, help page and search page LOL!

Last edited by TigerAero (2016-01-14 21:57:55)

Offline

#14 2016-01-20 02:37:01

TheBritain
Member
Registered: 2015-12-20
Posts: 51

Re: PHP 7 and FluxBB

TigerAero wrote:
TheBritain wrote:

I am in the process of making our install PHP7 compliant. It will take some time, I am also thinking about going full ajax with the entire site.

Read up on ajax and web spiders. Tough to get the two to link up. Unless you don't mind your pages not getting indexed...idk. I ajax'ed my forum before and I went from 18k listings to 3 pages. Homepage, help page and search page LOL!

Google doesn't index DOM? I thought it did. How long ago did you make that change?

Offline

#15 2016-01-20 04:27:26

TigerAero
Member
From: WI, USA
Registered: 2009-02-01
Posts: 458
Website

Re: PHP 7 and FluxBB

TheBritain wrote:
TigerAero wrote:
TheBritain wrote:

I am in the process of making our install PHP7 compliant. It will take some time, I am also thinking about going full ajax with the entire site.

Read up on ajax and web spiders. Tough to get the two to link up. Unless you don't mind your pages not getting indexed...idk. I ajax'ed my forum before and I went from 18k listings to 3 pages. Homepage, help page and search page LOL!

Google doesn't index DOM? I thought it did. How long ago did you make that change?

Honestly it was a while ago. It was about...2 years ago. Maybe a little less. It's when I learned that the spider goes off a text version of the website and only follows the links as if it was a text-based website. The spiders ignore anything script-like or anything of the nature. Hence, they can't activate the script(s) to display the text and it's all white space.

Sometimes it would catch the page that displays viewforum?id=1 (or whatever that url is) but it would display just white space. I had ajaxed the login, header, all of it. I thought it would be smart to even include the title in the website in the ajax and not as straight html (at the time.) (Rather then a header tag like I have now.)

UPDATE 1: I'm googling now and as of October 2015 they seem to be trying to address the situation, https://developers.google.com/webmaster … learn-more so this may all be moot now. But from my experience, it was baaaaad lol.

If you look at that URL, it shows exactly the output (kinda creepy LOL) that showed up the few times that google spider caught my own forum.

Last edited by TigerAero (2016-01-20 04:34:28)

Offline

#16 2016-02-11 11:19:35

Rockmohan
New member
Registered: 2016-02-11
Posts: 1

Re: PHP 7 and FluxBB

Opencart Development services  better ?
 
    Opencart iѕ bаѕеd оn PHP & MySQL dаtаbаѕе mаnаgеmеnt ѕуѕtеm.

Last edited by Rockmohan (2016-02-11 11:23:18)

Offline

#17 2017-09-21 21:34:31

lament
Member
From: San Diego, CA
Registered: 2008-05-11
Posts: 28

Re: PHP 7 and FluxBB

Hi all,

Sorry to bump an old thread, but I'm moving a 1.5.6 installation to 1.5.10 on a new host and getting this error (that PHP doesn't have mysql), but I'm not understating Otomatic's suggested fix.

Both of those lines are currently already in the standard download for 1.5.10 in /include/dblayer/mysqli.php. Thanks for any help.

	function __construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect)
	{
		$this->prefix = $db_prefix;

		// Was a custom port supplied with $db_host?
		if (strpos($db_host, ':') !== false)
			list($db_host, $db_port) = explode(':', $db_host);

		// Persistent connection in MySQLi are only available in PHP 5.3 and later releases
		$p_connect = $p_connect && version_compare(PHP_VERSION, '5.3.0', '>=') ? 'p:' : '';

		if (isset($db_port))
			$this->link_id = @mysqli_connect($p_connect.$db_host, $db_username, $db_password, $db_name, $db_port);
		else
			$this->link_id = @mysqli_connect($p_connect.$db_host, $db_username, $db_password, $db_name);

		if (!$this->link_id)
			error('Unable to connect to MySQL and select database. MySQL reported: '.mysqli_connect_error(), __FILE__, __LINE__);

		// Setup the client-server character set (UTF-8)
		if (!defined('FORUM_NO_SET_NAMES'))
			$this->set_names('utf8');

		return $this->link_id;
	}
	
	
	function DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect)
	
	{
		$this->__construct($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect);
	}


	function start_transaction()
	{
		return;
	}


	function end_transaction()
	{
		return;
	}

Can someone explain what I need to do? Thanks!

edit: changed $db_type = 'mysql_innodb'; in the config. All good. Thanks!

Last edited by lament (2017-09-21 21:39:39)

Offline

Board footer

Powered by FluxBB