Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magmi on apache in magento 2 #98

Open
UsmanIftikhar881 opened this issue Aug 28, 2021 · 24 comments
Open

Magmi on apache in magento 2 #98

UsmanIftikhar881 opened this issue Aug 28, 2021 · 24 comments

Comments

@UsmanIftikhar881
Copy link

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
Copy link

joshpen commented Sep 9, 2021

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

@UsmanIftikhar881
Copy link
Author

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
Copy link
Member

tmotyl commented Sep 13, 2021

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

@joshpen
Copy link

joshpen commented Sep 14, 2021

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
Copy link
Member

tmotyl commented Sep 14, 2021

@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
Copy link

joshpen commented Sep 14, 2021

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
Copy link

cbtrident commented Sep 30, 2021

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
Copy link

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
Copy link

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
Copy link

Ashwinitandale commented Oct 30, 2021 via email

@Ashwinitandale
Copy link

Ashwinitandale commented Oct 30, 2021 via email

@cbtrident
Copy link

hay Ashwini Tandale if you contact me on [email protected] 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
Copy link

Ashwinitandale commented Oct 30, 2021 via email

@cbtrident
Copy link

did not get
did you get it working

@nayanchamp
Copy link

nayanchamp commented May 26, 2023

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
Copy link

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

@nayanchamp
Copy link

@nayanchamp
Copy link

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

@onedolphin
Copy link

@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
Copy link

@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
Copy link

@nayanchamp You are simple the best!

@onedolphin
Copy link

@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
Copy link

puntable commented Sep 7, 2023

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
Copy link

Veena-kptl commented Mar 29, 2024

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

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

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

No branches or pull requests

9 participants