This topic is locked
[SOLVED]

 10.5 cannot connect to MS SQL Server with built in web server

2/14/2021 10:25:40 AM
PHPRunner General questions
J
jacktonghk authorDevClub member

It shows the below error message but it does not happen in 10.4. I know that we need to add extension to allow PHP to connect to SQL Server, I have done this for my own web server's php.ini. Does anyone face the same issue? Thank you. ~ Jack Tong
No SQL Server driver found in your PHP settings.

To enable SQL Server support add the following line to php.ini file:

extension=php_com_dotnet.dll

Admin 2/16/2021

You can make the same change in C:\Program Files\PHPRunner10.5\EmbeddedServer\php\php.ini.template file.

J
jacktonghk authorDevClub member 2/19/2021



You can make the same change in C:\Program Files\PHPRunner10.5\EmbeddedServer\php\php.ini.template file.


By default, the line is already there and I also found the php_com_dotnet.dll in C:\Program Files\PHPRunner10.5\EmbeddedServer\bin
Which PHP version is the embedded Server using? Maybe it is a version issue.

J
jacktonghk authorDevClub member 2/23/2021



By default, the line is already there and I also found the php_com_dotnet.dll in C:\Program Files\PHPRunner10.5\EmbeddedServer\bin
Which PHP version is the embedded Server using? Maybe it is a version issue.


Now I created a blank application to use the built-in web server and I got the following errors. Can anyone help? Thanks.
Warning: Unknown: failed to open stream: Invalid argument in Unknown on line 0
Fatal error: Unknown: Failed opening required 'C:/Users/Jack/文件/PHPRunnerProjects/Project3/output/menu.php' (include_path='.;C:\php\pear') in Unknown on line 0

Admin 2/23/2021

I don't know if this is relevant but maybe you should avoid using Unicode characters in the path to the Output folder?

J
jacktonghk authorDevClub member 2/25/2021

This may be an issue because if I change the folder name, it gives me another error message. However, the Chinese characters you see is the default Documents folder in the Tradition Chinese Windows 10.

Admin 2/25/2021

What was the order error message?

J
jacktonghk authorDevClub member 2/27/2021

This one.
No SQL Server driver found in your PHP settings.

To enable SQL Server support add the following line to php.ini file:

extension=php_com_dotnet.dll

J
jacktonghk authorDevClub member 3/1/2021

But version 10.4 works fine without any error.

Admin 3/1/2021

Did you make the suggested change to C:\Program Files\PHPRunner10.5\EmbeddedServer\php\php.ini.template file?

J
jacktonghk authorDevClub member 3/2/2021



Did you make the suggested change to C:\Program Files\PHPRunner10.5\EmbeddedServer\php\php.ini.template file?


The lines are built-in in the template, no need to add.

J
jacktonghk authorDevClub member 3/2/2021



The lines are built-in in the template, no need to add.


I also tested 10.5 on English Windows 10, no problem with MS SQL Server

Admin 3/2/2021

I don't know what else to suggest. In our test built-in web server in 10.5 works with SQL Server without any issues and without making any changes.

J
jacktonghk authorDevClub member 3/11/2021



I don't know what else to suggest. In our test built-in web server in 10.5 works with SQL Server without any issues and without making any changes.


Problem solved after upgrading to the latest build 36834.