richdynamix / magestead

The Vagrant Solution for Magento Developers
81 stars 29 forks source link

Local XML not generated; OS X; Magento 1 #109

Open ghost opened 7 years ago

ghost commented 7 years ago

Having an issue:

Autoloader patch to public/app/Mage.php was applied successfully Installing Magento Software /usr/local/rvm/scripts/extras/bash_zsh_support/chpwd/function.sh: line 5: cd: /var/www/public: No such file or directory Could not open input file: install.php PHP Warning: file_get_contents(/Users/brewster/Desktop/visionsharp/public/app/etc/local.xml): failed to open stream: No such file or directory in /Users/brewster/.composer/vendor/richdynamix/magestead/src/Magestead/Installers/MagentoProject.php on line 214

Warning: file_get_contents(/Users/brewster/Desktop/visionsharp/public/app/etc/local.xml): failed to open stream: No such file or directory in /Users/brewster/.composer/vendor/richdynamix/magestead/src/Magestead/Installers/MagentoProject.php on line 214

[Exception] String could not be parsed as XML

My config is

Lets configure your project's VM Configure the IP for your VM (192.168.47.47): How many CPU's would you like to use? (1): Define the VM memory limit (2048): Lets configure your server Which OS would you like to install? [0] CentOS 6.5 [1] Ubuntu 14

1 Which webserver would you like? [0] NGINX [1] Apache 0 Which version of PHP should be installed? [0] 56 [1] 70 0 Lets configure your project's application Which application do you want to install? [0] Magento [1] Magento2 0

I'm on a Mac, OS X Serria

clotted commented 6 years ago

I have the same on macOS High Sierra. All php modules are present.

This seems to be the likely issue, as per Line 214 in MagentoProject.php $localXml = file_get_contents($projectPath . $localFile);

http://php.net/manual/en/function.file-get-contents.php which states: An E_WARNING level error is generated if filename cannot be found

As the local.xml does not exist yet, it throws exception. That seems to match what we are seeing. I'm not sure of what needs to change in MagentoProject.php, but that looks like the problem. It needs some logic to handle the exception

@richdynamix Any chance you can fix? There are multiple reports of the same

pstudnicki commented 6 years ago

Having the same problem on High Sierra. Workaround before this problem is fixed is to go into sudo su - before running magestead

clotted commented 6 years ago

Thanks! I’ll give that a try when I have time. Have since moved to using Box.Scotch.io and works perfectly.