Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CF writing to FTP INI

Status
Not open for further replies.

wantstolearncfm

IS-IT--Management
Jun 29, 2004
160
GB
Hi,
I am using bullet proof FTP and want to write to the users.ini file when i add a new ftp user (or when they add there own user).
I found Which shows me this
Code:
<cfscript>
   user = SetProfileString("C:\windows\settings.ini", "settings", "user", "#FORM.NEWUSERNAME#")
   Pass = SetProfileString("C:\windows\settings.ini", "settings", "user", "#FORM.NEWPASSWORD#")
   Path = SetProfileString("C:\windows\settings.ini", "settings", "user", "#FORM.NEWPATH#")
</cfscript>
So i need to pass a Form with the values in there etc i can do that but how do i write all that the ftp server needs and what do i need to adapt
For every user there is this
Code:
[userfrom form]
Login=user from for,
Pass=pass from form
Home-Ip=-= All IP Homes =-
RelativePath=1
TimeOut=600
MaxConPerIp=1
MaxUsers=0
RatioMethod=0
RatioUp=1
RatioDown=1
RatioCredit=0
MaxSpeedRcv=512
MaxSpeedSnd=512
QuotaCurrent=0
QuotaMax=0
Dir0=C:\directory will be spec by CF
Attr0=RWDAMLSK
Stat_Login=2
Stat_LastLogin=29/06/2004 17:34:14
Stat_LastIP=10.0.0.7
Stat_KBUp=0
Stat_KBDown=0
Stat_FilesUp=0
Stat_FilesDown=0
Stat_FailedUp=0
Stat_FailedDown=0
Cheers
 
Hi again,
I think i should elaborate, i am well and truly stumped.
How do i set this per user added i.e my sign up makes the login and pass fileds required do i just tell it to
login=setprofilestring
("c:\thedir\users.ini", "form.login", "form.login", "form.pass") i just cant see it working at all
 
Another update from me seeing as no one seems to be posting.
I am trying to make the example on easycfm work but it gives me compiler errors
Could someone guide me through this?
Cheers
 
No one got any ideas? im sure wullie or webmigit had posted about this before? i really am stuck please help the hosting company im doing this for is set to go live in under a week
 
maybe you could post the error you are getting with the example? "compiler error" is kinda vague.


=========================================
I have not failed. I've just found 10,000 ways that won't work.
Thomas A. Edison
 
also, regarding your second post
Code:
login=setprofilestring("c:\thedir\users.ini", "form.login", "form.login", "form.pass")

should look more like
Code:
login=setprofilestring("c:\thedir\users.ini", "userfrom form", "Login", "#form.login#")

a look at livedocs will help you out

the second attribute of SetProfileString is the ini section to be edited, the third is the entry to be edited, and the fourth is the new value

i've never done this before, but a quick look at the docs should tell you what you need to know


=========================================
I have not failed. I've just found 10,000 ways that won't work.
Thomas A. Edison
 
im sorry, attribute is an improper term- should be parameter.


=========================================
I have not failed. I've just found 10,000 ways that won't work.
Thomas A. Edison
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top