1
zyspec
Re: where utf8mb4 protector table can not creat
  • 12/9 17:47

  • zyspec

  • Module Developer

  • Posts: 1093

  • Since: 2004/9/21


Thanks for the information.

As you stated above, the current code looks like:

CREATE TABLE log (
  
lid mediumint(8unsigned NOT NULL auto_increment,
  
uid mediumint(8unsigned NOT NULL default 0,
  
ip varchar(255NOT NULL default '0.0.0.0',
  
type varchar(255NOT NULL default '',
  
agent varchar(255NOT NULL default '',
  
description text,
  
extra text,
  
timestamp DATETIME,
  
PRIMARY KEY (lid) ,
  
KEY (uid) ,
  
KEY (ip) ,
  
KEY (type) ,
  
KEY (timestamp)
ENGINE=MyISAM;

CREATE TABLE access (
  
ip varchar(255NOT NULL default '0.0.0.0',
  
request_uri varchar(255NOT NULL default '',
  
malicious_actions varchar(255NOT NULL default '',
  
expire int NOT NULL default 0,
  
KEY (ip),
  
KEY (request_uri),
  
KEY (malicious_actions),
  
KEY (expire)
ENGINE=MyISAM;


Can you try the following to see if it resolves the issue you're seeing? As you have determined the keys are too long for MySQL 8. I've made some minor changes to what you've found to attempt to minimize the length of keys where appropriate to cover a majority of the cases. Unfortunately it's difficult to set an exact key length for some of the keys since the length of data in those fields can vary quite a bit.

CREATE TABLE log (
  
lid mediumint(8unsigned NOT NULL auto_increment,
  
uid mediumint(8unsigned NOT NULL default 0,
  
ip varchar(255NOT NULL default '0.0.0.0',
  
type varchar(255NOT NULL default '',
  
agent varchar(255NOT NULL default '',
  
description text,
  
extra text,
  
timestamp DATETIME,
  
PRIMARY KEY (lid) ,
  
KEY (uid) ,
  
KEY (ip (50)) ,
  
KEY (type(64)) ,
  
KEY (timestamp)
ENGINE=MyISAM;

CREATE TABLE access (
  
ip varchar(255NOT NULL default '0.0.0.0',
  
request_uri varchar(255NOT NULL default '',
  
malicious_actions varchar(255NOT NULL default '',
  
expire int NOT NULL default 0,
  
KEY (ip(50)),
  
KEY (request_uri(192)),
  
KEY (malicious_actions(128)),
  
KEY (expire)
ENGINE=MyISAM;



2
zyspec
Re: where utf8mb4 protector table can not creat
  • 12/6 15:31

  • zyspec

  • Module Developer

  • Posts: 1093

  • Since: 2004/9/21


Can you tell us what version of MySQL you are using?



3
zyspec
Re: Module translation and special characters
  • 12/1 16:01

  • zyspec

  • Module Developer

  • Posts: 1093

  • Since: 2004/9/21


Glad the explanation helped. In this case Cedric's change should fix this particular issue.



4
zyspec
Re: Module translation and special characters
  • 12/1 3:41

  • zyspec

  • Module Developer

  • Posts: 1093

  • Since: 2004/9/21


The HTML 'id' has historically only allowed [A-Za-z0-9-_:.], and the string must start with [A-Za-z] and not be empty. In other words a '/', space or accented chars, etc. are not valid for an id attribute. For HTML5 the only requirement is that it can't be empty and can't contain a space.

Any code that uses a var for the HTML4 id should sanitize it first...

Maybe something like:
$idAttrib preg_replace('/^[A-Za-z]+([A-Za-z\d-_:.])*?$/''_'$id);
$idAttrib = !empty($idAttrib) ?? 'A' . (string)rand(1,32767); // create a random ID if it's currently empty


For HTML5 just make sure that it's not empty and replace any spaces with an underscore. So something as simple as:
$idAttrib str_replace(' ''_'$id);
$idAttrib = !empty($idAttrib) ?? 'A' . (string)rand(1,32767); // create a random ID if it's currently empty



5
zyspec
Re: New Theme on xoops.org to celebrate the release of PHP 8.1
  • 2021/11/24 15:17

  • zyspec

  • Module Developer

  • Posts: 1093

  • Since: 2004/9/21


Looks great! Thanks Eren!



6
zyspec
Re: lostpass.php Have some error,On user by Gmail
  • 2021/11/23 16:27

  • zyspec

  • Module Developer

  • Posts: 1093

  • Since: 2004/9/21


@cadch,

Does the code you posted above 'fix' the issue for you?



7
zyspec
Re: Overload the images on the search.php page
  • 2021/10/20 13:35

  • zyspec

  • Module Developer

  • Posts: 1093

  • Since: 2004/9/21


@alain01,

The file you're checking for must be a path, not a URL. So chaine_surcharge should be something like:
/var/www/html/themes/mx-theme/modules/xmnews/assets/images/xmnews_search.png

use something like XOOPS_PATH, not XOOPS_URL to build the file location.



8
zyspec
Re: Overload the images on the search.php page
  • 2021/10/19 20:36

  • zyspec

  • Module Developer

  • Posts: 1093

  • Since: 2004/9/21


@alain01

You should be able to just use something like this:
<{if file_exists($chaine_surcharge)}>
Found my file<br>
<{else}>
Unknown file<br>
<{/if}>



9
zyspec
Re: Lexikon bootstrap templates
  • 2021/7/7 12:10

  • zyspec

  • Module Developer

  • Posts: 1093

  • Since: 2004/9/21


Thanks Michael.... I should have thought to look there first.



10
zyspec
Re: Lexikon bootstrap templates
  • 2021/7/7 2:30

  • zyspec

  • Module Developer

  • Posts: 1093

  • Since: 2004/9/21


Anyone still happen to have a copy of these template.... The 2017 link provided by @bleek is no longer valid.




TopTop
(1) 2 3 4 ... 100 »



Login

Who's Online

34 user(s) are online (23 user(s) are browsing Support Forums)


Members: 0


Guests: 34


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits