Project Beehive ForumDeprecated class error?

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Mikey (MIKEYP)  
 To:  ALL
42062.1 
Hi, sorry if this is in the wrong topic thread - I don't see a support section but I thought I saw one earlier.

I am receiving this error and the forum will not function.  I am not the host but a representative of the individual having this issue, he may chime in with more details.


[04-Nov-2017 14:45:10 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; html_frame has a deprecated constructor in /home/mamakspecial/public_html/forum/include/html.inc.php on line 1001
root@mamakspecial [/]# tail -n100 /home/mamakspecial/public_html/forum/error_log


Here are the lines that contain the function the above error is indicating; looks fairly easy to resolve, but occurs no matter which version of PHP I use from 5.4 to 7.2.  The site was functioning for a couple months without any errors.  This is on a CentOS 6 64 bit VPS with cPanel and Apache; I can include other information if necessary, such as PHP extensions and assorted modules.

Do we need to reinstall, update, or alter the code?  Thanks in advance!  :
 

class html_frame
{
private $src;
private $name;
private $frameborder;
private $scrolling;
private $noresize;
private $allowtransparency = '';

function html_frame($src, $name, $frameborder = 0, $scrolling = '', $noresize = '')
{
    $this->src = $src;
    $this->name = $name;

    if (in_array($scrolling, array('yes', 'no'))) {
        $this->scrolling = sprintf(' scrolling="%s"', htmlentities_array($scrolling));
    }

    if (in_array($noresize, array('noresize'))) {
        $this->noresize = sprintf(' noresize="%s"', htmlentities_array($noresize));
    }

    if (browser_check(BROWSER_WEBKIT)) {
        $this->frameborder = 1;
    } else {
        $this->frameborder = (is_numeric($frameborder)) ? $frameborder : 0;
    }

    if (browser_check(BROWSER_MSIE)) {
        $this->allowtransparency = ' allowtransparency="true"';
    }
}

APPROVED: 7 Nov 2017 00:32 by MILKO

0/0
 Reply   Quote More 

 From:  Kalsarikänni (DSMITHHFX)  
 To:  Mikey (MIKEYP)     
42062.2 In reply to 42062.1 
I just ran a new install of forum version 1.5.2 on ubuntu 16.04 x86_64 host, php 7, apache 2.4, mysql 5 without issue.
“Developer makes luxury living more affordable”
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Mikey (MIKEYP)     
42062.3 In reply to 42062.1 
If that's the only error, you should configure PHP not to error on deprecated functionality (because deprecation is only supposed to be a warning).

Looks like that's done by updating php.ini to contain this:

error_reporting = E_ALL & ~E_DEPRECATED & ~E_NOTICE

If that doesn't work, check results here for other options: https://duckduckgo.com/?q=php+disable+E_DEPRECATED

0/0
 Reply   Quote More 

 From:  Mikey (MIKEYP)  
 To:  ALL
42062.4 
Hi, this error must be unrelated to the issue at hand as error reporting was disabled for deprecated classes.  I am going to attempt a reinstall and see if that resolves the issue.  Thank you for all the help
0/0
 Reply   Quote More 

 From:  Mikey (MIKEYP)  
 To:  ALL
42062.5 
Hi guys / gals, I think that this install was incorrect from the start.

After reviewing the database tables, I found some missing tables.  I have corrected this.  But, I also noticed permissions were 755 on files AND directories - 755 should be accurate for just dirs; so I am assuming this was an oversight.  What I can't seem to locate is where to find the user:group permissions for the directory tree, from the public_html down.  Are there any special permissions or user:group

(for example, username:username or username:group or username:nobody)

other than traditional directory structure for sites?  Maybe 600 permissions for the *php files?

I've since enabled verbosity in the error logs and altered to where I can receive the error logging emails, but in the meantime is there a site or a thread where I can locate the user permissions and ownership of files?

I may just reinstall from ground up for the user and update the install with the database, but if I run into the same issue I'd like to have an idea of where to start.  I am also reviewing documentation again to see if maybe I missed something (and I was wrong about the deprecated class, that error is irrelevant, as I was informed :) )

As you can see in the screenshot, the error log generated isn't much and the only error I've seen so far is the deprecated class error.  I haven't seen another within any Apache error logs, software, etc. so I am thoroughly grasping at straws at this point in time.  

I also noticed that the installation was not up-to-date, so I will update it again.  Thank you for your time.

This is the only error I see on the site:
 

Error

 
Error
To access the forum, click the Login menu on top
 



 
Oh, and yes, I am logged in
 
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Mikey (MIKEYP)     
42062.6 In reply to 42062.5 
I wouldn't expect Beehive to deviate from whatever is typical for PHP scripts, though I'd probably say 644 over 600 depending on group stuff.

I don't see mention of what user Apache is running as - in different setups (not BH/PHP specific) I've found different user:group combinations necessary - like if it's user-specific /home/user/public_html directories then user:www (with apache's user in the www group), as opposed to just apache:apache/apache:nobody if it's in /var/www/html or /usr/local/apache/htdocs or whatever.

For any login related issue, always double-check relevant cookies are persisting and there's nothing going on with expiry and/or paths. (And do it by inspecting actual HTTP requests/responses, not trusting what browsers claim.)

0/0
 Reply   Quote More 

 From:  Mikey (MIKEYP)  
 To:  ALL
42062.7 
Hi, I wouldn't expect the permissions to be altered, either, but it looks as if some one ran a command to change permissions and instead of just dirs, did all files, too.  I don't believe it's an ownership issue, now, either - after a bunch of fresh installs, reinstalls, reinstall with old database, reinstall with brand new db, etc...it occurred to me that I wasn't using the top-level admin account.  I asked if I was using the administrator account - and I wasn't.  I then located a file - somewhere - that had the administrator account's name (maybe in PHPMyAdmin?) 

hat I am looking at, now that I know, is a user specific error, now, for which I haven't begun troubleshooting.  Had I known or thought to ask if I was using an admin account, well, we probably wouldn't be having this conversation :)  

The user:group ownership looks accurate across the board, too - but I had no positive way of knowing that there might be some oddball issue or redirect in a file that requires certain structures with certain ownership or permissions (although I don't see why this would be, with Beehive, and why I was scratching my head, as it looks straightforward.  But, then again, I've seen some Wordpress plugins or themes that refuse without 755 on the files, too - which still makes me shake my head).  Maybe if I thoroughly debugged the software from the ground up I would determine that, but that would defeat the purpose of this thread :D

I hope it's a simple cookie error.  If it's a user without full permissions - this would also explain why I am having so many difficulties with upgrades, as I was proceeding to manually dump the database and check against a fresh install for missing tables or the like.  Needless to say, that would be much more work than I initially expected.

I will update with what I find as soon as I can.  I am very grateful for all the help.  Thanks!
0/0
 Reply   Quote More 

Reply to All    
 

1–7

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2018 Project Beehive Forum

Forum Stats