Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
Doulos
Life Cycles Becoming CPU Cycles



Joined: Jun 06, 2005
Posts: 732

PostPosted: Tue Jan 28, 2020 5:38 am Reply with quote

Yep, that worked. Thanks.
 
View user's profile Send private message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Tue Jan 28, 2020 1:39 pm Reply with quote

Doulos wrote:
I don't remember if I've seen this on here before, but my php7.3 site is adding two apostrophes instead of one apostrophe in the forum post title. The apostrophe shows up correctly in the body. The title shows up correctly in the preview but not when it is actually posted. This occurs on my vanilla test site and on my production site - and across several different stock themes (tested it on fisubice and ravenice).


Doulos wrote:
Yep, that worked. Thanks.


Ok, thanks for your testings. I removed the both lines from the repo.
[ Only registered users can see links on this board! Get registered or login! ]

_________________
Github: RavenNuke 
View user's profile Send private message
Doulos







PostPosted: Sat Feb 08, 2020 12:40 pm Reply with quote

Here's a new one:
Code:
[05-Feb-2020 08:15:26 America/Chicago] PHP Warning:  preg_match(): Compilation failed: unmatched closing parenthesis at offset 18 in /home/clanfga/public_html/includes/nukesentinel.php on line 479

[05-Feb-2020 08:15:27 America/Chicago] PHP Warning:  preg_match(): Null byte in regex in /home/clanfga/public_html/includes/nukesentinel.php on line 479


NukeSentinel IP tracking shows this from an IP address in Ukraine:
Code:
/modules.php?name=Your_Account;&;    2020-02-05 @ 08:15:27

/modules.php?name=Your_Account))&))    2020-02-05 @ 08:15:26
/modules.php?name=Your_Account'&'    2020-02-05 @ 08:15:25
/modules.php?name=Your_Account"&"    2020-02-05 @ 08:15:25
/modules.php?name=Your_Account&    2020-02-05 @ 08:15:23
 
Doulos







PostPosted: Sat Feb 08, 2020 5:36 pm Reply with quote

Also, when I do a search in the forums, page 1 shows fine but when I click on the number of the next (or any other) page I get "No topics or posts met your search criteria"

I notice this site does the same thing, although you display way more posts per page.
 
neralex







PostPosted: Sun Feb 09, 2020 9:04 am Reply with quote

Doulos,

1. NukeSentinel IP tracking: This is a bad/incorrect input and cannot be filtered correctly without getting warnings like this.

2. Forum search: This known issue you pointed some moons ago and I still haven't a solution for this.
 
Doulos







PostPosted: Sun Feb 09, 2020 10:11 am Reply with quote

neralex wrote:

2. Forum search: This known issue you pointed some moons ago and I still haven't a solution for this.

Sorry, my memory isn't what it used to be, thanks.
 
Doulos







PostPosted: Sun Mar 01, 2020 11:05 am Reply with quote

Googlebot is filling my error logs every time it visits GCalendar with the aforementioned "Warnings". Googlebot no longer obeys robots.txt. Is there any way to stop this?


Last edited by Doulos on Sun Mar 01, 2020 3:34 pm; edited 1 time in total 
neralex







PostPosted: Sun Mar 01, 2020 3:06 pm Reply with quote

Try this: [ Only registered users can see links on this board! Get registered or login! ]
 
Doulos







PostPosted: Sun Mar 01, 2020 3:33 pm Reply with quote

Thanks, I'll let you know how it goes.
 
freekays
New Member
New Member



Joined: Apr 18, 2012
Posts: 5

PostPosted: Thu Mar 05, 2020 1:06 pm Reply with quote

RN 2.5X modded "php 7 - php 5.6" version download link pls

_________________
[ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Send e-mail
neralex







PostPosted: Thu Mar 05, 2020 6:04 pm Reply with quote

freekays, you will find it in the Downloads-section of this page. The download-source is on Github.
[ Only registered users can see links on this board! Get registered or login! ]
 
Doulos







PostPosted: Fri Mar 06, 2020 4:02 am Reply with quote

FYI, neralex, I've received no PHP Warnings from GCalendar since applying your fix. Thanks.
 
neralex







PostPosted: Fri Mar 06, 2020 11:23 am Reply with quote

Great news. Wink
 
rovshan
Hangin' Around



Joined: Nov 26, 2005
Posts: 39

PostPosted: Sat May 16, 2020 5:52 am Reply with quote

in master distribution php7 ready in saveactivate.php file

Code:
if ($new_uid !== false && $new_uid != 0) { ;

      $db->sql_query('DELETE FROM ' . $user_prefix . '_users_temp WHERE username=\'' . $username . '\'');
      $res = $db->sql_query('SELECT * FROM ' . $user_prefix . '_users_temp_field_values WHERE uid = \'' . $row['user_id'] . '\'');
      while ($sqlvalue = $db->sql_fetchrow($res)) {
         $db->sql_query('INSERT INTO ' . $user_prefix . '_users_field_values (uid, fid, value) VALUES (\'' . $new_uid . '\', \'' . $sqlvalue['fid'] . '\', \'' . $sqlvalue['value'] . '\')');
      }
      $db->sql_query('DELETE FROM ' . $user_prefix . '_users_temp_field_values WHERE uid=\'' . $row['user_id'] . '\'');
      $db->sql_query('OPTIMIZE TABLE ' . $user_prefix . '_users_temp_field_values');
      $db->sql_query('OPTIMIZE TABLE ' . $user_prefix . '_users_temp');
   }


Do you really need this sign => ; after ($new_uid !== false && $new_uid != 0) { ?!
 
View user's profile Send private message
neralex







PostPosted: Sat May 16, 2020 7:48 am Reply with quote

rovshan wrote:
Do you really need this sign => ; after ($new_uid !== false && $new_uid != 0) { ?!


rovshan, thank you for reporting this old typo - removed from the github branches.
 
neralex







PostPosted: Thu May 28, 2020 12:42 pm Reply with quote

Based on this Topic, I found some new issues with php7.4.x: [ Only registered users can see links on this board! Get registered or login! ]

includes/nukesentinel.php
Commit: [ Only registered users can see links on this board! Get registered or login! ]

modules/Reviews/index.php
Commit: [ Only registered users can see links on this board! Get registered or login! ]

modules/rwsMetAuthors/index.php
Commit: [ Only registered users can see links on this board! Get registered or login! ]

modules/Your_Account/language/lang-english.php
modules/Your_Account/language/lang-french.php
modules/Your_Account/language/lang-german.php
modules/Your_Account/language/lang-hungarian.php
modules/Your_Account/language/lang-italian.php
modules/Your_Account/language/lang-norwegian.php
modules/Your_Account/language/lang-spanish.php

Commit: [ Only registered users can see links on this board! Get registered or login! ]

mainfile.php [ Only registered users can see links on this board! Get registered or login! ]

It seems there are more, so I will continue this list.
 
Doulos







PostPosted: Mon Jun 08, 2020 1:14 am Reply with quote

First time for this one (if I remember correctly). I have not looked at my logs to see if I can find out what that going one at this time.
Code:
[07-Jun-2020 10:12:26 America/Chicago] PHP Notice:  Undefined offset: 4 in /home/clanfga/public_html/mainfile.php on line 1158

[07-Jun-2020 10:12:26 America/Chicago] PHP Notice:  Undefined offset: 5 in /home/clanfga/public_html/mainfile.php on line 1158
[07-Jun-2020 10:12:26 America/Chicago] PHP Notice:  Undefined offset: 6 in /home/clanfga/public_html/mainfile.php on line 1158
[07-Jun-2020 10:12:26 America/Chicago] PHP Notice:  Undefined offset: 2 in /home/clanfga/public_html/mainfile.php on line 1158
[07-Jun-2020 10:12:26 America/Chicago] PHP Notice:  Undefined offset: 3 in /home/clanfga/public_html/mainfile.php on line 1158
[07-Jun-2020 10:12:26 America/Chicago] PHP Notice:  Undefined offset: 1 in /home/clanfga/public_html/mainfile.php on line 1158
 
neralex







PostPosted: Mon Jun 08, 2020 12:42 pm Reply with quote

Doulos, this can happen if the $time variable is not passed correctly to the formatTimestamp() function. Can you reproduce it where the error occurs?
 
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1122

PostPosted: Mon Jun 08, 2020 4:00 pm Reply with quote

I test with php 7.1, 7.2, 7.4 and I am not getting this error from this function.

Code:
function formatTimestamp($time) {

   global $datetime, $locale;

   static $localeSet;     // setlocale() can be expensive to call; only need to call it once
   if (!isset($localeSet)) {
      setlocale(LC_TIME, $locale);
      $localeSet = 1;
   }

   if (!is_numeric($time)) {
      preg_match('/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})/', $time, $datetime);
      $time = gmmktime($datetime[4], $datetime[5], $datetime[6], $datetime[2], $datetime[3], $datetime[1]);
   }
   $time -= date('Z');
   $datetime = strftime(_DATESTRING, $time);
   $datetime = ucfirst($datetime);
   return $datetime;
}
 
View user's profile Send private message
Doulos







PostPosted: Tue Jun 09, 2020 4:32 am Reply with quote

Sorry, I don't have time to look into it right now. UPS has decided that 5-day 60 hour weeks is not good enough and is forcing us to work 6-day 70 hour weeks. If I get a chance (haha) I'll take a look.
 
rovshan







PostPosted: Thu Jun 11, 2020 7:04 am Reply with quote

in modules/Topics/admin/admin.php

Fix for php7.4 compatibility. Modify regular expression below :

Code:
if ( (preg_match('/^([\p{L}\p{N}-_]*)(.png|.gif|.jpg)$/', $file)) AND $file != 'AllTopics.gif') {


to

Code:
if ( (preg_match('/^([\p{L}\p{N}\-_]*)(.png|.gif|.jpg)$/', $file)) AND $file != 'AllTopics.gif') {
 
neralex







PostPosted: Sun Jun 14, 2020 12:40 am Reply with quote

rovshan, thanks. I added this fix to the github-repo.
[ Only registered users can see links on this board! Get registered or login! ]

I found also some other php7.4 issues, which I fixed on this way.

modules/Topics/index.php [ Only registered users can see links on this board! Get registered or login! ]

modules/Your_Account/includes/ui-0privmsgs.php: [ Only registered users can see links on this board! Get registered or login! ]

includes/nukeSEO/dh/dh.class.php: [ Only registered users can see links on this board! Get registered or login! ]
 
hicuxunicorniobestbuildpc







PostPosted: Sun Jun 21, 2020 8:18 pm Reply with quote

I am running php 7.1 right now and I got this error

Code:
Notice: Undefined index: blocked_clear in /includes/nukesentinel.php on line 155
 
neralex







PostPosted: Mon Jun 22, 2020 12:11 am Reply with quote

hicuxunicorniobestbuildpc, Yes I know, where is an issue in this if-statement.

Original:

php Code:
// Clearing of expired blocks

// CAUTION: This function can slow your sites load time
$clearedtime = strtotime(date('Y-m-d 23:59:59', $nsnst_const['ban_time']));
$cleartime = strtotime(date('Y-m-d 23:59:59', $nsnst_const['ban_time'])) - 86400;
if( $ab_config['self_expire'] == 1 AND $ab_config['blocked_clear'] < $clearedtime) {

// check if minimum one blocker configured for save in htaccess file
$htnum = $db->sql_numrows($db->sql_query('SELECT * FROM `' . $prefix . '_nsnst_blockers` WHERE `htaccess`!="0" '));

// if the value are 0, there is no need to optimize the tables
$optimize_blocked_ips = 0;
$optimize_blocked_ranges = 0;

$clearresult = $db->sql_query('SELECT * FROM `' . $prefix. '_nsnst_blocked_ips` WHERE (`expires` < "' . $clearedtime . '" AND `expires`!="0")');
while($clearblock = $db->sql_fetchrow($clearresult)) {
if(!empty($ab_config['htaccess_path']) AND $htnum > 0) {
$ipfile = file($ab_config['htaccess_path']);
$ipfile = implode('', $ipfile);
$i = 1;
while ($i <= 3) {
$tip = substr($clearblock['ip_addr'], -2);
if($tip == '.*') { $clearblock['ip_addr'] = substr($clearblock['ip_addr'], 0, -2); }
$i++;
}
$testip = 'deny from ' . $clearblock['ip_addr'] . "\n";
$ipfile = str_replace($testip, '', $ipfile);
$doit = @fopen($ab_config['htaccess_path'], 'w');
@fwrite($doit, $ipfile);
@fclose($doit);
// count the records, to the check if the table should be optimized
$optimize_blocked_ips++;
}
$db->sql_query('DELETE FROM `' . $prefix . '_nsnst_blocked_ips` WHERE `ip_addr`="' . $clearblock['ip_addr'] . '"');
#$db->sql_query('OPTIMIZE TABLE `' . $prefix . '_nsnst_blocked_ips`');
}
if ($optimize_blocked_ips > 0) {
$db->sql_query('OPTIMIZE TABLE `' . $prefix . '_nsnst_blocked_ips`');
}

$clearresult = $db->sql_query('SELECT * FROM `' . $prefix . '_nsnst_blocked_ranges` WHERE (`expires`<"' . $clearedtime . '" AND `expires`!="0")');
while($clearblock = $db->sql_fetchrow($clearresult)) {
$old_masscidr = ABGetCIDRs($clearblock['ip_lo'], $clearblock['ip_hi']);
if(!empty($ab_config['htaccess_path']) AND $htnum > 0) {
$old_masscidr = explode('||', $old_masscidr);
for ($i=0, $maxi=sizeof($old_masscidr); $i < $maxi; $i++) {
if(!empty($old_masscidr[$i])) {
$old_masscidr[$i] = 'deny from ' . $old_masscidr[$i] . "\n";
}
}
$ipfile = file($ab_config['htaccess_path']);
$ipfile = implode('', $ipfile);
$ipfile = str_replace($old_masscidr, '', $ipfile);
$ipfile = $ipfile;
$doit = @fopen($ab_config['htaccess_path'], 'w');
@fwrite($doit, $ipfile);
@fclose($doit);
// count the records, to the check if the table should be optimized
$optimize_blocked_ranges++;
}
$db->sql_query('DELETE FROM `' . $prefix . '_nsnst_blocked_ranges` WHERE `ip_lo`="' . $clearblock['ip_lo'] . '" AND `ip_hi`="' . $clearblock['ip_hi'] . '"');
#$db->sql_query('OPTIMIZE TABLE `' . $prefix . '_nsnst_blocked_ranges`');
}
if ($optimize_blocked_ranges > 0) {
$db->sql_query('OPTIMIZE TABLE `' . $prefix . '_nsnst_blocked_ranges`');
}
$db->sql_query('UPDATE `' . $prefix . '_nsnst_config` SET `config_value`="' . $clearedtime . '" WHERE `config_name`="blocked_clear"');
}


The config_value of "blocked_clear" in the db-table "_nsnst_config" should be filled after the installation with "0". After the first run of the funtion "Clear Expired Blocked IP's" inside the "Blocked ID Menue" the config_value should get the value of the variable: $clearedtime, which was defined before the if-statement starts. So please check, if this config_name exists and if yes, which config_value is stored.

If the config_name "blocked_clear" not exists, maybe something were wrong while the installation of a prio build than RN25x and you can try to add this config_name to the NukeSentinel-Configuration db-table "_nsnst_config" with phpMyAdmin.

If the config_name "blocked_clear" exists, you can try to fill the config_value with "0" with phpMyAdmin and start the function again.
 
hicuxunicorniobestbuildpc







PostPosted: Mon Jun 22, 2020 5:50 pm Reply with quote

blocked_clear was not there. That was strange. Never happened before. When I tried to update nukesentinel this option dissapear I guess. Danke!
!

Rolling Eyes
Wave
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©