[Asterisk-Users] FW: Getting PHP Config to work?

Time Bandit timebandit001 at gmail.com
Fri Feb 25 07:14:28 MST 2005


> I have been doing various testing with asterisk and its been going great.
> However I am a bit feedup of using vi for editing configs, and would rather
> do it from any machine on my LAN. I am running debian and * via xorcom rapid
> on a test PC at the minute.
I had the same problem. So I did a simple PHP page that let me do this.
You can grab it here :
http://www.marccharbonneau.com/asterisk/asweadto_0_1_1.tar

That was before I discovered phpconfig. That doesn't say I won't
continue working on mine :)
 
> However I cannot write any files, I get the error:
> 
> User: admindoes not have access to this feature.
> Write failed!

I found some errors in phpconfig. Open the file cls_phpconfig.php

In the function OC_readConfFile around line 131 
change : $this->_OC_the_file[] = fgetc($file);
to : $this->_OC_the_file[] = fgets($file);

In the function OC_checkAccess around line 438
change : $accessFile[] = fgetc($file);
to : $accessFile[] = fgets($file);

fgetc read one character at a time. fgets read one line at a time.

>I have moved asterisk.reload into /bin, and if I run it from the shell I get
You don't have to move it to /bin. You can just do this simple
modification to have it run from the same place as the pages
Open the file phpconfig.php
Look for : $reset_cmd = "asterisk.reload" 
and change to $reset_cmd = "./asterisk.reload"

You should be running fine with this. If not, let me know, I may have
forgot something



More information about the asterisk-users mailing list