-
Notifications
You must be signed in to change notification settings - Fork 224
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
Magento Core Commands cannot be loaded. Please verify if "bin/magento" is running #1164
Comments
A second test showing this seems to be a problem with the new version, 7.0.1. A different site, Magento 2.4.3-p2, older version works fine, new version after update throws error. See below. [root@localhost htdocs]# php74 n98-magerun2.phar sys:info Magento System Information +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ RECENT CHANGES7.0.1
7.0.0
Successfully updated n98-magerun2[root@localhost htdocs]# php74 n98-magerun2.phar sys:info Magento System Information +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
I cloned the repo and did a build using php 7.4.33. Copied the newly phar to the Magento instance and it runs without throwing that error. |
@xtremevision Thanks for your analysis. Sadly I cannot reproduce the error in my devbox. You mentioned that the issue is fixed if the phar is compiled with PHP 7.4. |
@xtremevision I changed the PHP version in the phar deployment. The development version is now generated with PHP 7.4. |
Hi Christian,
I have not tried compiling with php 8.x, but I experienced the same
problem again last night on another website. I had to recompile on that
machine in order to get it to work. I do not know why this is happening.
It's the first time I've seen this error/behavior and I've used
n98magerun[2] for donkeys years.
I will update you if I find anything else.
Thanks,
Michael.
On 30/03/2023 11:42, Christian Münch wrote:
@xtremevision <https://github.com/xtremevision> Thanks for your
analysis. Sadly I cannot reproduce the error in my devbox.
The phar works with PHP 8.1 and PHP 8.2 there.
One difference between 7.0.0 and 7.0.1 is that we use the same
interpreter to call the Magento commands.
In the old version the bin/magento commands were started with the
standard PHP of your system which is not what we want.
You mentioned that the issue is fixed if the phar is compiled with PHP
7.4.
We currently build the phar file with PHP 8.0.12 in a build pipeline.
I will check if this could be the problem.
—
Reply to this email directly, view it on GitHub
<#1164 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABR3CETRX7NCEMKUUOQ3OFDW6WSUXANCNFSM6AAAAAAWLFQVJE>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Michael Mussulis
CEO
Xtreme Vision Systems SRL
Reg Com: J40/23/03.01.2012
CUI: 29505826
mobilePhone
+ 40 721 052 013 <tel:+%201%20772%20418%203463>
mobilePhone
+ 1 772 418 3463 <tel:+%201%20772%20418%203463>
emailAddress
***@***.*** ***@***.***>
website
https://xtreme-vision.net <https://xtreme-vision.net>
|
@xtremevision Older Magerun version were compiled with PHP 7.4. |
Yes, it's working. I deleted my compiled version and downloaded latest
from: wget https://files.magerun.net/n98-magerun2.phar
thanks for the fix.
I think it would be good for you to make a small change, increase the
version to 7.0.2 and let me do a "self-update" to see if it breaks or not.
Thanks,
Michael.
On 30/03/2023 12:01, Christian Münch wrote:
@xtremevision <https://github.com/xtremevision> Older Magerun version
were compiled with PHP 7.4.
I updated the PHP version of the deployment server. This changes are
now reverted.
The development phar is now build with PHP 7.4.
Would be good to know if this phar file works in your environment, now.
—
Reply to this email directly, view it on GitHub
<#1164 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABR3CER554HJHH7ZQBVZV5TW6WU4DANCNFSM6AAAAAAWLFQVJE>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Michael Mussulis
CEO
Xtreme Vision Systems SRL
Reg Com: J40/23/03.01.2012
CUI: 29505826
mobilePhone
+ 40 721 052 013 <tel:+%201%20772%20418%203463>
mobilePhone
+ 1 772 418 3463 <tel:+%201%20772%20418%203463>
emailAddress
***@***.*** ***@***.***>
website
https://xtreme-vision.net <https://xtreme-vision.net>
|
New version 7.0.2 is deployed. Thanks. I close the issue. |
I am sorry, but it's still happening. I released a site to a new vps,
and after doing a self-update I am getting the same error :(
On 30/03/2023 14:09, Christian Münch wrote:
Closed #1164 <#1164> as
completed.
—
Reply to this email directly, view it on GitHub
<#1164 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABR3CEVEWBNR6DWFE7W6CT3W6XD67ANCNFSM6AAAAAAWLFQVJE>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Michael Mussulis
CEO
Xtreme Vision Systems SRL
Reg Com: J40/23/03.01.2012
CUI: 29505826
mobilePhone
+ 40 721 052 013 <tel:+%201%20772%20418%203463>
mobilePhone
+ 1 772 418 3463 <tel:+%201%20772%20418%203463>
emailAddress
***@***.*** ***@***.***>
website
https://xtreme-vision.net <https://xtreme-vision.net>
|
@xtremevision Can you check if your |
@xtremevision I see that you run the tool with a relative path. I will check if this can cause the issue. |
@xtremevision I was able to reproduce the issue. |
@xtremevision I should have fixed the issue. |
[root@]# php81 -v
PHP 8.1.14 (cli) (built: Jan 4 2023 06:45:14) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.14, Copyright (c) Zend Technologies
with Zend OPcache v8.1.14, Copyright (c), by Zend Technologies
On 09/04/2023 08:07, Christian Münch wrote:
@xtremevision <https://github.com/xtremevision> I was able to
reproduce the issue.
It's happening if the default PHP version is e.g. 7.4 but Magento
requires at least PHP 8.1.
In n98-magerun2 >7.0.0 we load the command list by calling the
bin/magento script and let it return a JSON feed of the command.
If you specify the PHP version the command list is currently not
loaded via the specified PHP interpreter. I wil provide a fix for that.
—
Reply to this email directly, view it on GitHub
<#1164 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABR3CEQJI3CH7GJNOWS5C6LXAKRABANCNFSM6AAAAAAWLFQVJE>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Michael Mussulis
CEO
Xtreme Vision Systems SRL
Reg Com: J40/23/03.01.2012
CUI: 29505826
mobilePhone
+ 40 721 052 013 <tel:+%201%20772%20418%203463>
mobilePhone
+ 1 772 418 3463 <tel:+%201%20772%20418%203463>
emailAddress
***@***.*** ***@***.***>
website
https://xtreme-vision.net <https://xtreme-vision.net>
|
[root@]# php74 -v
PHP 7.4.33 (cli) (built: Nov 9 2022 08:01:02) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with the ionCube PHP Loader + ionCube24 v11.0.1, Copyright (c)
2002-2022, by ionCube Ltd.
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
On 09/04/2023 08:07, Christian Münch wrote:
@xtremevision <https://github.com/xtremevision> I was able to
reproduce the issue.
It's happening if the default PHP version is e.g. 7.4 but Magento
requires at least PHP 8.1.
In n98-magerun2 >7.0.0 we load the command list by calling the
bin/magento script and let it return a JSON feed of the command.
If you specify the PHP version the command list is currently not
loaded via the specified PHP interpreter. I wil provide a fix for that.
—
Reply to this email directly, view it on GitHub
<#1164 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABR3CEQJI3CH7GJNOWS5C6LXAKRABANCNFSM6AAAAAAWLFQVJE>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Michael Mussulis
CEO
Xtreme Vision Systems SRL
Reg Com: J40/23/03.01.2012
CUI: 29505826
mobilePhone
+ 40 721 052 013 <tel:+%201%20772%20418%203463>
mobilePhone
+ 1 772 418 3463 <tel:+%201%20772%20418%203463>
emailAddress
***@***.*** ***@***.***>
website
https://xtreme-vision.net <https://xtreme-vision.net>
|
Confirmed fix on both counts. Good work! :)
On 09/04/2023 08:31, Christian Münch wrote:
@xtremevision <https://github.com/xtremevision> I should have fixed
the issue.
You can test the fix by updating to the development version via
|n98-magerun2.phar self-update --unstable|.
—
Reply to this email directly, view it on GitHub
<#1164 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABR3CEQ7Y5BY4HX743626MTXAKT2NANCNFSM6AAAAAAWLFQVJE>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Michael Mussulis
CEO
Xtreme Vision Systems SRL
Reg Com: J40/23/03.01.2012
CUI: 29505826
mobilePhone
+ 40 721 052 013 <tel:+%201%20772%20418%203463>
mobilePhone
+ 1 772 418 3463 <tel:+%201%20772%20418%203463>
emailAddress
***@***.*** ***@***.***>
website
https://xtreme-vision.net <https://xtreme-vision.net>
|
@xtremevision I just deployed the fix with 7.0.3. |
@cmuench |
@taoufiqaitali Wow. That's strange. |
@taoufiqaitali I see that we catch an exception. I will add the exception message to the output. |
@cmuench yes yes it work now, i notice that it require to run mysql |
Also relates to netz98#1164
@simpa407 I just installed a Magento 2.4.3 and tried the current n98-magerun2 version with PHP 7.4. |
@cmuench Yes, everything works fine. Just show error when I debug function on cron |
@simpa407 ok. Interesting. This means the error is gone if xdebug is off? |
Hi guys. The issue might be here vendor/symfony/process/Process.php |
@epolish Thanks for the insights. :-) Let's see if we can fix that. |
Also relates to netz98#1164
Describe the bug
After upgrading Magento to 2.4.6 I am getting this error:
Magento Core Commands cannot be loaded. Please verify if "bin/magento" is running.
Only n98-magerun2 commands are available until the issue is fixed.
Expected behaviour
No errors shown, all command available.
Steps to reproduce the issue
Execute: php81 n98-magerun2.phar (or php82)
Technical details
Centos 7 x64, php81 or php82
n98-magerun2 7.0.1
The text was updated successfully, but these errors were encountered: