Linux is case sensitive -
ATGOggy - 19.01.2015
I have a server that in development mode, hosted in a samp hosting site.
The problem is that the OS of that host is Linux and Linux is case sensitive, so I'm having issues with user database.
When I register an account named ATGoggy, I can login again and again with the name 'ATGoggy'.
But, when I change case, like atgoggy, I'll have to register again. What should I do now?
Re : Linux is case sensitive -
xo - 19.01.2015
Either escape string if it's MYSQL, or turn all string letters to lowercase upon register and check for the lowered case string.
If it's mysql database then:
mysql_real_escape_string(from string, to escapedstring);
where string is the name that you should get.
for ex:
Under your OnPlayerConnect callback
pawn Код:
new pName[MAX_PLAYER_NAME],
pName1[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
mysql_real_escape_string(pName,pName1);
Then select result with "pName1" instead of "pName".
Re: Linux is case sensitive -
www - 19.01.2015
It's ini or MySQL?
Re: Linux is case sensitive -
ATGOggy - 19.01.2015
It's ini.
Re: Linux is case sensitive -
www - 19.01.2015
In localhost it works without problems?
Re: Linux is case sensitive -
xxmitsu - 19.01.2015
why not strtolower on filenames ?
Re: Linux is case sensitive -
xo - 19.01.2015
INI!
Okay then try
pawn Код:
new pName[MAX_PLAYER_NAME],
pName1[MAX_PLAYER_NAME];
format(pName1, sizeof(pName1), "%s" ,strlower(pName));
then use up pName1.
Re: Linux is case sensitive -
ATGOggy - 19.01.2015
No, it's not working
Re: Linux is case sensitive -
PT - 19.01.2015
see the params of
strcmp.
Re: Linux is case sensitive -
ATGOggy - 19.01.2015
Quote:
Originally Posted by PT
|
Can you explain more?