SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 19/01/2015, 10:17 AM   #1
ATGOggy
Gangsta
 
Join Date: Sep 2014
Location: Ls-rcr
Posts: 850
Reputation: 52
Default Linux is case sensitive

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?
__________________
******: "I've said this before. People think that MySQL is some simple plug-and-play magic bullet that you can use to just make your mode instantly better. They don't realise that the "L" in "SQL" means "language". So instead of programming PAWN, and using a bit of this mystery thing, you are now programming in two languages at once. If you spend months learning PAWN, you should spend the same time learning SQL, if not more - it is probably the more complex of the two languages, and not something that just gets bolted on to the side."


I give and want only fair reps. I hate this: "hey bro, I rep you, rep me plz

Click below if you wanna be amazed:
http://Paid2Refer.com/ref.php?refId=291262
ATGOggy is offline   Reply With Quote
Old 19/01/2015, 10:20 AM   #2
xo
Big Clucker
 
xo's Avatar
 
Join Date: Dec 2013
Location: I don't know.
Posts: 173
Reputation: 78
Default Re : Linux is case sensitive

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 Code:
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".
xo is offline   Reply With Quote
Old 19/01/2015, 10:20 AM   #3
www
Huge Clucker
 
www's Avatar
 
Join Date: Aug 2014
Location: cd /var/log/
Posts: 279
Reputation: 35
Default Re: Linux is case sensitive

It's ini or MySQL?
www is offline   Reply With Quote
Old 19/01/2015, 10:21 AM   #4
ATGOggy
Gangsta
 
Join Date: Sep 2014
Location: Ls-rcr
Posts: 850
Reputation: 52
Default Re: Linux is case sensitive

It's ini.
__________________
******: "I've said this before. People think that MySQL is some simple plug-and-play magic bullet that you can use to just make your mode instantly better. They don't realise that the "L" in "SQL" means "language". So instead of programming PAWN, and using a bit of this mystery thing, you are now programming in two languages at once. If you spend months learning PAWN, you should spend the same time learning SQL, if not more - it is probably the more complex of the two languages, and not something that just gets bolted on to the side."


I give and want only fair reps. I hate this: "hey bro, I rep you, rep me plz

Click below if you wanna be amazed:
http://Paid2Refer.com/ref.php?refId=291262
ATGOggy is offline   Reply With Quote
Old 19/01/2015, 10:24 AM   #5
www
Huge Clucker
 
www's Avatar
 
Join Date: Aug 2014
Location: cd /var/log/
Posts: 279
Reputation: 35
Default Re: Linux is case sensitive

In localhost it works without problems?
www is offline   Reply With Quote
Old 19/01/2015, 10:26 AM   #6
xxmitsu
Gangsta
 
Join Date: Feb 2009
Posts: 622
Reputation: 36
Default Re: Linux is case sensitive

why not strtolower on filenames ?
__________________
aka xanto - Retired - Former eGaming.ro technical staff.
xxmitsu is offline   Reply With Quote
Old 19/01/2015, 10:29 AM   #7
xo
Big Clucker
 
xo's Avatar
 
Join Date: Dec 2013
Location: I don't know.
Posts: 173
Reputation: 78
Default Re: Linux is case sensitive

INI!
Okay then try
pawn Code:
new pName[MAX_PLAYER_NAME],
        pName1[MAX_PLAYER_NAME];

       format(pName1, sizeof(pName1), "%s" ,strlower(pName));
then use up pName1.
xo is offline   Reply With Quote
Old 19/01/2015, 10:47 AM   #8
ATGOggy
Gangsta
 
Join Date: Sep 2014
Location: Ls-rcr
Posts: 850
Reputation: 52
Default Re: Linux is case sensitive

No, it's not working
__________________
******: "I've said this before. People think that MySQL is some simple plug-and-play magic bullet that you can use to just make your mode instantly better. They don't realise that the "L" in "SQL" means "language". So instead of programming PAWN, and using a bit of this mystery thing, you are now programming in two languages at once. If you spend months learning PAWN, you should spend the same time learning SQL, if not more - it is probably the more complex of the two languages, and not something that just gets bolted on to the side."


I give and want only fair reps. I hate this: "hey bro, I rep you, rep me plz

Click below if you wanna be amazed:
http://Paid2Refer.com/ref.php?refId=291262
ATGOggy is offline   Reply With Quote
Old 19/01/2015, 10:51 AM   #9
PT
Godfather
 
PT's Avatar
 
Join Date: Nov 2012
Location: Europe
Posts: 7,175
Reputation: 803
Default Re: Linux is case sensitive

see the params of strcmp.
PT is online now   Reply With Quote
Old 19/01/2015, 10:56 AM   #10
ATGOggy
Gangsta
 
Join Date: Sep 2014
Location: Ls-rcr
Posts: 850
Reputation: 52
Default Re: Linux is case sensitive

Quote:
Originally Posted by PT View Post
see the params of strcmp.
Can you explain more?
__________________
******: "I've said this before. People think that MySQL is some simple plug-and-play magic bullet that you can use to just make your mode instantly better. They don't realise that the "L" in "SQL" means "language". So instead of programming PAWN, and using a bit of this mystery thing, you are now programming in two languages at once. If you spend months learning PAWN, you should spend the same time learning SQL, if not more - it is probably the more complex of the two languages, and not something that just gets bolted on to the side."


I give and want only fair reps. I hate this: "hey bro, I rep you, rep me plz

Click below if you wanna be amazed:
http://Paid2Refer.com/ref.php?refId=291262
ATGOggy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fexist() with no case sensitive Anuris Scripting Help 1 07/11/2014 06:12 PM
y_ini case sensitive on linux? martoivanov Scripting Help 5 26/07/2014 04:36 PM
Case sensitive user names. Anak Scripting Help 14 28/07/2013 07:15 AM
[ini] Case sensitive problem. Kebab- Scripting Help 6 06/01/2013 12:20 PM
MySQL - PlayerName - Case sensitive nGen.SoNNy Scripting Help 2 12/11/2012 06:50 PM


All times are GMT. The time now is 05:59 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.