To all the VSCode users. Two questions if I may.
First one. I am using the -f command line parameter in the launch.json config to specify the default document for a site.
But it only works if I use the page name index.php. Default.php, for example, isn't found. I have to rename the home page to
index.php before it will resolve. It's seems to ignore whatever I put in the -f parameter and only ever looks
for index.php and only resolves if it finds it. Is there an override in VS Code for this somewhere?
Second, I have a site that runs under IIS. The site has a SQL Server backend database. I am using SQLSVR
to access the database. The site works perfectly under IIS. If I create a config in VS Code and try to run the
same physical site using the built in server I get a message :
Fatal error: Uncaught Error: Call to undefined function sqlsrv_connect()
I have the SQLTools and SQLTools Microsoft SQL Server/Azure extensions added to VS Code.
Other added extensions are :
PHP All-in-one PHP support
PHP Intellisense
PHP Profiler
I have created a connection to my database and can run queries successfully against the instance in VS Code.
In the programs that use the sqlsrv objects intellisense knows what they are and exposes their properties
and methods to me in the editor.
So I'm bewildered as to why I get the "Call to undefined function sqlsrv_connect()" error at run time.
Do I need to reference the drivers somewhere in VS Code?
So that the VS Code run time can see them?
PHP 7.4.33 by the way. Both IIS and VS Code are pointing to the same physical PHP
folder and using the same php.ini file.
Thanks
Ray Pooley