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

Setup fails at 94% - MacOS X / MAMP PRO #737

Closed
MihaiCraciun opened this issue Nov 12, 2014 · 22 comments
Closed

Setup fails at 94% - MacOS X / MAMP PRO #737

MihaiCraciun opened this issue Nov 12, 2014 · 22 comments
Labels
bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed

Comments

@MihaiCraciun
Copy link

Hello guys,

I really want to get passed the install phase but I think something is not right.
I tryed installing magento 2 two times . First with a light composer.json found here http://magento.stackexchange.com/questions/41591/magento-2-composer-install/41628#41628

Got an error saying :

[ERROR] exception 'Exception' with message '
Fatal error: Class 'Magento\Framework\Stdlib\DateTime\TimezoneInterface' not found in /Users/username/www/magento/vendor/magento/project-community-edition/app/bootstrap.php on line 56' in /Users/username/www/magento/vendor/magento/project-community-edition/lib/internal/Magento/Framework/Shell.php:80
Stack trace:

0 /Users/username/www/magento/vendor/magento/project-community-edition/setup/module/Magento/Setup/src/Model/Installer.php(509): Magento\Framework\Shell->execute('/usr/bin/php -f...', Array)

Quickly abandoned that and tried with the install steps from magento 2 repo : git clone, composer install in both root and setup folders.

I am on Mac OS Mavericks, using MAMP PRO 3.0.7.2, runing PHP 5.5.18
phpinfo says mcrypt is enabled but still when the installer reachers 94% I get this error :

Installing data fixtures:
/usr/bin/php -f '/Users/username/www/magento/dev/shell/run_data_fixtures.php' -- --bootstrap='MAGE_DIRS[base][path]=/Users/username/www/magento' 2>&1
[ERROR] exception 'Exception' with message '
Fatal error: Uncaught exception 'Exception' with message 'Module 'Magento_Core' depends on 'mcrypt' PHP extension that is not loaded.' in /Users/username/www/magento/lib/internal/Magento/Framework/Module/DependencyManager.php:56
Stack trace:

0 /Users/username/www/magento/lib/internal/Magento/Framework/Module/Declaration/Reader/Filesystem.php(107): Magento\Framework\Module\DependencyManager->checkModuleDependencies(Array, Array)

1 /Users/username/www/magento/var/generation/Magento/Framework/Module/Declaration/Reader/Filesystem/Proxy.php(95): Magento\Framework\Module\Declaration\Reader\Filesystem->read('global')

2 /Users/username/www/magento/lib/internal/Magento/Framework/Module/ModuleList.php(56): Magento\Framework\Module\Declaration\Reader\Filesystem\Proxy->read('global')

3 /Users/username/www/magento/lib/internal/Magento/Framework/ObjectManager/Factory/Factory.php(209): Magento\Framework\Module\ModuleList->__construct(Object(Magento\Framework\Module\Declaration\Reader\Filesystem\Proxy), Object(Magento\Frame in /Users/username/www/magento/lib/internal/Magento/Framework/Module/DependencyManager.php on line 56' in /Users/username/www/magento/lib/internal/Magento/Framework/Shell.php:80

Stack trace:

0 /Users/username/www/magento/setup/module/Magento/Setup/src/Model/Installer.php(509): Magento\Framework\Shell->execute('/usr/bin/php -f...', Array)

1 /Users/username/www/magento/setup/module/Magento/Setup/src/Model/Installer.php(377): Magento\Setup\Model\Installer->exec('-f %s -- --boot...', Array)

2 [internal function]: Magento\Setup\Model\Installer->installDataFixtures()

3 /Users/username/www/magento/setup/module/Magento/Setup/src/Model/Installer.php(263): call_user_func_array(Array, Array)

4 /Users/username/www/magento/setup/module/Magento/Setup/src/Controller/Install/StartController.php(102): Magento\Setup\Model\Installer->install(Array)

5 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(83): Magento\Setup\Controller\Install\StartController->indexAction()

6 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))

7 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))

8 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

9 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

10 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))

11 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))

12 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))

13 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

14 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(313): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

15 /Users/username/www/magento/setup/index.php(48): Zend\Mvc\Application->run()

16 {main}

Next exception 'Magento\Framework\Exception' with message 'Command returned non-zero exit code:
/usr/bin/php -f '/Users/username/www/magento/dev/shell/run_data_fixtures.php' -- --bootstrap='MAGE_DIRS[base][path]=/Users/username/www/magento' 2>&1' in /Users/username/www/magento/lib/internal/Magento/Framework/Shell.php:81
Stack trace:

0 /Users/username/www/magento/setup/module/Magento/Setup/src/Model/Installer.php(509): Magento\Framework\Shell->execute('/usr/bin/php -f...', Array)

1 /Users/username/www/magento/setup/module/Magento/Setup/src/Model/Installer.php(377): Magento\Setup\Model\Installer->exec('-f %s -- --boot...', Array)

2 [internal function]: Magento\Setup\Model\Installer->installDataFixtures()

3 /Users/username/www/magento/setup/module/Magento/Setup/src/Model/Installer.php(263): call_user_func_array(Array, Array)

4 /Users/username/www/magento/setup/module/Magento/Setup/src/Controller/Install/StartController.php(102): Magento\Setup\Model\Installer->install(Array)

5 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(83): Magento\Setup\Controller\Install\StartController->indexAction()

6 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))

7 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))

8 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

9 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

10 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))

11 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))

12 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))

13 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

14 /Users/username/www/magento/setup/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(313): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

15 /Users/username/www/magento/setup/index.php(48): Zend\Mvc\Application->run()

16 {main}

What am I doing wrong ?
PS: i checked the Mac version of PHP which is 5.4.30 and that one doesn't have mcrypt but when i ran the installer it showed me the MAMP PHP version 5.5.18 mentioned above so in theory it should run with that version.

@buskamuza
Copy link
Contributor

Currently Web installation runs a PHP script for installing data upgrades using PHP CLI. So if you have PHP CLI w/o mcrypt, you'll get this error on one of the final steps, as you describe.
We're working on fixing this issue: either check both PHP (web and CLI) to not confuse a user or use same Web PHP for running data upgrades or maybe some another approach.

Until it's fixed, I'd suggest you to ensure that your PHP CLI has mcrypt installed and try the installation once again.

About your first approach with installation - using composer.json found on the Internet - it's not really correct ... and the repository it depends on (magento/project-community-edition) may change. So I'd recommend to use 2nd approach for beginning.

@aohorodnyk
Copy link
Contributor

Hello,

You have the same problem as #714.
Last comment from @buskamuza about Symfony component for getting php-cli path.
You can set to variable environment const with name PHP_PATH and value "path to you php execution file" or you can remove your local php from MAC OS and set your php from MAMP like default php version.
PhpExecutableFinder has more variables which you can use. If you want, you can see it in code

P.S. how to set environment const http://stackoverflow.com/questions/146354/setting-php-variables-in-httpd-conf

Thanks

@ooxi
Copy link

ooxi commented Nov 12, 2014

Please invoke php -r "phpinfo();" | grep mcrypt and check for output. If mcrypt does not appear, the module is not installed. Your loaded php.ini should contain a line similar to extension=mcrypt.so

@aohorodnyk
Copy link
Contributor

@ooxi in MacOS default php does not exist mcrypt module, I said about solutions for this problem

@Den4ik
Copy link
Contributor

Den4ik commented Nov 12, 2014

Best solution for mac os http://php-osx.liip.ch/
It install all components

@ihor-sviziev
Copy link
Contributor

@Den4ik I think better solution for OSX - install php and other modules using Homebrew. More details you can find there. As additional feature - you may install different php versions.

@Den4ik
Copy link
Contributor

Den4ik commented Nov 12, 2014

@ihor-sviziev with http://php-osx.liip.ch/ you can install many versions and you can switching simply change symlink

@aohorodnyk
Copy link
Contributor

@Den4ik @ihor-sviziev I think better solution it's use one php version from web and cli and use different versions for different projects.
If you want, you can change global php (only change symlink), it's simple.

Or use packages @ihor-sviziev variant (if you want install all without MAMP and other built-in platforms)

@MihaiCraciun
Copy link
Author

After countless dead neurons i managed to finish the install.
Managed to instal mcrypt on Mac OS by downloading the php version that came preinstalled, built mcrypt from binaries -- note : the initial phpize returned blank where the php versions should have been ; fixed them via xcode-select --install.
But the trials didn't end there - i got another error

Exception' with message 'PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] No such file or directory
found a fix for that to - it was caused by a missing mysql.sock value for pdo_mysql.default_socket .
My exact value for /etc/php.ini that was needed:
pdo_mysql.default_socket=/Applications/MAMP/tmp/mysql/mysql.sock

All fine and dandy.. the thing is i can't login to the bloody backend. It keeps redirecting to the same url with no error upfront

http://m2theme/admin/dashboard/index/key/2abdd6fe69d8d4fa4a8c09ac764c5eed/
Tried a bad user / pass and it throws an warning about that, but with the right credentials - nothing.

... Help ? or should I open a new issue ?

@maksek
Copy link
Contributor

maksek commented Nov 12, 2014

@MihaiCraciun, thats interesting, seems like key is wrong. Easiest way to proceed (thats what i am doing), just drop DB, local.xml and all caches.

@MihaiCraciun
Copy link
Author

What are the exact steps ?

  1. rm app/etc/local.xml
  2. rm var/cache
  3. drop database
  4. run setup in browser again ?

Later edit: because I just tried them and it didn't solve the issue

@maksek
Copy link
Contributor

maksek commented Nov 12, 2014

hmmm... can you check var/log/* maybe there some info, or var/reports/?

@MihaiCraciun
Copy link
Author

only junk

Broken reference: the 'header_schedule_block0' element cannot be added as child to 'header', because the latter doesn't exist
Broken reference: the 'header_schedule_block0' tries to reorder itself towards 'user', but their parents are different: 'header' and '' respectively.
Broken reference: the 'ui.global.config' element cannot be added as child to 'footer', because the latter doesn't exist
Broken reference: the 'ui.global.config' tries to reorder itself towards '', but their parents are different: 'footer' and '' respectively.

@kandy
Copy link
Contributor

kandy commented Nov 13, 2014

All fine and dandy.. the thing is i can't login to the bloody backend. It keeps redirecting to the same url with no error upfront

Please, replace session file storage on db in local.xml and try login again.

- <session_save>files</session_save>
+ <session_save>db</session_save>

@buskamuza
Copy link
Contributor

@MihaiCraciun , could you check cookies for the website? Are there cookies for "/pub/..."?
And could you clarify what version you installed?

@MihaiCraciun
Copy link
Author

Tried accessing from incognito but still no luck. I instaled two days ago so it's the latest version. I'll try later today with a fresh install and hope for the best. 

@MihaiCraciun
Copy link
Author

@kandy no luck :( deleted var, accessed through incognito to avoid cookies.
One thing that strikes me as odd... the url shows up like http://m2atheme/admin/admin/dashboard/index/key/70dcce62afda97d816e29563d5441e72/
m2atheme is an alias i created for the magento install folder in mamp but is it ok for it to show admin two times ?

@kandy
Copy link
Contributor

kandy commented Nov 13, 2014

Looks like the problem with domain name. Some browsers do not store cookies for top level domain. Try change your domain. example m2atheme.dev

@MihaiCraciun
Copy link
Author

YEEEEEEEEEEESSSSS !!!!! thank you @kandy
Just to clear things up, wouldn't this have happened with a standard http://localhost/magento2 approach ?

@maksek
Copy link
Contributor

maksek commented Nov 14, 2014

nice catch @kandy.
@MihaiCraciun i am using localhost/magento2/ and i didn't have such issue.

@ooxi
Copy link

ooxi commented Nov 14, 2014

+1 @kandy

@verklov verklov closed this as completed Nov 18, 2014
mmansoor-magento pushed a commit that referenced this issue Jan 14, 2017
…t-UrlRewriteMap-develop-final

MAGETWO-58924 - Url rewrite map table lock
@bitmee
Copy link

bitmee commented Nov 5, 2017

Hey GUys,

I am having the same issue. It looks like @kandy solution resolved the problem.

Grateful if you'll could advice me where do I need to change the domain to try the solution and see whether it works for me.

Regards,
Aditya

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Nov 5, 2017
fe-lix- pushed a commit to fe-lix-/magento2 that referenced this issue Apr 6, 2018
fe-lix- pushed a commit to fe-lix-/magento2 that referenced this issue Apr 6, 2018
fe-lix- pushed a commit to fe-lix-/magento2 that referenced this issue Apr 6, 2018
fe-lix- pushed a commit to fe-lix-/magento2 that referenced this issue Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed
Projects
None yet
Development

No branches or pull requests