I am getting something really weird.
So I use Laravel projects with vagrant already. But I need to install Symfony2. Therefore I adapt my Homestead.yaml files on both PC and Laptop(both systems running Linux Mint 17.3, KDE). I added the latest vagrant box add laravel/homestead, which is atm 0.5.0 on both systems.
Homestead.yaml then looks on both systems like this:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Projects
to: /home/vagrant/Projects
sites:
-(laravel projects)
- map: pma.local
to: /home/vagrant/Projects/phpMyAdmin-4.6.0-english/
- map: symfony.local
to: /home/vagrant/Projects/symfony/web/
type: symfony
databases:
- symfony
Then I add as root in the /etc/hosts file the following line like this on both systems.
192.168.10.10 other-laravel-projects.local pma.local symfony.local
After that I vagrant up && vagrant ssh. As vagrant, I do
$ sudo curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony
$ sudo chmod a+x /usr/local/bin/symfony
$ symfony new symfony 2.8
After that, I still cannot access the http://symfony.local/config.php. So I add my IP address, which I can figure out via
var_dump($_SERVER['REMOTE_ADDR'])
in /web/config.php
if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
'127.0.0.1',
'::1',
'my.ip.address.1',
))) {
header('HTTP/1.0 403 Forbidden');
exit('This script is only accessible from localhost.');
}
Then I can finally access http://symfony.local/config.php. The problem is on my PC symfony's Configuration Checker says All checks passed successfully. Your system is ready to run Symfony applications.
But on my laptop, symfony's Configuration Checker says RECOMMENDATIONS To enhance your Symfony experience, it's recommended that you fix the following:
- intl extension should be available Install and enable the intl extension (used for validators).
I tried composer require symfony/intl first, which did not fix it. Then I looked for php.ini files. The PC box has /etc/php 5.5/5.6/7.0 folders, whereas the laptop box only has 5.6/7.0, but not sure, whether that's it. Shouldn't they be the same anyway, isn't that the purpose of the boxes, to provide the same setup?