Project

General

Profile

PHP 8 ?

Added by steve smith about 3 years ago

Hi,

I find extplorer isn't loading in PHP8 ?

It would be great to have extplorer back on PHP8 as it really is the best JS/PHP filer with it's paging browser allowing archives with huge directories to be browsed.

Thanks

Steve Smith


Replies (11)

RE: PHP 8 ? - Added by John Elvin over 2 years ago

Is anyone working on getting this running in php8?

RE: PHP 8 ? - Added by Sören Eberhardt-Biermann over 2 years ago

The latest Version should work with PHP8, please try it.

RE: PHP 8 ? - Added by John Elvin over 2 years ago

I've just tried the latest released version and it still doesn't work. Error messages (with my account and domain hidden):

Deprecated: stripslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /chroot/home/xxxxxxxx/xxxxxxxx/html/extplorer/include/init.php on line 105

Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /chroot/home/xxxxxxxx/xxxxxxxx/html/extplorer/libraries/inputfilter.php on line 323
The above line repeated 29 times.
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /chroot/home/xxxxxxxx/xxxxxxxx/html/extplorer/include/functions.php on line 720

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /chroot/home/xxxxxxxx/xxxxxxxx/html/extplorer/include/functions.php on line 721

RE: PHP 8 ? - Added by steve smith over 2 years ago

I just tried and works fine with PHP 8.0.13.
But not 8.1.1.
I get the same depreciation messages.

RE: PHP 8 ? - Added by John Elvin over 2 years ago

I can confirm that using php 8.0.14 the normal mode works OK. But...

Attempting to switch to ftp mode, after logging in with the ftp user name and password I get a message "Checking ftp connection" then

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Warning: preg_match(): Compilation failed: invalid range in character class at offset 39 in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/libraries/FTP.php on line 2522

Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/include/functions.php:107 Stack trace: #0 /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/include/functions.php(138): get_item_info() #1 /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/include/init.php(260): get_is_dir() #2 /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/admin.extplorer.php(50): require_once('...') #3 /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/index.php(46): include('...') #4 {main} thrown in /chroot/home/xxxxxxxx/yyyyyyyy/html/extplorer/include/functions.php on line 107

RE: PHP 8 ? - Added by OwN 3m-All over 2 years ago

extplorer does not work with PHP 8!

Fatal error: Uncaught Error: Non-static method ext_List::execAction() cannot be called statically in /var/www/new/ehcp/extplorer/admin.extplorer.php:210 Stack trace: #0 /var/www/new/ehcp/extplorer/index.php(46): include() #1 {main} thrown in /var/www/new/ehcp/extplorer/admin.extplorer.php on line 210

And this is a problem everywhere!!! PHP 8 does not allow non-static methods to be called statically! PHP 8 sucks... :(

RE: PHP 8 ? - Added by Sören Eberhardt-Biermann over 2 years ago

Are you using the latest Version? These "Non-static method X cannot be called statically" errors should have been fixed since.

RE: PHP 8 ? - Added by Ubirajara Bandeira Jr almost 2 years ago

I think this error is only with "FILTER_SANITIZE_STRING" constant...

RE: PHP 8 ? - Added by Ubirajara Bandeira Jr almost 2 years ago

On https://www.php.net/manual/en/filter.filters.sanitize.php
They say
"FILTER_SANITIZE_STRING [...] Deprecated as of PHP 8.1.0, use htmlspecialchars() instead"

fs.png (28.1 KB) fs.png

RE: PHP 8 ? - Added by Ubirajara Bandeira Jr almost 2 years ago

Well, well...

I used VS Code, search for all occurrences of FILTER_SANITIZE_STRING and changed manually the code from all of them (about 40 occurrences), from:

filter_var($value, FILTER_SANITIZE_STRING)

To:

htmlspecialchars(filter_var($value), ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401)

And it works, with some button issues on the GUI, but it is functional now.

I know it is not the most correct code, after more tests and more code corrections I will report here. I think if I inspect the page and remove all GUI elements, I can see a lot of warnings, lol.

Attached I send a screenshot.

ss.png (115 KB) ss.png

RE: PHP 8 ? - Added by Ubirajara Bandeira Jr almost 2 years ago

As I said, removing GUI elements, these warnings still appear (I will check):

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\1.1.1.1.1.1-idg2019(instcomps)\administrator\components\com_extplorer\include\functions.php on line 720

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\1.1.1.1.1.1-idg2019(instcomps)\administrator\components\com_extplorer\include\functions.php on line 721

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\1.1.1.1.1.1-idg2019(instcomps)\administrator\components\com_extplorer\include\functions.php on line 720

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\1.1.1.1.1.1-idg2019(instcomps)\administrator\components\com_extplorer\include\functions.php on line 721

    (1-11/11)