Forums

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

You are not logged in.

#1 2020-09-04 01:19:31

Recognition
Member
From: Toronto, Canada
Registered: 2017-01-20
Posts: 79
Website

Deprecated: Function create_function() is deprecated HELP

I migrated my board mostly successfully except I'm getting this error, any idea why?

Deprecated: Function create_function() is deprecated in /homepages/39/d701392084/htdocs/discuss/include/parser.php on line 850

As far as I know I updated the  base url properly both in config.php and the phpmyadmin on my new host when I moved to it. Is it because its a different PHP version on the server maybe? How could I fix this possibly??!?!?!

Hmm...

v1.5.10 is my version and PHP version is 7.3 and I've tried 7.4

I started also getting
Warning: Cannot modify header information - headers already sent by (output started at /homepages/39/d701392084/htdocs/discuss/include/common.php:76) in /homepages/39/d701392084/htdocs/discuss/header.php on line 30

after I changed the php version in cpanel

Last edited by Recognition (2020-09-04 01:27:42)

Offline

#2 2020-09-04 01:30:48

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,476
Website

Re: Deprecated: Function create_function() is deprecated HELP

Offline

#3 2020-09-04 02:05:05

Recognition
Member
From: Toronto, Canada
Registered: 2017-01-20
Posts: 79
Website

Re: Deprecated: Function create_function() is deprecated HELP

Also getting this on pm inbox lol Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/39/d701392084/htdocs/discuss/pms_inbox.php on line 28

Offline

#4 2020-09-04 02:10:37

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,476
Website

Re: Deprecated: Function create_function() is deprecated HELP

> /homepages/39/d701392084/htdocs/discuss/pms_inbox.php on line 28
Address the question in the topic of this modification.
P.S. If the author is still visiting this site.

Offline

#5 2020-09-04 14:57:04

Recognition
Member
From: Toronto, Canada
Registered: 2017-01-20
Posts: 79
Website

Re: Deprecated: Function create_function() is deprecated HELP

Im gonna reinstall the site using my backed up db in phpmyadmin and see what happens. I'll set php 7.2 before I install. Maybe that will work and I wont need this. I dont know. So confused. I had no issues on my old host


Because after your fix I started getting this

Fatal error: Uncaught Error: Call to undefined function generate_smiley_cache() in /homepages/39/d701392084/htdocs/discuss/include/parser.php:52 Stack trace: #0 /homepages/39/d701392084/htdocs/discuss/profile.php(1061): require() #1 {main} thrown in /homepages/39/d701392084/htdocs/discuss/include/parser.php on line 52

got this when i was clicking on a members name

Last edited by Recognition (2020-09-04 14:59:20)

Offline

#6 2020-09-04 15:15:37

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,476
Website

Re: Deprecated: Function create_function() is deprecated HELP

What does my parser do on your site?
I said to put the last snapshot from github and make changes from the tickets to there.
Both snapshot and commits are at https://github.com/fluxbb/fluxbb

My code in tickets is given only as an example for developers.

for 7.2 it seems already inside the snapshot
for 7.4 https://github.com/fluxbb/fluxbb/pull/233

Offline

#7 2020-09-04 15:25:33

Recognition
Member
From: Toronto, Canada
Registered: 2017-01-20
Posts: 79
Website

Re: Deprecated: Function create_function() is deprecated HELP

Sorry I don't know php coding and I don't even know how to use Github. So for me its all new.

I have HTML knowledge and some other coding experience.

I can figure out how to modify files and follow a tutorial but looking at Github is just confusing to me.

Do I replace the create function lines with the newer fixed lines individually for my parser.php?

Last edited by Recognition (2020-09-04 15:28:06)

Offline

#8 2020-09-04 15:39:03

Mark
Member
From: Southport, Uk
Registered: 2008-05-03
Posts: 580

Re: Deprecated: Function create_function() is deprecated HELP

In github, the red lines, you remove from your code and replace them with the green lines

Offline

#9 2020-09-05 20:49:14

Recognition
Member
From: Toronto, Canada
Registered: 2017-01-20
Posts: 79
Website

Re: Deprecated: Function create_function() is deprecated HELP

Thanks guys I think its fixed now in parser.php
but not functions.php as I could not find that file on the GitHub

There is only one line in functions.php

$replaced = preg_replace_callback($pattern, create_function('$matches', 'return '.$replace.';'), $subject);

Would do I do to fix this line? Thanks!

Offline

#10 2020-09-06 07:25:15

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

Re: Deprecated: Function create_function() is deprecated HELP


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

Board footer

Powered by FluxBB