Forum Discussion
Carlos_J_Ro
Feb 08, 2024Copper Contributor
SELECT LANGUAGE from PHP
Hi, friends, If I write SELECT @@language in Management Studio I obtain 'Spanish' but if I do from PHP 5 (Apache 2.2) I obtain 'us_english'. How can I configure my PHP (or Apache) to obtain '...
olafhelper
Feb 08, 2024Bronze Contributor
The default language is bound to the SQL Server login; are you using the same login for both SSMS + PHP?
See https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-login-transact-sql?view=sql-server-ver16 => DEFAULT_LANGUAGE
See https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-login-transact-sql?view=sql-server-ver16 => DEFAULT_LANGUAGE
- Carlos_J_RoFeb 08, 2024Copper Contributor
Hi, olafhelper ,
Thanks for your response. Yes, I am using same authentication for both systems.
Maybe I need to add a line in php.ini about the language?
Kind regards
- olafhelperFeb 09, 2024Bronze Contributor
Carlos_J_Ro , the effective language setting is session related, you can change it with
- Carlos_J_RoFeb 09, 2024Copper ContributorHi, Olaf,
Yes, this is the solution we are applying but I would like to avoid it because it means to add this query to all queries.
Thanks and kind regards