microsoft / msphpsql

Microsoft Drivers for PHP for SQL Server
MIT License
1.81k stars 374 forks source link

Future planning #58

Closed gregrobson closed 5 years ago

gregrobson commented 9 years ago

This is more of a recommendation/request, rather than an issue.

The Go PHP7 group are looking to make sure that as many extensions as possible are ready for PHP7's release later this year.

Previously the SQL Server driver has been slow to keep up with new releases. Since moving to GitHub there have been a lot of improvements and 5.6 is supported :smile:

It would be really great if SQL Server was supported out of the box when PHP7 is released!

More information about Go PHP7 can be found on their own pages: https://github.com/gophp7/gophp7-ext

dageddy commented 8 years ago

Thanks for the 64-bit driver!

I can't seem to get the current ODBC driver 11 to work in Windows 2012 R2. Anyone tried the ODBC driver 13 preview at https://www.microsoft.com/en-us/download/details.aspx?id=50420 ? Or am I missing something..

meet-bhagdev commented 8 years ago

@PakL Thank you! @dageddy The ODBC 13 preview is not compatible with the PHP Driver yet. We are working on it. What issues are you experiencing while using the ODBC Driver 11 on Windows 2012 R2.

Cheers, Meet

DigitalSolo commented 8 years ago

I have been too busy to really dig into this beta driver as of yet. I hope to take it through it's paces this weekend. I would be curious if anyone can validate the performance gain that PHP 7 with the 64 Bit native SQL_SRV driver boasts.

dageddy commented 8 years ago

@meet-bhagdev Thanks for confirming ODBC 13 preview is not compatible. Recently the download link for 64bit ODBC 11 disappeared. So I installed a copy that was downloaded last year and it works. Today I see the ODBC 11 link but hosted under "amd64" folder.. is there no x64 version?

DigitalSolo commented 8 years ago

I downloaded the one https://www.microsoft.com/en-us/download/details.aspx?id=36434 listed as amd64 and it worked on my Intel machine perfectly.

dageddy commented 8 years ago

@DigitalSolo Thanks. I will try the amd64 copy then.

DigitalSolo commented 8 years ago

If for some reason it changed I can zip and email you the one I downloaded a couple of days ago :)

meet-bhagdev commented 8 years ago

@dageddy you can fetch the ODBC Driver from here: https://www.microsoft.com/en-us/download/details.aspx?id=36434

Once you click on the Download button it will ask you to pick the 64 bit msi (
1033\amd64\msodbcsql.msi) or the 32 bit msi (1033\x86\msodbcsql.msi ).

Let us know if you still have trouble and we will look into this. We will also update our documentation to make this clear.

Thanks, Meet

TampaCraig commented 8 years ago

@meet-bhagdev Thanks for the work you and your team are putting into this. My question is what the best course of action the we, the general PHP development community, can follow to get the importance of your work known to the decision makers and get your team more resources. Combined with the lack of direct support in Visual Studio (as opposed to Python, Ruby, etc.) and the staleness of the PHP on IIS site, among other things, it seems to the outside observer, that PHP is taken by MS at large as a tertiary language. How can we, from your perspective, help to turn this around?

Thanks again!

meet-bhagdev commented 8 years ago

@TampaCraig ,

Glad to hear from you. It is always great to have a passionate and dedicated community like the one we have for PHP. There are numerous efforts going on across Microsoft to ensure PHP is considered a primary language. You can help us identify areas that are most important to you and thereby help us prioritize. Having input from the community with regards to what matters the most to them will definitely help us scope out the work and channel our resources in the right direction. What are the specific use cases (in addition to the ones you mentioned above) you as a PHP developer are finding out today where Microsoft could do better at supporting you. I encourage you to voice your thoughts here and/or by email- opensource@microsoft.com

Cheers, Meet

TampaCraig commented 8 years ago

Thanks Meet, I'll definitely put some earnest thought into it and follow your advice in writing opensource@microsoft.com. If "data is the new electricity" then software is the conduit by which it is conveyed and transformed. I think we will need many different routes, conductors, and transformers that interoperate to allow us electricians to create integrated solutions.

I'm happy to see MS opening its toolbox, and hope for more to come. It inspired me to move my PHP based Intranet to Windows/IIS from Linux/https, let's see where more interoperability will take us in the future.

sirio3mil commented 8 years ago

Your idea is great @TampaCraig, I will also give my support and suggestions to this email. Thanks a lot @meet-bhagdev for this.

joe-udwin-lrn commented 8 years ago

We use Drupal on IIS with Sql Server. Drupal serves as the back end for more than 1 million websites and boasts a community of more than 600,000 users and 25,000 developers who have contributed more than 20,000 modules.

If Microsoft wants OP OS and Sql server licensing and Azure revenue from this group then they need to improve the performance and reliability of the Sql Server driver.

So while it is great that you are working on the features to release the Sql Server driver for PHP, I would also like to see regular benchmarks released that display the performance characteristics of the driver. And if you are ambitious and competitive then you would do this alongside the competition for context!

DigitalSolo commented 8 years ago

If I perform an insert with an invalid field name (doesn't exist in table) I am not getting any error message back pointing me to an invalid field name after calling: sqlsrv_errors() INSERT INTO MyTable ([FieldName1],[FieldName1],[**InvalidFieldName**]) VALUES(1,2,3); SELECT SCOPE_IDENTITY() as ID

Nick74k commented 8 years ago

Trying to use driver php_sqlsrv_7_ts.dll instead of php_sqlsrv_53_ts_vc9. Code page 1251. All is working good except one thing - function sqlsrv_errors, returning error, produced by SQL server, converts all non-english letters to '?'. Is it posiible to correct this somehow? Not sure is this a problem of sqlsrv driver or ODBC driver 11 (Which replaces SQL Server Native Client 10.0, as I understand)...

tschallacka commented 8 years ago

try saving in nvarchar instead of varchar

Verzonden vanuit Outlook Mobilehttps://aka.ms/blhgte

On Thu, Mar 31, 2016 at 12:52 AM -0700, "Nick74k" notifications@github.com<mailto:notifications@github.com> wrote:

Trying to use driver php_sqlsrv_7_ts.dll instead of php_sqlsrv_53_ts_vc9. Code page 1251. All is working good except one thing - function sqlsrv_errors, returning error, produced by SQL server, converts all non-english letters to '?'. Is it posiible to correct this somehow? Not sure is this a problem of sqlsrv driver or ODBC driver 11 (Which replaces SQL Server Native Client 10.0, as I understand)...

You are receiving this because you were mentioned. Reply to this email directly or view it on GitHubhttps://github.com/Azure/msphpsql/issues/58#issuecomment-203803641

Nick74k commented 8 years ago

_tschallacka _ it is hard to do when i already have 700 tables with thousands of fields with varchar type... Solved problem now by passing 'CharacterSet' => 'UTF-8' and encoding/decoding all queries and results to/from UTF-8, but it's a crutch. ((

tschallacka commented 8 years ago

Ouch... Well that sucks. Im lucky i found out that caveat with 75 tables. I suggest you export create scripts, change varchar into nvarchar in those, then insert into new select * from old

If you have multimillion records i suggest batching that, but it can be done in a day, maybe two, then rename old to old.back and new to old.

Takes effort, but is much more error free that converting.

Verzonden vanuit Outlook Mobilehttps://aka.ms/blhgte

On Fri, Apr 1, 2016 at 2:00 AM -0700, "Nick74k" notifications@github.com<mailto:notifications@github.com> wrote:

tschallacka it is hard to do when i already have 700 tables with thousands of fields with varchar type... Solved problem now by passing 'CharacterSet' => 'UTF-8' and encoding/decoding all queries and results to/from UTF-8, but it's a crutch. ((

You are receiving this because you were mentioned. Reply to this email directly or view it on GitHubhttps://github.com/Azure/msphpsql/issues/58#issuecomment-204318311

meet-bhagdev commented 8 years ago

@Nick74k I have created a new issue the non English character issue for better tracking - https://github.com/Azure/msphpsql/issues/80.

Let us know if @tschallacka's recommendation works for you. We will investigate this on our end regardless.

tschallacka commented 8 years ago

well, utf8 support in varchar would be nice instead of the windows 125X ones. Utf8 support in general throughout sqlserver instead of having to manually capture all the gotchas. For web applications and php developers in general is utf8 prederred i believe over the windows codepages

Verzonden vanuit Outlook Mobilehttps://aka.ms/blhgte

On Fri, Apr 1, 2016 at 11:29 AM -0700, "Meet Bhagdev" notifications@github.com<mailto:notifications@github.com> wrote:

@Nick74khttps://github.com/Nick74k I have created a new issue the non English character issue for better tracking - #80https://github.com/Azure/msphpsql/issues/80.

Let us know if @tschallackahttps://github.com/tschallacka's recommendation works for you. We will investigate this on our end regardless.

You are receiving this because you were mentioned. Reply to this email directly or view it on GitHubhttps://github.com/Azure/msphpsql/issues/58#issuecomment-204503923

kingkongquelconque commented 8 years ago

Meet, Any news for the pdo sqlsrv driver for php7 (that supports x64) ? Do you plan a prerelease soon ?

david-garcia-garcia commented 8 years ago

I really really would like to know why are people requesting for x64 support. I'd love to see a use case where you need > 4Gb on a PHP process.

KyleWiering commented 8 years ago

@David-Garcia-Garcia - The software i work on requires the larger int size provided by a 64bit php. There are many use cases and applications outside of the memory limitation. My company easily exceeds the max int size for 32bit in primary keys on sql tables on a regular basis. Sure, I can code around it, and I have. But having a larger int size helps performance.

meet-bhagdev commented 8 years ago

Hi all,

We are targeting the week of April 10 for the prerelease of the 64bit AND 32bit variants of the PDO_SQLSRV driver. I will notify this thread with updates as we get closer to the date.

Let me know if you have any questions.

Cheers, Meet

kingkongquelconque commented 8 years ago

@David-Garcia-Garcia, a common use case is exporting data to excel spreadsheets that contains more than 100,000 cells Thanks for the answer @meet-bhagdev !

DigitalSolo commented 8 years ago

I am getting a crash in the 64 Bit module. I am using Apache 2.4, Windows 10 & PHP 7.0.4. I am using the same code base that we have in production.

Faulting application name: httpd.exe, version: 2.4.18.0, time stamp: 0x5667fd57 Faulting module name: php7ts.dll, version: 7.0.4.0, time stamp: 0x56d77347 Exception code: 0xc0000005 Fault offset: 0x000000000001ae0d Faulting process id: 0x2bac Faulting application start time: 0x01d18e418a22bd23 Faulting application path: D:\Program Files\Apache24\bin\httpd.exe Faulting module path: D:\PHP\php7ts.dll Report Id: 3248c3ef-3559-4c3c-9d4a-5401be16a7f3 Faulting package full name:

Fault bucket , type 0 Event Name: APPCRASH Response: Not available Cab Id: 0

Problem signature: P1: httpd.exe P2: 2.4.18.0 P3: 5667fd57 P4: php7ts.dll P5: 7.0.4.0 P6: 56d77347 P7: c0000005 P8: 000000000001ae0d P9: P10:

Attached files:

These files may be available here: C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_httpd.exe_9860e3bfaaecee75f074070b0e41e269273_75fa684f_2325d7cc

Analysis symbol: Rechecking for solution: 0 Report Id: 00008176-be42-4321-a08f-913da275e65d Report Status: 4100 Hashed bucket:

The crash file contents: Version=1 EventType=APPCRASH EventTime=131042285770735908 ReportType=2 Consent=1 ReportIdentifier=fb8fc7f0-fa36-11e5-8d96-40e2303c248a IntegratorReportIdentifier=652b032e-8ad7-4ae2-9eb0-64b1fdcfe282 NsAppName=httpd.exe Response.type=4 Sig[0].Name=Application Name Sig[0].Value=httpd.exe Sig[1].Name=Application Version Sig[1].Value=2.4.18.0 Sig[2].Name=Application Timestamp Sig[2].Value=5667fd57 Sig[3].Name=Fault Module Name Sig[3].Value=php7ts.dll Sig[4].Name=Fault Module Version Sig[4].Value=7.0.4.0 Sig[5].Name=Fault Module Timestamp Sig[5].Value=56d77347 Sig[6].Name=Exception Code Sig[6].Value=c0000005 Sig[7].Name=Exception Offset Sig[7].Value=000000000001ae0d DynamicSig[1].Name=OS Version DynamicSig[1].Value=10.0.10586.2.0.0.256.48 DynamicSig[2].Name=Locale ID DynamicSig[2].Value=1033 DynamicSig[22].Name=Additional Information 1 DynamicSig[22].Value=b1f0 DynamicSig[23].Name=Additional Information 2 DynamicSig[23].Value=b1f07c44f790817cf33b8c06b56ffd1b DynamicSig[24].Name=Additional Information 3 DynamicSig[24].Value=915b DynamicSig[25].Name=Additional Information 4 DynamicSig[25].Value=915b46e626583658430a12e9fb5af458 UI[2]=D:\Program Files\Apache24\bin\httpd.exe UI[5]=Check online for a solution (recommended) UI[6]=Check for a solution later (recommended) UI[7]=Close UI[8]=Apache HTTP Server stopped working and was closed UI[9]=A problem caused the application to stop working correctly. Windows will notify you if a solution is available. UI[10]=&Close LoadedModule[0]=D:\Program Files\Apache24\bin\httpd.exe LoadedModule[1]=C:\WINDOWS\SYSTEM32\ntdll.dll LoadedModule[2]=C:\WINDOWS\system32\KERNEL32.DLL LoadedModule[3]=C:\WINDOWS\system32\KERNELBASE.dll LoadedModule[4]=D:\Program Files\Apache24\bin\libhttpd.dll LoadedModule[5]=C:\WINDOWS\system32\WS2_32.dll LoadedModule[6]=C:\WINDOWS\system32\sechost.dll LoadedModule[7]=C:\WINDOWS\system32\RPCRT4.dll LoadedModule[8]=C:\WINDOWS\system32\ADVAPI32.dll LoadedModule[9]=C:\WINDOWS\system32\msvcrt.dll LoadedModule[10]=D:\Program Files\Apache24\bin\libaprutil-1.dll LoadedModule[11]=D:\Program Files\Apache24\bin\libapr-1.dll LoadedModule[12]=C:\WINDOWS\system32\SHELL32.dll LoadedModule[13]=C:\WINDOWS\system32\cfgmgr32.dll LoadedModule[14]=C:\WINDOWS\system32\windows.storage.dll LoadedModule[15]=C:\WINDOWS\system32\combase.dll LoadedModule[16]=C:\WINDOWS\system32\bcryptPrimitives.dll LoadedModule[17]=C:\WINDOWS\system32\shlwapi.dll LoadedModule[18]=C:\WINDOWS\system32\GDI32.dll LoadedModule[19]=C:\WINDOWS\system32\USER32.dll LoadedModule[20]=C:\WINDOWS\system32\kernel.appcore.dll LoadedModule[21]=C:\WINDOWS\system32\shcore.dll LoadedModule[22]=C:\WINDOWS\system32\powrprof.dll LoadedModule[23]=C:\WINDOWS\system32\profapi.dll LoadedModule[24]=C:\WINDOWS\SYSTEM32\VCRUNTIME140.dll LoadedModule[25]=C:\WINDOWS\SYSTEM32\ucrtbase.dll LoadedModule[26]=D:\Program Files\Apache24\bin\pcre.dll LoadedModule[27]=D:\Program Files\Apache24\bin\libapriconv-1.dll LoadedModule[28]=C:\WINDOWS\SYSTEM32\MSWSOCK.dll LoadedModule[29]=C:\WINDOWS\SYSTEM32\CRYPTBASE.DLL LoadedModule[30]=C:\WINDOWS\SYSTEM32\CRYPTSP.dll LoadedModule[31]=C:\WINDOWS\system32\rsaenh.dll LoadedModule[32]=C:\WINDOWS\SYSTEM32\bcrypt.dll LoadedModule[33]=D:\Program Files\Apache24\modules\mod_deflate.so LoadedModule[34]=D:\Program Files\Apache24\bin\zlib1.dll LoadedModule[35]=D:\Program Files\Apache24\modules\mod_mime.so LoadedModule[36]=D:\Program Files\Apache24\modules\mod_rewrite.so LoadedModule[37]=D:\Program Files\Apache24\modules\mod_expires.so LoadedModule[38]=D:\Program Files\Apache24\modules\mod_headers.so LoadedModule[39]=D:\Program Files\Apache24\modules\mod_cache.so LoadedModule[40]=D:\Program Files\Apache24\modules\mod_socache_dbm.so LoadedModule[41]=D:\Program Files\Apache24\modules\mod_access_compat.so LoadedModule[42]=D:\Program Files\Apache24\modules\mod_actions.so LoadedModule[43]=D:\Program Files\Apache24\modules\mod_alias.so LoadedModule[44]=D:\Program Files\Apache24\modules\mod_allowmethods.so LoadedModule[45]=D:\Program Files\Apache24\modules\mod_asis.so LoadedModule[46]=D:\Program Files\Apache24\modules\mod_auth_basic.so LoadedModule[47]=D:\Program Files\Apache24\modules\mod_authn_core.so LoadedModule[48]=D:\Program Files\Apache24\modules\mod_authz_core.so LoadedModule[49]=D:\Program Files\Apache24\modules\mod_autoindex.so LoadedModule[50]=D:\Program Files\Apache24\modules\mod_dir.so LoadedModule[51]=D:\Program Files\Apache24\modules\mod_env.so LoadedModule[52]=D:\Program Files\Apache24\modules\mod_include.so LoadedModule[53]=D:\Program Files\Apache24\modules\mod_isapi.so LoadedModule[54]=D:\Program Files\Apache24\modules\mod_log_config.so LoadedModule[55]=D:\Program Files\Apache24\modules\mod_negotiation.so LoadedModule[56]=D:\Program Files\Apache24\modules\mod_setenvif.so LoadedModule[57]=D:\PHP\php7apache2_4.dll LoadedModule[58]=D:\PHP\php7ts.dll LoadedModule[59]=C:\WINDOWS\system32\ole32.dll LoadedModule[60]=C:\WINDOWS\system32\PSAPI.DLL LoadedModule[61]=C:\WINDOWS\SYSTEM32\DNSAPI.dll LoadedModule[62]=C:\WINDOWS\system32\NSI.dll LoadedModule[63]=D:\PHP\ext\php_bz2.dll LoadedModule[64]=D:\PHP\ext\php_curl.dll LoadedModule[65]=C:\WINDOWS\system32\WLDAP32.dll LoadedModule[66]=C:\WINDOWS\system32\Normaliz.dll LoadedModule[67]=D:\Program Files\Apache24\bin\LIBEAY32.dll LoadedModule[68]=D:\PHP\libssh2.dll LoadedModule[69]=D:\Program Files\Apache24\bin\SSLEAY32.dll LoadedModule[70]=D:\PHP\ext\php_fileinfo.dll LoadedModule[71]=D:\PHP\ext\php_gd2.dll LoadedModule[72]=D:\PHP\ext\php_gettext.dll LoadedModule[73]=D:\PHP\ext\php_gmp.dll LoadedModule[74]=D:\PHP\ext\php_intl.dll LoadedModule[75]=D:\PHP\icuuc56.dll LoadedModule[76]=D:\PHP\icuin56.dll LoadedModule[77]=D:\PHP\icuio56.dll LoadedModule[78]=C:\WINDOWS\SYSTEM32\MSVCP140.dll LoadedModule[79]=D:\PHP\icudt56.dll LoadedModule[80]=D:\PHP\ext\php_imap.dll LoadedModule[81]=C:\WINDOWS\system32\CRYPT32.dll LoadedModule[82]=C:\WINDOWS\system32\MSASN1.dll LoadedModule[83]=C:\WINDOWS\SYSTEM32\WINMM.dll LoadedModule[84]=C:\WINDOWS\SYSTEM32\Secur32.dll LoadedModule[85]=C:\WINDOWS\SYSTEM32\WINMMBASE.dll LoadedModule[86]=C:\WINDOWS\SYSTEM32\SSPICLI.DLL LoadedModule[87]=D:\PHP\ext\php_mbstring.dll LoadedModule[88]=D:\PHP\ext\php_exif.dll LoadedModule[89]=D:\PHP\ext\php_openssl.dll LoadedModule[90]=D:\PHP\ext\php_pdo_odbc.dll LoadedModule[91]=C:\WINDOWS\SYSTEM32\ODBC32.dll LoadedModule[92]=C:\WINDOWS\SYSTEM32\DPAPI.dll LoadedModule[93]=D:\PHP\ext\php_sockets.dll LoadedModule[94]=C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL LoadedModule[95]=D:\PHP\ext\php_tidy.dll LoadedModule[96]=D:\PHP\ext\php_sqlsrv_7_ts.dll LoadedModule[97]=C:\WINDOWS\system32\msodbcsql11.dll LoadedModule[98]=C:\WINDOWS\system32\OLEAUT32.dll LoadedModule[99]=C:\WINDOWS\system32\NETAPI32.dll LoadedModule[100]=C:\WINDOWS\system32\COMDLG32.dll LoadedModule[101]=C:\WINDOWS\system32\FirewallAPI.dll LoadedModule[102]=C:\WINDOWS\system32\VERSION.dll LoadedModule[103]=C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.10586.0_none_396e892957c7fb25\COMCTL32.dll LoadedModule[104]=C:\WINDOWS\system32\MSVCR100.dll LoadedModule[105]=C:\WINDOWS\system32\DAVHLPR.DLL LoadedModule[106]=C:\WINDOWS\system32\fwbase.dll LoadedModule[107]=C:\WINDOWS\SYSTEM32\MTXDM.DLL LoadedModule[108]=C:\WINDOWS\system32\clbcatq.dll LoadedModule[109]=C:\Windows\System32\comsvcs.dll LoadedModule[110]=C:\WINDOWS\system32\1033\msodbcsqlr11.rll LoadedModule[111]=C:\WINDOWS\system32\CLUSAPI.DLL LoadedModule[112]=C:\WINDOWS\SYSTEM32\ncrypt.dll LoadedModule[113]=C:\WINDOWS\SYSTEM32\NTASN1.dll LoadedModule[114]=C:\WINDOWS\system32\RESUTILS.DLL LoadedModule[115]=C:\WINDOWS\system32\security.dll LoadedModule[116]=C:\WINDOWS\system32\schannel.DLL LoadedModule[117]=C:\Program Files\Microsoft SQL Server\90\Shared\instapi.dll LoadedModule[118]=C:\WINDOWS\WinSxS\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.9193_none_88e4514b2faac6c7\MSVCR80.dll LoadedModule[119]=C:\WINDOWS\SYSTEM32\mskeyprotect.dll LoadedModule[120]=C:\WINDOWS\system32\ncryptsslp.dll FriendlyEventName=Stopped working ConsentKey=APPCRASH AppName=Apache HTTP Server AppPath=D:\Program Files\Apache24\bin\httpd.exe NsPartner=windows NsGroup=windows8 ApplicationIdentity=5DB4A09869DD73F016080CF76D0925EA

MCF commented 8 years ago

Hi Folks,

Great to see so much interest in the new drivers. This issue has effectively become the announcement location for the new drivers as they trickle out. Can I make a suggestion that any issues that you run into when you try out the new releases be logged as brand new issues? Most people who are starting to work with the new drivers will not know to come review this one issue for possible problems. I would think it would be more effective to have each new issue logged separately so we can all participate in the trouble shooting. And this issue has become very, very long ;-)

Best Regards, and thanks for all the hard work.

meet-bhagdev commented 8 years ago

Couldn't agree with @MCF more. Please create new issues on GitHub if you feel there is a bug we need to investigate.

@DigitalSolo I have created a new issue for your crash report - https://github.com/Azure/msphpsql/issues/82

Cheers, Meet

Slavenin commented 8 years ago

Hello! How i can find pdo_sqlsrv.dll x64 driver for windows?

kAYd9iN commented 8 years ago

@Slavenin not out yet for php7, reading this issue would help you a lot next time

qqzm commented 8 years ago

I see the pdo drivers are now available, which is great news! Thanks guys! Would it be possible to make the pre-compiled binaries available as they are for the sqlsrv driver? Thanks

meet-bhagdev commented 8 years ago

@qqzm Good catch! This is done. Please check :) Alternatively you can always find the binaries in the releases - https://github.com/Azure/msphpsql/releases/tag/v4.0.3 @Slavenin The PDO drivers are now out! Please give it a shot and let us know what feedback you have.

Der-V commented 8 years ago

Hey, i'm very happy about the new driver and thank you guys a lot for all your work. I prepared a new release of a web application locally. Therefor i downloaded the latest Xampp version with PHP 7 and hoped that the driver will give me the possibility to connect to the Sql-Server database... Unfortunatelly it didn't worked.

If i restart the xampp server and have a look at the phpinfo page the pdo und sqlserver driver weren't shown there... So it seemed to be, that the dll aren't recognized... The same procedure runs for me with the older 5.6PHP version and the 5.6-dll files... Is there a configuration mistake of myself or an error in the dll files? Thank's for your help and response! Have a nice day! V

tschallacka commented 8 years ago

Does the pdo driver show up in phpinfo()? What does your php errors log say about the incompatability? What does the apache log say? Have you tried just plain apache without xampp?

Verzonden vanuit Outlook Mobilehttps://aka.ms/blhgte

On Sat, Apr 16, 2016 at 9:54 AM -0700, "Der-V" notifications@github.com<mailto:notifications@github.com> wrote:

Hey, i'm very happy about the new driver and thank you guys a lot for all your work. I prepared a new release of a web application locally. Therefor i downloaded the latest Xampp version with PHP 7 and hoped that the driver will give me the possibility to connect to the Sql-Server database... Unfortunatelly it didn't worked.

If i restart the xampp server and have a look at the phpinfo page the pdo und sqlserver driver weren't shown there... So it seemed to be, that the dll aren't recognized... The same procedure runs for me with the older 5.6PHP version and the 5.6-dll files... Is there a configuration mistake of myself or an error in the dll files? Thank's for your help and response! Have a nice day! V

You are receiving this because you were mentioned. Reply to this email directly or view it on GitHubhttps://github.com/Azure/msphpsql/issues/58#issuecomment-210856974

meet-bhagdev commented 8 years ago

@Der-V : I created a new issue to track this. Would love to know the answers to @tschallacka's questions.

Der-V commented 8 years ago

Hey everybody,

it's me again. I don't want to spam this thread here and to be honest i'm not sure, if there is a bug with this driver or there other circumstances. So I only want to tell you my observations. I've got a web application written with the cakephp framework... Until saturday i used one of the latest versions and the xampp installation with php 5.6 and the suiteable sqlserver driver. After the release of the new driver, i downloaded the latest xampp version with PHP 7.0.4 and later on also the latest cake-verion 3.2.... Let's come to my problem: I execute an insert, with an boolean column. In 5.6 everything work's fine. When I now which to the 7.04 version always a true will be inserted. Nothing has change besides, the xampp, php-verion (5.6 -> 7) and the driver. When i debug the sql which is executed, i got the following result

INSERT INTO TABLE ([col]) Values(0)

So i would expect that false will be saved. Sure i could be possible there are some changes in the xampp or php version that lead to that error, but i google a lot and i found nothing about an error like this...

So my question ist, could it be possible that there is an error in the driver, that doesn't translate the value correctly to real boolean?

I hope the question is allowed to ask here... otherwise i would try find an evidence that the other components or myself are the reason of that mistake.

Thank's for your effort to have a look at it. V

tschallacka commented 8 years ago

Sqlserver doesnt do booleans, it does bit. It saves a boolean false as 0 and boolean true as 1.

Verzonden vanuit Outlook Mobilehttps://aka.ms/blhgte

On Mon, Apr 18, 2016 at 3:01 AM -0700, "Der-V" notifications@github.com<mailto:notifications@github.com> wrote:

Hey everybody,

it's me again. I don't want to spam this thread here and to be honest i'm not sure, if there is a bug with this driver or there other circumstances. So I only want to tell you my observations. I've got a web application written with the cakephp framework... Until saturday i used one of the latest versions and the xampp installation with php 5.6 and the suiteable sqlserver driver. After the release of the new driver, i downloaded the latest xampp version with PHP 7.0.4 and later on also the latest cake-verion 3.2.... Let's come to my problem: I execute an insert, with an boolean column. In 5.6 everything work's fine. When I now which to the 7.04 version always a true will be inserted. Nothing has change besides, the xampp, php-verion (5.6 -> 7) and the driver. When i debug the sql which is executed, i got the following result

INSERT INTO TABLE ([col]) Values(0)

So i would expect that false will be saved. Sure i could be possible there are some changes in the xampp or php version that lead to that error, but i google a lot and i found nothing about an error like this...

So my question ist, could it be possible that there is an error in the driver, that doesn't translate the value correctly to real boolean?

I hope the question is allowed to ask here... otherwise i would try find an evidence that the other components or myself are the reason of that mistake.

Thank's for your effort to have a look at it. V

You are receiving this because you were mentioned. Reply to this email directly or view it on GitHubhttps://github.com/Azure/msphpsql/issues/58#issuecomment-211306180

Der-V commented 8 years ago

Hey tschallacka

yes, of course that's right. I'm sorry for my incorrect wording. As you can see in the SQL I give a 0 for a false value with it. The table in the sqlserver got the datatype bit. So in my understanding everything is correctly configured concerning that point and the a false or a 0 should be saved. If i excecute the same sql query, i debugged out of the application, directly in the sql management studio, everything is fine and correctly inserted. And i see in the debugged query that the sql is correctly built and interpretated by the application. So it seems that anything between create an error. That's why i could imagine that there is a possible error in the driver!? Kind regards V

Slavenin commented 8 years ago

@Slavenin The PDO drivers are now out! Please give it a shot and let us know what feedback you have.

@meet-bhagdev Thank you so much! My project is work fine!

meet-bhagdev commented 8 years ago

@Der-V : We will look into this and get back to you. Will let you know if we have any questions. @Slavenin : Glad its working out for you. @all: We are starting work on the Linux driver for SQL Server and PHP. We would like to understand what versions and distros of Linux do you use. If you are interesting in using PHP on Linux to connect to SQL Server, please spend a few seconds to complete this survey to help us prioritize our efforts. https://www.surveymonkey.com/r/FBCGJQ3

qqzm commented 8 years ago

@meet-bhagdev Thanks! Sorry I didn't see the binaries in the releases, I was just looking on the main page.

I've been playing with the x64 PDO drivers all day today and everything looks great as far as I can tell. All our sites seem to be working correctly and significantly faster than with PHP 5.6.

Thanksfor all your hard work getting this out, great job guys!

Der-V commented 8 years ago

@meet-bhagdev: I made some more tests about that observation concerning the booleans. I got the same problem with selects.... I execute that queries directly with the php sql_server methods and everything works fine. So the error is still existing but it seemed to be a problem of the framework and not of the driver, because the direct way without the ORM works fine. I let you know if there are some news. I have to thank you for your work.

sirio3mil commented 8 years ago

Hi @meet-bhagdev great job with this driver and sorry for not follow properly all bugs reported by me, this week I will have time to try and test more properly.

I have several questions:

  1. production realease will support Microsoft ODBC driver v13?
  2. estimated release candidate date?
  3. once linux realease finished all next version will update all driver type (PDO, SQLSRV, LINUX) at same time? or just like now once at a time

Regards

maneshmathew commented 8 years ago

hi I downloaded the PDO driver copied 'php_pdo_sqlsrv_7_ts.dll' in to the ext folder of the php. when I tried a sample page with connecting to SQL server 2014 igot the message "could not find driver". any idea why?.....

Gjohn77 commented 8 years ago

Is there an estimated date for the Linux drivers - either PDO or SQLSRV?

stevenobird commented 8 years ago

You also need to register it in your php.ini. extension=php_pdo_sqlsrv_7_ts.dll

Btw, if you use IIS, use the _nts DLL instead of the _ts.

qqzm commented 8 years ago

@maneshmathew I had the same error message, so yours issue may be the same as mine. I'd accidentally downloaded a html file instead of the dll. I later found you need to click "raw" before downloading otherwise GitHub gives you a random page named as php_pdo_sqlsrv_7_ts.dll.

maneshmathew commented 8 years ago

Hi guys I resolved it . I downloaded the 64 bit version instead of x86 and had to download the of course 11 driver for sale server . Now it's working. Thanks guys for the input .

Sent from my iPad

On 26 Apr 2016, at 17:40, qqzm notifications@github.com wrote:

@maneshmathew I had the same error message, so yours issue may be the same as mine. I'd accidentally downloaded a html file instead of the dll. I later found you need to click "raw" before downloading otherwise GitHub gives you a random page named as php_pdo_sqlsrv_7_ts.dll.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

sdh100shaun commented 8 years ago

are there any plans for the linux version? is it imminent?

jadrovski commented 8 years ago

@Der-V, I got the same issue with php 7.05, sql server, x64 pdo driver and Yii2 framework. Selects are not working with booleans in filter.

Here is pdo statement debug dump params:

SQL: [133] SELECT * FROM [Scripts] WHERE ([Hidden]=:qp0) AND ([TaggedRemoved]=:qp1) ORDER BY (SELECT NULL) OFFSET 0 ROWS FETCH NEXT 20 ROWS ONLY Params: 2 Key: Name: [4] :qp0 paramno=0 name=[4] ":qp0" is_param=1 param_type=5 Key: Name: [4] :qp1 paramno=1 name=[4] ":qp1" is_param=1 param_type=5

I also tried \PDO::PARAM_INT, not working on "bit" datatype column.