NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
phpdock.ini relative path to PHP and IE7 delay on execution


Joined: 14 Apr 2009
Posts: 1
Reply with quote
Firstly I have a simple question. All the documentation and examples for PHPDock seem to use an absolute path to the PHP executable under the [Handlers] section in the phpdock.ini file.

[Handlers]
application/x-httpd-php="C:\Program Files\nusphere\phpdock\php\php-cgi.exe"

However recently as a customer demo I had to install a PHPDock application onto a USB key, and as the drive letter may differ depending on the enviroment I tried the following.

[Handlers]
application/x-httpd-php=".\php\php-cgi.exe"

And it works fine. I am now preparing the installer for the actual deployment of this solution and I am wondering why use an absolute path at all in the php.ini for this line? Is there any reason to do so?


Secondly I noticed a quirk of IE7 that affects PHPDock. I recently installed a PHPDock application onto a brand new machine running Windows XP SP3 and IE7. Upon execution PHPDock would take a really long time to bring up the first page (approximately 20 seconds) but after that it was fine.

It turns out that the default Intranet security settings in IE7 cause this. There is two ways to fix it.

As it is the security lookup of localhost that causes the delay, in phpdock.ini under the [HTTPClient] section change:
InitialUrl=http://localhost:${HTTPServer:Listen}/ to InitialUrl=http://127.0.0.1:${HTTPServer:Listen}/

Alternatively in IE7 go to [Tools->Internet Options->Security->Local intranet->Sites] and untick the box
"Automatically detect intranet network", that will also fix it.

*** update
It turns out that the "Automatically detect intranet network" setting in IE7 tries to do a NETBIOS lookup of localhost which causes the delay
View user's profileFind all posts by mkerrSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
And it works fine. I am now preparing the installer for the actual deployment of this solution and I am wondering why use an absolute path at all in the php.ini for this line? Is there any reason to do so?


Yep, relative path is supported too.
Choise is yours. If you can't use absolute path, use relative.


Quote:
It turns out that the "Automatically detect intranet network" setting in IE7 tries to do a NETBIOS lookup of localhost which causes the delay


I noticed that in some cases Windows installs differently.
The file responsible for mapping localhost to 127.0.0.1 is %windir%\system32\drivers\etc\hosts but it may not contains such entry at all or may contain ::1 ipv6 address instead of 127.0.0.1 (ipv4). I'd recommend you to check hosts and add "127.0.0.1 localhost" if it is not there.

Also delays may be caused by "Internet connection status" which is checked even for the local host. Indeed, if your machine is connected to the internet through an ADSL modem and you're running browser while the machine is offline, browser will wait for "something" before connecting to your localhost.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
phpdock.ini relative path to PHP and IE7 delay on execution
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic