macopedia / magmi-m2

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

Magmi on apache in magento 2 #98

Open UsmanIftikhar881 opened 3 years ago

UsmanIftikhar881 commented 3 years ago

I have paste the magmi folder inside magento root directory. After that I have generated the magmi.ini bu renaming magmi-ini-default in magmi/conf and .htaccess inside magmi/web by renaming .htaccess-sample-php_cgi_fpm but when i try to access the url e.g., localhost_magento2/magmi/web/magmi.php then I'm getting error 404.

Can someone help me to configure magmi in magento 2. I'm using apache not nginx.

joshpen commented 3 years ago

I am seeing magmi no longer work after upgrading to magento 2.4.2 or higher.

UsmanIftikhar881 commented 3 years ago

I'm using magmi in Magento 2.4.3 with nginx. With Apache I didn't get any luck then I moved to nginx and it's working perfectly fine.

tmotyl commented 3 years ago

Create a separate vhost for magmi (and store it outside webroot of Magento). do not copy it inside pub folder of Magento

joshpen commented 3 years ago

I tried the Vhost method and can not get it to recognize the magmi.ini. Is there something special to do to get it to work or to set the magento basedir?

tmotyl commented 3 years ago

@joshpen I don't understand what issue are you facing. "can not get it to recognize the magmi.ini". Apache configuration doesn't influence whether Magmi can read ini file or not. I hope you're not trying to view .ini file through browser?

joshpen commented 3 years ago

I created a vhost for a seperate magmi folder and mapped to 8080 port. I created the magmi.ini with our setting for db and user, set the magento basedir as /var/www/html and get this message when trying to access magmi.php from browser :

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

cbtrident commented 3 years ago

anyone got instruction for setup vhost and making magmi work in apache with magento 2.4.3 it ok got it working i had to make listen to 8088 as 8080 is already been used. the my path is 8088/magmi/web/magmi.php anyway am wokring now

Ashwinitandale commented 3 years ago

I have paste the magmi folder inside magento root directory. After that I have generated the magmi.ini bu renaming magmi-ini-default in magmi/conf and .htaccess inside magmi/web by renaming .htaccess-sample-php_cgi_fpm but when i try to access the url e.g., localhost_magento2/magmi/web/magmi.php then I'm getting error 404.

Can someone help me to configure magmi in magento 2. I'm using apache not nginx

cbtrident commented 3 years ago

you need to setup a port and vhost on apache in ports.conf have Listen 8088 add as well as 8080 port is used by your elasticsearch you then should be able to do localhost_magento2:8088/magmi/web/magmi.php. this is how i made it work for me if you need anything else just say i help as best as i can as i had the same problem as you

Ashwinitandale commented 3 years ago

I change port from 81 to 88 but not get open magmi/web/magmi php

On Fri, 29 Oct, 2021, 5:35 pm cbtrident, @.***> wrote:

you need to setup a port and vhost on apache in ports.conf have Listen 8088 add as well as 8080 port is used by your elasticsearch you then should be able to do localhost_magento2:8088/magmi/web/magmi.php. this is how i made it work for me if you need anything else just say i help as best as i can as i had the same problem as you

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/macopedia/magmi-m2/issues/98#issuecomment-954688535, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATJTPMNRGCF5GFSDGVJ3FSTUJKL3FANCNFSM5C63ZXMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Ashwinitandale commented 3 years ago

Help me...

On Sat, 30 Oct, 2021, 10:58 am Ashwini Tandale, @.***> wrote:

I change port from 81 to 88 but not get open magmi/web/magmi php

On Fri, 29 Oct, 2021, 5:35 pm cbtrident, @.***> wrote:

you need to setup a port and vhost on apache in ports.conf have Listen 8088 add as well as 8080 port is used by your elasticsearch you then should be able to do localhost_magento2:8088/magmi/web/magmi.php. this is how i made it work for me if you need anything else just say i help as best as i can as i had the same problem as you

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/macopedia/magmi-m2/issues/98#issuecomment-954688535, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATJTPMNRGCF5GFSDGVJ3FSTUJKL3FANCNFSM5C63ZXMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

cbtrident commented 3 years ago

hay Ashwini Tandale if you contact me on carlb@zfssolution.co.uk i see if i can help you may have to give me temp access to setup for you but am sure you be able to sort

Ashwinitandale commented 3 years ago

Done.

On Sat, 30 Oct, 2021, 6:00 pm cbtrident, @.***> wrote:

hay Ashwini Tandale if you contact me on @.*** i see if i can help you may have to give me temp access to setup for you but am sure you be able to sort

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/macopedia/magmi-m2/issues/98#issuecomment-955201510, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATJTPMNJIHMCK2K7FDH7MXTUJPXQNANCNFSM5C63ZXMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

cbtrident commented 2 years ago

did not get did you get it working

nayanchamp commented 1 year ago

I also have same issue. I am using php 8.1 Doing below changes it started working for me.

In magmi/inc/properties.php file, I made below change

line # 22 Before protected $_props = []; After protected $_props = null;

onedolphin commented 1 year ago

@nayanchamp Which zip have you downloaded? Can you send me the link please so I will try again?

nayanchamp commented 1 year ago

https://github.com/macopedia/magmi-m2

nayanchamp commented 1 year ago

@onedolphin here is the link https://github.com/macopedia/magmi-m2

onedolphin commented 1 year ago

@nayanchamp Thank you, this is the one I was trying but for some reason im even unable to login into magmi, it says to create the magmi.ini which i have created and modified. Any idea?

onedolphin commented 1 year ago

@nayanchamp Thank you, this is the one I was trying but for some reason im even unable to login into magmi, it says to create the magmi.ini which i have created and modified. Any idea?

@nayanchamp Ohh sorry i made the change and can access, will try again!

onedolphin commented 1 year ago

@nayanchamp You are simple the best!

onedolphin commented 1 year ago

@nayanchamp Hi again. Hope you can help, now im getting sometimes this error:

text/x-generic error_log ( ASCII text ) [03-Jun-2023 18:04:48 UTC] PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in home/magmi/plugins/base/general/reindex/options_panel.php on line 21 [03-Jun-2023 18:04:48 UTC] PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in home/magmi/plugins/inc/magmi_plugin.php on line 146 [03-Jun-2023 18:04:48 UTC] PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in home/magmi/web/magmi_web_utils.php on line 6 [03-Jun-2023 18:04:48 UTC] PHP Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in home/magmi/web/magmi_web_utils.php on line 9 [03-Jun-2023 18:04:48 UTC] PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in home/magmi/plugins/inc/magmi_plugin.php on line 146 [03-Jun-2023 18:04:48 UTC] PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in home/magmi/web/magmi_web_utils.php on line 6 [03-Jun-2023 18:04:48 UTC] PHP Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in home/magmi/web/magmi_web_utils.php on line 9 [03-Jun-2023 18:04:48 UTC] PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in home/magmi/plugins/inc/magmi_plugin.php on line 146 [03-Jun-2023 18:04:48 UTC] PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in home/magmi/web/magmi_web_utils.php on line 6 [03-Jun-2023 18:04:48 UTC] PHP Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in home/magmi/web/magmi_web_utils.php on line 9 [03-Jun-2023 18:04:48 UTC] PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in home/magmi/plugins/inc/magmi_plugin.php on line 146 [03-Jun-2023 18:04:48 UTC] PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in home/magmi/web/magmi_web_utils.php on line 6 [03-Jun-2023 18:04:48 UTC] PHP Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in home/magmi/web/magmi_web_utils.php on line 9 [03-Jun-2023 18:04:52 UTC] PHP Deprecated: Function strftime() is deprecated in home/magmi/web/ajax_gettime.php on line 3 [03-Jun-2023 18:04:53 UTC] PHP Deprecated: auto_detect_line_endings is deprecated in home/magmi/inc/magmi_csvreader.php on line 80 [03-Jun-2023 18:04:53 UTC] PHP Deprecated: strcmp(): Passing null to parameter #2 ($string2) of type string is deprecated in home/magmi/engines/magmi_productimportengine.php on line 1252 [03-Jun-2023 18:04:53 UTC] PHP Deprecated: Function strftime() is deprecated in home/magmi/engines/magmi_productimportengine.php on line 1375 [03-Jun-2023 18:04:53 UTC] PHP Deprecated: Function strftime() is deprecated in home/magmi/engines/magmi_productimportengine.php on line 828 [03-Jun-2023 18:04:53 UTC] PHP Warning: A non-numeric value encountered in home/magmi/web/progress_parser.php on line 115 [03-Jun-2023 18:04:53 UTC] PHP Fatal error: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, string given in home/magmi/web/progress_parser.php:120 Stack trace:

0 home/magmi/web/progress_parser.php(120): round('1.7881393432617...', 4)

1 home/magmi/web/progress_parser.php(36): DefaultProgressLineParser->parseData('itime', '1 - 1.788139343...')

2 home/magmi/web/magmi_progress.php(16): ProgressParser->parse()

3 {main}

thrown in home/magmi/web/progress_parser.php on line 120 [03-Jun-2023 18:04:54 UTC] PHP Warning: A non-numeric value encountered in home/magmi/web/progress_parser.php on line 115 [03-Jun-2023 18:04:54 UTC] PHP Fatal error: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, string given in home/magmi/web/progress_parser.php:120

puntable commented 1 year ago

I also have same issue. I am using php 8.1 Doing below changes it started working for me.

In /home/outlet-piscinas-dev/htdocs/dev.outlet-piscinas.com/pub/magmi/inc/properties.php file, I made below change

line # 22 Before protected $_props = []; After protected $_props = null;

I can confirm, this also solved this issue for me.

Veena-kptl commented 7 months ago

line # 22 Before protected $_props = []; After protected $_props = null;

it perfectly solve my issue and saved a lot of time thanks @nayanchamp