|
|
#1 |
|
Junior Member
Join Date: Dec 2003
Posts: 5
|
Changing password "on fly"
Hello,
I would be interested to know if there is a way to change the broadcaster password "on fly" via PHP script. I did try the following method: created somefilename.conf created a php which writes Password=newpassword via post (htaccess protected) changed Password=somepass to Include /pathto/somefilename.conf added cron job to stop the server every 1 min before a full hour So what I can do is typing a new password and wait until the cron restarts the sc_serv to apply the changes. The problem here is that it always gives a Invalid password meaning it seems like it doesnt accept the included password conf file Any suggestions how I could make it work ? Thanks |
|
|
|
|
|
#2 |
|
Forum Loser
(Forum King) |
did your DSP get the changed password as well? That sounds like the prob.
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Dec 2003
Posts: 5
|
Yes all changes were applied. It seems like sc_serv ignores the Password=somepass include function - maybe a bug ?
|
|
|
|
|
|
#4 |
|
Alumni
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
|
What exactly are you putting in for the Password section (i.e. please post an example)?
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Dec 2003
Posts: 5
|
PHP Code to create a new password:
PHP Code:
Password=thenewpassword The sc_serv.conf looks like this: (only the part up to the include) ; SHOUTcast Distributed Network Audio Server configuration file ; Copyright (C) 1998-2002 Nullsoft, Inc. ; All Rights Reserved. ; Last modified Jan 16 2002 ; If you want to manage multiple configurations, just copy ; this file to another name, and run sc_serv with that name ; such as: ; sc_serv.exe sc_leet.conf ; *************************** ; Required stuff ; *************************** Include=/path/to/passconf.conf ; MaxUser. The maximum number of simultaneous listeners allowed. ; Compute a reasonable value for your available upstream bandwidth (i.e. if ; you have 256kbps upload DSL, and want to broadcast at 24kbps, you would ; choose 256kbps/24kbps=10 maximum listeners.) Setting this value higher ; only wastes RAM and screws up your broadcast when more people connect ; than you can support. MaxUser=500 The line Password=somepassword is replaced by the include function which should read the passconf.conf after the server was restarted. Doesn't work for some reason - It always gives "Invalid Password" as answer. |
|
|
|
|
|
#6 |
|
Alumni
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
|
The following isn't valid DNAS config syntax:
Include=/path/to/passconf.conf The DNAS doesn't process any includes. |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Dec 2003
Posts: 5
|
From sc_serv.conf:
; Include: instructs the sc_serv to read from the named configuration file, ; *at the point of insertion of the Include statement*, and process as though ; the included file was part of itself. Note that all configuration parameters ; in the DNAS config file are processed first to last, so if an item is defined ; twice in a configuration, the last item to process will be the one that takes ; effect. For this reason, it's usually a good idea to use the Includes first ; in a config file. ; example: ; Include=/usr/local/shoutcast/common.conf ; Default is not applicable. Normally it should if this info is correct ?! |
|
|
|
|
|
#8 |
|
Alumni
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
|
Heh. Just goes to show I don't know everything
![]() Re-evaluating the thread, I'd say it should work. Is the path to the include file relative to the directory the DNAS is instantiated from? (Also, check file permissions) Try writing the include file to the same directory as the DNAS and use (example): Include=myinclude.conf |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|