Skip to content

PHP 8.1 compatiblity & Magento 2 tables update (utilities) - #108

Open
xtremevision wants to merge 8 commits into
macopedia:magento2from
xtremevision:magento2
Open

PHP 8.1 compatiblity & Magento 2 tables update (utilities)#108
xtremevision wants to merge 8 commits into
macopedia:magento2from
xtremevision:magento2

Conversation

@xtremevision

Copy link
Copy Markdown

Fixed:

  • PHP 8.1 compatibility issues
  • Non-existent tables in Utillities -> Clean Catalog and Customers
  • Small UI fix (progress bar)

$ch = $context['curlhandle'];
$dl_opts = $context['opts']['dl'];

$dest = str_replace("pub/pub", "pub", $dest);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this change for?

// target directory;
$l2d = "pub/media/catalog/product/$i1/$i2";

if(!strstr(getcwd(), "pub"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add brackets around "if" body and
"else" body


//clean url rewrites for products
$sql = "DELETE FROM ".$this->tablename("core_url_rewrite")." WHERE product_id IS NOT NULL AND is_system=1";
//$sql = "DELETE FROM ".$this->tablename("core_url_rewrite")." WHERE product_id IS NOT NULL AND is_system=1";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the comment

@tmotyl tmotyl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the patch. please fix some nitpics

@xtremevision

xtremevision commented Aug 28, 2023 via email

Copy link
Copy Markdown
Author

@xtremevision

xtremevision commented Aug 28, 2023 via email

Copy link
Copy Markdown
Author

@xtremevision

xtremevision commented Aug 28, 2023 via email

Copy link
Copy Markdown
Author

@xtremevision

xtremevision commented Aug 28, 2023 via email

Copy link
Copy Markdown
Author

@tmotyl

tmotyl commented Sep 8, 2023

Copy link
Copy Markdown
Member

there are plenty of error_log() calls, seems like they are a leftover from debugging?

@xtremevision

xtremevision commented Sep 8, 2023 via email

Copy link
Copy Markdown
Author

@xtremevision

xtremevision commented Sep 8, 2023 via email

Copy link
Copy Markdown
Author

@onedolphin

onedolphin commented Sep 4, 2025

Copy link
Copy Markdown

Hi, it was working for me but suddenly cannot get it run, via CLI works, via web it stays at 0% and no updates, any ideas? Get this error:

Stack trace:
#0 /home/magmi/magmi/inc/magmi_engine.php(473): fclose(false)
#1 /home/magmi/magmi/web/magmi_run.php(37): Magmi_Engine->run(Array)
#2 {main}
thrown in /home/magmi/magmi/inc/magmi_engine.php on line 473
[04-Sep-2025 05:58:40 UTC] PHP Deprecated: Function strftime() is deprecated in /home/magmi/magmi/web/ajax_gettime.php on line 3
[04-Sep-2025 05:58:41 UTC] PHP Warning: fopen(/home/magmi/magmi/state/trace.txt): Failed to open stream: Inappropriate ioctl for device in /home/magmi/magmi/inc/magmi_engine.php on line 472
[04-Sep-2025 05:58:41 UTC] PHP Fatal error: Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in /home/magmi/magmi/inc/magmi_engine.php:473
Stack trace:
#0 /home/magmi/magmi/inc/magmi_engine.php(473): fclose(false)
#1 /home/magmi/magmi/web/magmi_run.php(37): Magmi_Engine->run(Array)
#2 {main}
thrown in /home/magmi/magmi/inc/magmi_engine.php on line 473
[04-Sep-2025 05:58:53 UTC] PHP Deprecated: Function strftime() is deprecated in /home/magmi/magmi/web/ajax_gettime.php on line 3
[04-Sep-2025 06:01:47 UTC] PHP Deprecated: Function strftime() is deprecated in /home/magmi/magmi/web/magmi_saveprofile.php on line 59
[04-Sep-2025 06:01:52 UTC] PHP Deprecated: Function strftime() is deprecated in /home/magmi/magmi/web/ajax_gettime.php on line 3
[04-Sep-2025 06:01:52 UTC] PHP Warning: fopen(/home/magmi/magmi/state/trace.txt): Failed to open stream: Inappropriate ioctl for device in /home/magmi/magmi/inc/magmi_engine.php on line 472
[04-Sep-2025 06:01:52 UTC] PHP Fatal error: Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in /home/magmi/magmi/inc/magmi_engine.php:473
Stack trace:
#0 /home/magmi/magmi/inc/magmi_engine.php(473): fclose(false)
#1 /home/magmi/magmi/web/magmi_run.php(37): Magmi_Engine->run(Array)
#2 {main}
thrown in /home/magmi/magmi/inc/magmi_engine.php on line 473

…Replaced discovered core_store references with Magento 2’s store, Removed a dead core_website query reference.
@xtremevision

xtremevision commented Aug 24, 2026

Copy link
Copy Markdown
Author

Please check. Sorry for the very late reply.

  • Removed all remaining PHP 8.5-incompatible strftime() calls.
  • Prevented fclose(false) when state/trace.txt cannot be opened.
  • Prevented trace writes from causing secondary fatal errors.
  • Centralized safe trace-file clearing.
  • Made the web trace viewer handle a missing/unreadable trace file.
  • Included the previously prepared Magento 2 flat-table cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants