enriquepiatti / Magicento

PHPStorm plugin for Magento developers
115 stars 35 forks source link

[Magento1] eval.php not reachable #275

Closed thomaszbz closed 6 years ago

thomaszbz commented 6 years ago

I have configured Magicento1 3.1.4 as follows:

auswahl_415

However, the test for requesting eval.php fails:

auswahl_412

Please note that the URL is reachable via web browser (and so should PhpStorm).

Would it not be easier to just enter the whole URL of eval.php? That would also be easier to configure server-side (without working around .htaccess files forbidding things in the var directory).

=======

It also is not working when I use port 80 (and omit the port) instead of 8086.

enriquepiatti commented 6 years ago

Hi @thomaszbz, could you try adding a forward slash at the end of the URL (and try that without the port too again just in case) and also extend the Max Execution Time

thomaszbz commented 6 years ago

I already tried:

Still, Magicento reports the same error.

I'm using PhpStorm 2017.2.4, openjdk, ubuntu 16.04. The web server is a debian 8 VM (vagrant/virtualbox setup) with apache2 and PHP 5.6 installed.

thomaszbz commented 6 years ago

It works as soon as I'm changing the host name to an IP adress:

auswahl_419

With PHP execution in place, I can now search for Varien Object data keys:

auswahl_419_2

So this issue seems to be DNS related. The host name, however, was set as follows via /etc/hosts

## vagrant-hostmanager-start id: 68423b28-535b-4894-a265-828a1756c5c0
172.28.128.3    ipp.abc.dev

Now that port 80 is obviously reachable from PhpStorm, port filters or firewalls cannot play a role here.

How can this be that FF can resolve the IP but Magicento can't?

Please note that I'm using vagrant plugin hostmanager because the IP is dynamically generated and can change on each boot of the VM. I don't want to edit Magicento's config each time I boot up the machine.

enriquepiatti commented 6 years ago

it seems a problem with HttpURLConnection that is caching DNS internally, I will try to find a workaround to that if you can't set the IP directly

thomaszbz commented 6 years ago

It seems that Firefox cached something and I had multiple entries in /etc/hosts (earlier generated by hostmanager). With a clean /etc/hosts, everything was fine in 3.1.4. However, I restarted PhpStorm so that could have fixed it as well.

Disabling the DNS cache still would make sense so that PhpStorm does not have to be restarted every time the IP changes (via vagrant halt/up).

enriquepiatti commented 6 years ago

OK, 3.1.5 has a DNS disabled anyway, so I guess it should work fine if the IP changes again next time. Please reopen if it's not.