PHP7 Compatability

  • Thread starter
  • Moderator
  • #81

Paul M

Super Moderator
Joined
Jun 26, 2006
Messages
4,077
I dont know anything about Spam-O-Matic, so I cannot comment on that.

IPv6 banning works fine for me in 4.2.5
Just remember you need to use the short version of the IP6 address.

(e.g. FE80::202:B3FF:FE1E:8350, not FE80:0000:0000:0000:0202:B3FF:FE1E:8350)

Wildcard values still work as well (e.g. FE80::202:B3FF:*)
 

chown

Aspirant
Joined
Feb 14, 2017
Messages
25
IPv6 banning works fine for me in 4.2.5
Just remember you need to use the short version of the IP6 address.
I didn't know that because it's literally not mentioned anywhere. Maybe it's worth adding what you've said here to the settings description?

Thanks.
 
  • Thread starter
  • Moderator
  • #83

Paul M

Super Moderator
Joined
Jun 26, 2006
Messages
4,077
I didn't know that because it's literally not mentioned anywhere. Maybe it's worth adding what you've said here to the settings description?
About using the short version? Thats probably not a bad idea, if I remember, i'll add something.
 

chown

Aspirant
Joined
Feb 14, 2017
Messages
25
About using the short version? Thats probably not a bad idea, if I remember, i'll add something.
Yes. It's a good way to tell people that you can ban IPv6 addresses and what format needs to be used.
 

BirdOPrey5

#Awesome
Joined
Aug 14, 2008
Messages
4,217
Yes. It's a good way to tell people that you can ban IPv6 addresses and what format needs to be used.
For the record you should be IP Banning from the server level, perhaps .htaccess file. Banning them in vBulletin is easy but wasteful in resources. Most of vBulletin loads anyway and every IP address blocked is loaded into memory on every page load.

These days most users should have banning tools elsewhere (like cPanel) which make IP banning easier than 10+ years ago when that feature was first added to VB and simply never removed.
 

we_are_borg

Tazmanian
Joined
Jan 25, 2011
Messages
5,964
For the record you should be IP Banning from the server level, perhaps .htaccess file. Banning them in vBulletin is easy but wasteful in resources. Most of vBulletin loads anyway and every IP address blocked is loaded into memory on every page load.

These days most users should have banning tools elsewhere (like cPanel) which make IP banning easier than 10+ years ago when that feature was first added to VB and simply never removed.

That said i like it when you can do this in software (all scripts) it self, because its faster to get some one off your site. Because login in into the AdminCP is faster then going to FTP (.htaccess) or cPanel, so you block him/here fatser. But you are right the firewall should be the one kicking some one off your site for long term vBulletin or any other script is only there for a few hours at most.
 

chown

Aspirant
Joined
Feb 14, 2017
Messages
25
For the record you should be IP Banning from the server level, perhaps .htaccess file. Banning them in vBulletin is easy but wasteful in resources. Most of vBulletin loads anyway and every IP address blocked is loaded into memory on every page load.

These days most users should have banning tools elsewhere (like cPanel) which make IP banning easier than 10+ years ago when that feature was first added to VB and simply never removed.
While that's true, I do have other watered down admin accounts on my website. They need a way to ban IP addresses and I'm not about to give out access to my control panel, so that's the easiest and safest way for them to do it.

Any IP addresses that are banned in vBulletin are normally removed after a few days, but anything that needs to be permanently banned I control via Cloudflare. And yes, I know that using a .htaccess file is another option for most people, but I don't use Apache ;)
 

Alpha1

Administrator
Joined
May 28, 2007
Messages
4,268
We (or the system) first add to forum admincp and then either remove or add to LiteSpeed admin panel.
 

mysiteguy

Fanatic
Joined
Feb 20, 2007
Messages
3,619
This fubar'd my admincp. It's not loading css files and the background is white. I saw that it was trying to load files with "b2" appended to the name which are missing the in the beta tar file. I copied the regular versions of those files to the b2 version, still no dice... white background.
 
  • Thread starter
  • Moderator
  • #91

Paul M

Super Moderator
Joined
Jun 26, 2006
Messages
4,077
Is 4.2.5 Beta 2 the latest version of this?
Yes.

This fubar'd my admincp. It's not loading css files and the background is white. I saw that it was trying to load files with "b2" appended to the name which are missing the in the beta tar file. I copied the regular versions of those files to the b2 version, still no dice... white background.
TBH, I dont really even know what you mean by this, no files have b2 in their name (or b1, or anything like that).
The ACP works perfectly fine for me and [afaik] everyone else - nothing much has really changed in it, esp the css which is basically unchanged since vB3.
 

Fillip H.

Developer
Joined
Mar 13, 2006
Messages
205
The ACP works perfectly fine for me and [afaik] everyone else - nothing much has really changed in it, esp the css which is basically unchanged since vB3.
Works perfectly fine for me too, both locally and @ DBTech. We do not use any 3rd party cpstyles, I grew up with "vBulletin 3 Default" and I'll stick to it! :p


Fillip
 

mysiteguy

Fanatic
Joined
Feb 20, 2007
Messages
3,619
Yes.


TBH, I dont really even know what you mean by this, no files have b2 in their name (or b1, or anything like that).
The ACP works perfectly fine for me and [afaik] everyone else - nothing much has really changed in it, esp the css which is basically unchanged since vB3.

Found the issue, it was on my end, something very bizarre. I have a mod_substitute rule in .htaccess that matches on date and version strings, and expects them in a certain format. The beta changed the format from only numeric to numeric plus a b2 at the end. Changed the rule to match alpha characters as well and it's work now.
 

chown

Aspirant
Joined
Feb 14, 2017
Messages
25
Try to edit, report or view a comments IP address in an album and you'll get the following error.

Code:
Database error in vBulletin 4.2.5 Beta 2:

Invalid SQL:

       SELECT *, ipdata.ip AS ipaddress
       FROM vb_picturecomment
       LEFT JOIN vb_ipdata AS ipdata ON (ipdata.ipid = picturecomment.ipaddress)
       WHERE
           picturecomment.commentid = 36
               AND
           picturecomment.filedataid = 5275
               AND
           picturecomment.userid = 20332;

MySQL Error   : Unknown column 'picturecomment.commentid' in 'where clause'

Is anyone else able to reproduce this issue?

If I restore the fetch_picturecommentinfo function from beta 1 then I get no database errors, but viewing the IP address doesn't work as you'd expect it to.
 
Last edited:

Fillip H.

Developer
Joined
Mar 13, 2006
Messages
205
Try to edit, report or view a comments IP address in an album and you'll get the following error.

Code:
Database error in vBulletin 4.2.5 Beta 2:

Invalid SQL:

       SELECT *, ipdata.ip AS ipaddress
       FROM vb_picturecomment
       LEFT JOIN vb_ipdata AS ipdata ON (ipdata.ipid = picturecomment.ipaddress)
       WHERE
           picturecomment.commentid = 36
               AND
           picturecomment.filedataid = 5275
               AND
           picturecomment.userid = 20332;

MySQL Error   : Unknown column 'picturecomment.commentid' in 'where clause'

Is anyone else able to reproduce this issue?

If I restore the fetch_picturecommentinfo function from beta 1 then I get no database errors, but viewing the IP address doesn't work as you'd expect it to.
1. Log it in Jira :)
2. Open /includes/functions_picturecomment.php (Beta 2 version) and find
Code:
FROM " . TABLE_PREFIX . "picturecomment
replace with
Code:
FROM " . TABLE_PREFIX . "picturecomment AS picturecomment


Fillip
 
  • Thread starter
  • Moderator
  • #97

Paul M

Super Moderator
Joined
Jun 26, 2006
Messages
4,077
Technically its a Beta 4 fix, as Beta 3 was finalised yesterday for the weekend, but Ive merged it back as well.

Sadly, the Beta 3 releases over the weekend will probably be my last. **


(**Please dont discuss that here, use https://theadminzone.com/threads/leaving-ib.143677/)
 
Last edited:

chown

Aspirant
Joined
Feb 14, 2017
Messages
25
PHP Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/forum/public_html/includes/class_upload.php on line 174
PHP Warning: get_headers(http://www.): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/forum/public_html/includes/class_upload.php
"POST /profile.php?do=updatesignature HTTP/1.1"
Save or preview your signature and it'll say "Invalid File" and log the get_headers() error.
2. Ah, the default of "http ://www." should have been removed from everywhere (http v https). Looks like I missed it in some templates.
(Ignore the space after http, stupid XF tries to make it into a url, I see no way to disable that)

The problem is actually with get_headers() because if a host is unreachable then the warning is logged every time.

The default profile picture and signature picture URLs contain "http://www.", which is obviously an invalid address.

To prevent the warning just change line 174 of class_upload.php to the following.
PHP:
$headers = @get_headers($upload, TRUE);
 
Last edited:
  • Thread starter
  • Moderator
  • #99

Paul M

Super Moderator
Joined
Jun 26, 2006
Messages
4,077
I tend to agree, the warnings in this case should be suppressed with @.
I also noticed that according to the PHP docs, the second param should be an integer.
Rather bizarre as its treated as a true/false option, but I updated it to be correct.

The line will be this in Beta 4 (whenever that gets released).
PHP:
$headers = @get_headers($upload, 1);
 
Top