Linux is case sensitive
#1

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?
Reply
#2

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".
Reply
#3

It's ini or MySQL?
Reply
#4

It's ini.
Reply
#5

In localhost it works without problems?
Reply
#6

why not strtolower on filenames ?
Reply
#7

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.
Reply
#8

No, it's not working
Reply
#9

see the params of strcmp.
Reply
#10

Quote:
Originally Posted by PT
Посмотреть сообщение
see the params of strcmp.
Can you explain more?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)