Thimios Dimopulos | 10 Mar 19:06
Picon
Favicon

Re: PHP errors in debian

There probably is a bug, concerning the way wifiadmin parses the output 
of your wireless tools. Could you give me a temporar user acount on your 
machine to check it out?

Sebastian Ortwein wrote:

>Am Donnerstag, den 10.03.2005, 19:26 +0200 schrieb Thimios Dimopulos:
>  
>
>>Sebastian Ortwein wrote:
>>
>>    
>>
>>>Hey
>>>
>>>I get following errors with my Browser in wifiadmin
>>>in wireless status
>>>
>>>Notice: Undefined variable: current in /var/www/wifiadmin/iwstatus.php
>>>on line 106
>>>
>>>Notice: Undefined variable: current in /var/www/wifiadmin/iwstatus.php
>>>on line 330
>>>
>>>status
>>>This device\'s mode is not supported.
>>>
>>>
>>>Notice: Undefined variable: current in /var/www/wifiadmin/iwstatus.php
>>>on line 345
(Continue reading)

Thimios Dimopulos | 13 Mar 01:42
Picon
Favicon

Re: PHP errors in debian

So, Sebastian gave me a user account to investigate this. I am posting 
here, since more people might want to see this.
It is most probably a problem with your sudo configuration. It seems 
that the user www-data can't run "sudo /sbin/iwconfig"

to see if this is the case, create a file called test.php in your 
wifiadmin directory, with the following content:

<?php
    include( "include/functions.php");

    //this just runs iwconfig, and prints it's output, and the return code
    print( system("sudo /sbin/iwconfig", $return_value));
    echo("\n $return_value \n");

    //the get_wireless_status function, parses the output of iwconfig, 
and returns it in an array
    print_r(get_wireless_status());
?>

then become www-data, by running:

su - www-data

and now try to execute the above script, running

php test.php

if you don't get the correct output (which is the ouput of iwconfig, 
followed by a 0, followed by the pretty-print of the corresponding 
(Continue reading)

Sebastian Ortwein | 13 Mar 15:02
Picon
Picon

Re: PHP errors in debian

Now its working

thanks

Am Sonntag, den 13.03.2005, 02:42 +0200 schrieb Thimios Dimopulos:
> So, Sebastian gave me a user account to investigate this. I am posting 
> here, since more people might want to see this.
> It is most probably a problem with your sudo configuration. It seems 
> that the user www-data can't run "sudo /sbin/iwconfig"
> 
> to see if this is the case, create a file called test.php in your 
> wifiadmin directory, with the following content:
> 
> <?php
>     include( "include/functions.php");
> 
>     //this just runs iwconfig, and prints it's output, and the return code
>     print( system("sudo /sbin/iwconfig", $return_value));
>     echo("\n $return_value \n");
> 
>     //the get_wireless_status function, parses the output of iwconfig, 
> and returns it in an array
>     print_r(get_wireless_status());
> ?>
> 
> then become www-data, by running:
> 
> su - www-data
> 
> and now try to execute the above script, running
(Continue reading)


Gmane