PhpStorm, built-in web-server at 63342 and PHP interpreter

Hello.

Since built-in webserver at port:63342 is FastCGI, - shall I install for it 'non thread safe' version of PHP (like for IIS as it mentioned here http://windows.php.net/download) or 'thread-safe' ?

Since I cannot find adequate information about built-in webserver at port:63342 - what folder has to be used as document root while using this server ? - Anyone?

Thank you.

5 comments
Comment actions Permalink

Hi there,

Since built-in webserver at port:63342 is FastCGI, - shall I install for it 'non thread safe' version of PHP (like for IIS as it mentioned here http://windows.php.net/download) or 'thread-safe' ?

I'm not really using this (I'm using full IIS 7.5, since most of my projects will end up running on the same IIS 7.5 under Windows Server OS) .. but the same PHP used for IIS works fine with built-in server (currently 5.5.16 nts x32) in those few tests that I did few months ago.

Since I cannot find adequate information about built-in webserver at port:63342 - what folder has to be used as document root while using this server ?

URLs used with built-in server look like this: http://localhost:63342/PROJECT_NAME/path/to/file.php

File in your project root (e.g. PROJECT_ROOT/index.php) will be referred as http://localhost:63342/PROJECT_NAME/index.php

I do not remember where $_SERVER['DOCUMENT_ROOT'] will be pointing (never bothered with this as I have stopped using it quite long time ago). But if you need it -- just check phpinfo(); output.  You may do your include/require statement differently without referring to doc root at all.

P.S.
You can make it work with this shorter and more real-website-alike URL ( http://PROJECT_NAME:63342/index.php ), but for this you will have to edit your hosts file (or local DNS server) to point PROJECT_NAME to your PC.

0
Comment actions Permalink

Thank you.
- php-5.4.32-nts-Win32-VC9-x86 also works with built-in web server at port:63342.
- Now I can launch both '*.php' and '*.html' via Alt+F2 and http://localhost:63342.

Have a good day.

0
Comment actions Permalink

following my former reply:
in case one's project is placed in C:\php_projects\mysite - $_SERVER['DOCUMENT_ROOT'] will point to C:/php_projects/mysite , which is much better in comparison with XAMPP where $_SERVER['DOCUMENT_ROOT'] points to xampp/htdocs even if one holds project root in xampp\htdocs\mysite

0
Comment actions Permalink

which is much better in comparison with XAMPP where $_SERVER['DOCUMENT_ROOT'] points to xampp/htdocs even if one holds project root in xampp\htdocs\mysite

Have you tried to configure your XAMPP?

Sounds like you were serving ALL sites from the same virtual host. If so -- then no surprise here. If you would create virtual host entry for each site (may require editing config files directly) then you would be able to provide document root for each of them individually.

0
Comment actions Permalink

Agree with you.
- But, I always choose the most short and easy solution out of several equally effective ;)
- Therefore, 'localhost' in browser address bar is acceptable for me while in development mode.
- BTW, Openserver creates virtual host automatically, not making mess inside 'httpd-vhosts' and 'hosts'

0

Please sign in to leave a comment.