macopedia / magmi-m2

Magmi GitHub, see branch magento2 for a version compatible with Magento 2
113 stars 53 forks source link

Magmi with Magento 2.4.6 and PHP 8.2. #106

Open Henrik41 opened 1 year ago

Henrik41 commented 1 year ago

Need to test and see if it works.

JosephGourvenec commented 1 year ago

Hey, I posted the below on https://github.com/macopedia/magmi-m2/issues/102 5 days ago

It doesn't work for us, both of us have tried everything but will not find the magmi.ini file

Hi Guys,

Just testing M2.4.6 with PHP8.1 now Magmi has a new pull for php8.1 support.

Configured everything as it should be with ini file, etc as i always have with 100% the correct details got from env.php too

I keep getting "Please create magmi.ini file in magmi/conf directory , by copying & editing magmi.ini.default file and filling appropriate values"

It is 100% there, what could I be missing please?

Cheers, Joe

JosephGourvenec commented 1 year ago

P.s. I'm not a coder but work with Magento and there is a decision to be made

I will offer a donation of £200 GBP for a proper working version for php.8.1 / 8.2 as it works for php7.4.

  1. Get Magmi working on PHP 8.1 / 8.2
  2. Test M2.4.6 API import which claims to be able to import 100k per minute (Can't see that, but even if 1k+ P/M it will be good)

Cheers, Joe

Henrik41 commented 1 year ago

I have Magento 2.4.5 and php 8.1 and it works great. I have about 10k product i am updating everyday. I do it automatically via the cli command and a few scripts i programmed in Python with the help of cron. I am in the process of duplicating my site and testing magmi for php 8.2 and magento 2.4.6 since there are a few security updates.

cbtrident commented 1 year ago

are you using apache or nginx am about to test on 8.2 right now

Henrik41 commented 1 year ago

Using nginx. Please let me know if it works.

cbtrident commented 1 year ago

ok just start with nginx once i learn how to make the config file see magmi then i can sort out

cbtrident commented 1 year ago

ok seen the error .i hope i can sort out for you

cbtrident commented 1 year ago

i would say to people using php 8.1 as php 8.2 been a pain no error showing so not fun fixing this one

cbtrident commented 1 year ago

ok it may be wrong but in security.php is not liking if (!isset($_SERVER['PHP_AUTH_USER'])) { header('WWW-Authenticate:Basic realm="Magmi"'); header('HTTP/1.0 401 Unauthorized'); echo 'You must be logged into magento admin to use Magmi'; die(); } else { if (!authenticate($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'])) { header('WWW-Authenticate: Basic realm="Magmi"'); header('HTTP/1.0 401 Unauthorized'); echo 'You must be logged in to use Magmi'; die(); } } not sure why yet

JosephGourvenec commented 1 year ago

Hey Guys,

I'm running WHM / Cpanel with Apache and PHP8.1 (Not PHP 8.2)

I've tried both

  1. This pull > https://github.com/macopedia/magmi-m2/ AND
  2. Your own cbtrident > https://github.com/cbtrident/magmi-m2

Neither work and don't recognise the magami.ini file

I have reset the file permissions on the test site I am running at all levels

Cheers, Joe

cbtrident commented 1 year ago

had it working on php8.1 i'll check again 8.1 to make sure if it fine my side i could have a look at your setup if you like you can email carlb @ cblinux.co.uk to talk

cbtrident commented 1 year ago

php 8.1.2 seem it not working on as well so have to fix unless someone else know

cbtrident commented 1 year ago

mmm my version seem to work not the main?

Henrik41 commented 1 year ago

From my end I tested 2.4.5 and php 8.2 with cbtrident php 8.1 version and I had a few easy errors to correct in my log (just google it).

PHP message: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/magmi/magmi/plugins/5b5/general/attributesetimport/functions.php

"PHP message: PHP Deprecated: Optional parameter $dorewrite declared before required parameter $store is implicitly treated as a required parameter in /var/www/magmi/magmi/plugins/extra/itemprocessors/itemindexer/otfindexer.php on line 232"

"PHP message: PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/magmi/magmi/plugins/base/general/reindex/options_panel.php on line 21PHP message: PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/magmi/magmi/plugins/inc/magmi_plugin.php on line 146

"PHP message: PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/magmi/magmi/plugins/base/general/reindex/options_panel.php on line 21

"PHP message: PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/magmi/magmi/web/magmi_web_utils.php on line 6

"PHP message: PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/magmi/magmi/web/magmi_web_utils.php on line 9

PHP message: PHP Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/magmi/magmi/web/magmi_web_utils.php on line 9

The next step is to update Magento 2.4.5 to 2.4.6 and see if I get errors. Hopefully they didn't touch at the database or else we are screwed.

cbtrident commented 1 year ago

thanks for the update on the 8.2 i will try to fix them as well not sure why the main does not work and mine works but at least i can sort now from my code base

tmotyl commented 1 year ago

Hi I'm the maintainer of the magmi-m2. I don't use magmi actively anymore thus there is no funding to develop it further. I see that many of you struggle with PHP 8 support, so I decided to create a magmi version compatible with PHP 8. However it will be available behind a paywall, so at last, some my investments are getting paid.

You can use this link to purchase access: https://buy.stripe.com/dR603b7UB3X76gEeUY

It's only 200euro right now (net) for early supporters, but I plan to increase the price in May.

If you're buying as a company, make sure to select "I'm purchasing as business" and set the correct VAT ID. Then the amount of VAT to be paid will be €0 (for most countries).

cbtrident commented 1 year ago

dont think people will pay for what is free and am not sure you allow to sell it? anyway am fixing it for 8.2 and my branch work on 8.1 so sorry tmotyl with that money i can buy something better then magmi

tmotyl commented 1 year ago

go ahead @cbtrident its opensource. Some people prefer to fix stuff themselves, some prefer to buy it. and yes, I'm allowed to sell access to the changed code.

Henrik41 commented 1 year ago

All works great for me. Updated 18K products in 33 mins with Magento 2.4.6 and PHP 8.2. The most difficult part was the theme update and not magmi who had very few errors I corrected.

cbtrident commented 1 year ago

do you want to give me your fixs please Henrik41 so i add thanks

martin-landhi commented 1 year ago

@Henrik41 could you post the errors that you corrected? i cant load the config file

martin-landhi commented 1 year ago

I found the solution here:

magmi/plugins/inc/magmi_plugin.php line 146

$iarr = ($pvalue) ? explode(",", $pvalue) : [];

lmagmi/inc/magmi_config.php line 66

if (empty($this->_props)) {

and line 32

if (empty($this->_props)) {

That fix the issue and magmi works again in php8.1

Henrik41 commented 1 year ago

Not sure if it can help someone but I posted my magmi that works for me here:

https://github.com/Henrik41/magmi-php8.2